- Home /
iOS Gamecenter Apple Mach-O Linker errors in xcode build
I've set up Gamecenter for my app and added GameKit.framework to the libraries and GameCenter to the capabilities in the xcode project. I used Unity's Social API to implement the Achievements and Leaderboard features of GameCenter. When I go to build it in xcode, I am getting 200+ linker errors in the following format:
Undefined symbols for architecture armv7: "_TurnBasedMultiplayerManager_TurnBasedMatchesResponse_Dispose", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_TurnBasedMultiplayerManager_ShowMatchInboxUI", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_TurnBasedMultiplayerManager_Rematch", referenced from: RegisterMonoModules() in RegisterMonoModules.o "_TurnBasedMultiplayerManager_PlayerSelectUIResponse_GetPlayerIds_Length", referenced from: RegisterMonoModules() in RegisterMonoModules.o
As far as I can tell, all of them are related to Game Center. By the sheer number of errors, it looks to me like the GameKit.framework is not getting linked properly, but the capabilities page says that it is set up correctly. I've tried re-exporting from Unity and re-importing the GameKit framework, but so far nothing has fixed the issue.
Is there something else I need to import besides the GameKit framework? Is there some linker setting I am missing? Or perhaps some step in the set up that I didn't get?
Thanks!!
Did you get a solution? As far as I know it is definitely the Google Play Services (as someone stated in the answers) - how did you fix this? I am getting the same issue.. after googling a lot I still have no luck..
@$$anonymous$$arc I found that I had not updated to the most recent GPGS libraries, so the NO_GPGS directive was not working. If you update to the latest GPGS libraries (download the zip or pull from master), then follow the instructions in the documentation, it should build properly. One thing to note, I believe you have to press enter after adding the NO_GPGS to the defined symbols section, otherwise it will not save your changes. Let me know if that works.
@Eagle_I337 Thanks for the response. I am using the latest GPGS, and I am aware of the NO_GPGS feature. So by adding it I won't have GPGS features in my app? Or I am totally over thinking by now? lol
Answer by Bas-Smit · Apr 21, 2015 at 02:23 PM
This is Google play stuff. I'm betting you have a folder called GooglePlayGames?
I do, but I compiled the iOS build with the NO_GPGS flag defined, so I thought the Google Play Games would not be included.
I cant find NO_GPGS anywhere in the google play code, I think thats for a different plugin
It's something that was added recently. It's mentioned in the 'Excluding all Google Play Services when building for iOS' section in the documentation for the Unity Google Play plugin