XCode (iOS port from Unity + Chartboost), tons of Apple Mach-O linker errors

Here’s all the errors I got when archiving my project in XCode, I use the Chartboost plugin in Unity.

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_GKAchievement", referenced from:
      objc-class-ref in libiPhone-lib.a(GameCenter.o)
  "_OBJC_CLASS_$_GKAchievementDescription", referenced from:
      objc-class-ref in libiPhone-lib.a(GameCenter.o)
  "_OBJC_CLASS_$_GKLeaderboard", referenced from:
      objc-class-ref in libiPhone-lib.a(GameCenter.o)
  "_OBJC_CLASS_$_GKPlayer", referenced from:
      objc-class-ref in libiPhone-lib.a(GameCenter.o)
  "_OBJC_CLASS_$_GKLocalPlayer", referenced from:
      objc-class-ref in libiPhone-lib.a(GameCenter.o)
  "__chartBoostTrackEventWithValueAndMetadata", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__chartBoostTrackEventWithValue", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_OBJC_CLASS_$_GKScore", referenced from:
      objc-class-ref in libiPhone-lib.a(GameCenter.o)
  "__chartBoostTrackEvent", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__chartBoostPauseUnity", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__chartBoostHasCachedInterstitial", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__chartBoostShowMoreApps", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_OBJC_CLASS_$_GKAchievementViewController", referenced from:
      objc-class-ref in libiPhone-lib.a(GameCenter.o)
  "__chartBoostCacheMoreApps", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__chartBoostInit", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__chartBoostTrackEventWithMetadata", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_GKErrorDomain", referenced from:
      GameCenter::CreateUserImage(UIImage*, NSError*) in libiPhone-lib.a(GameCenter.o)
  "__chartBoostCacheInterstitial", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__chartBoostForceOrientation", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "_OBJC_CLASS_$_GKLeaderboardViewController", referenced from:
      objc-class-ref in libiPhone-lib.a(GameCenter.o)
  "__chartBoostShowInterstitial", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__chartBoostHasCachedMoreApps", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Since your iOS Distribution Provisioning Profile requires GameCenter and In-App Purchases, then your Xcode project must match that, and also require GameCenter and In-App Purchases. Therefore, in Xcode, go to your project’s Capabilities section and TURN ON GameCenter and In-App Purchases.

I don’t have access to a Mac at the moment. But have you tried cleaning your build? Sometimes that will fix that sort of cascading error. I want to say it’s Product → Clean Build (I haven’t touched a Mac in ~6 weeks, I’m kind of forgetful)

Same problems here, and clean build didn’t work out.

I think you are missing libiPhone-lib.a that support armv7 architecture. Anyway, I’m having the same issue. Do you know where can I get an updated libiPhone-lib.a?,

Add -fno-objc-arc to “Complile flags” (in the Unity inspector) on your Chartboost files under Assets/Plugins/iOS/