paranitips

Never stop learning! がモットーのゆるふわエンジニアブログ

Unityプロジェクトの「Apple Mach-O Linker」エラーを解決する

UnityからXcodeに書き出してビルドすると大量のエラーが出ました。

ld: warning: ignoring file /Users/xxx/yyy iOS/Libraries/libiPhone-lib.a, missing required architecture i386 in file /xxx/yyy iOS/Libraries/libiPhone-lib.a (2 slices)
Undefined symbols for architecture i386:
“Register_UnityEngine_SocialPlatforms_GameCenter_GameCenterPlatform_Internal_LoadAchievementDescriptions()”, referenced from:
RegisterAllStrippedInternalCalls() in RegisterMonoModules.o
“Register_UnityEngine_SocialPlatforms_GameCenter_GameCenterPlatform_Internal_ShowDefaultAchievementBanner()”, referenced from:
…

XcodeSchemeにシミュレータが指定されているのが原因なので、
SchemeシミュレータからiOS deviceに切り替えてビルドすると解決します。

参考