I use Unity 4.2.0f4 and Xcode 5. When I run the app in Xcode and look under “Capabilities”, Game center is turned On but with errors. I don’t need and haven’t added anything for Game Center for the app. If I click on “fix issues” it links my Provisioning Profile to Game center and Game center looks happy. I can then build the app to iPhone or iPad without issues, but since I don’t need or want Game Center to be On, I turn it off. When i turn it off I get Apple Mach-O linker erros, 10 of them.
Isn’t anyone else encountering this problem? Is it a Unity thing that will be fixed in 4.3? Do I just have to accept it and not turn off Game center and send in the app for review anyway?
You should not let Xcode fix this “Error”. It just tries to play too smart.
GameCenter is optionally linked to Unity iOS runtime, which means it is used only if your code really uses Unity Social API and device iOS version supports it. Leaving it as is should not anyhow interfere your submission process. Please let us know if you encounter submission problems with it.
I had a lot of problems with Xcode 5 so in the end I had to install 4.6.3 again and publish my app through that instead. Had to add the new icons manually though.
I don´t let Xcode fix the error but when I fix my In-App Purchase entilement error it automatically fixes the game center one. Now the only way I can Archive is by having Game Center capabilities on and my app doesn´t use Game Center. Do you think I´ll encounter submission problems if I have Game Center on but the app does not use it?
I am having problems with this Game Center bug(?). The problem is, is that if the Game Center setting is touched, say good-bye to that version of your Xcode project – you have to pull the previous version out of version control. Turning Game Center back on in Capabilities does not fix the errors. Blaming Xcode seems to be the wrong approach. Why doesn’t Unity allow generation of the Xcode project without these dependencies?
I am not a Unity developer, BTW, so please excuse me if I have some terms wrong here. It will be a while before I submit my app (it is in prototype stage now) but I am concerned over the possibility of problems when submitting the app (in addition to the fact that my Xcode project has a “self-destruct” button on the Capabilities screen labeled “Game Center.”)
Hi there, I am having the same problem. Could you provide something like a build option to leave the dependencies for the Game Center out of the XCode project?
I have the same issue but i think i found a solution. The problem is that when you turn off “Game Center” in the Capabilities panel Xcode automatically remove the GameKit.framework from your linked framework and library. So all you have to do is to add it again after turning off the “Game Center”. After that you can build without Apple Mach-O linker errors. Hope it helps.
I got a “Build Failed” error, and the same “Apple Mach-O linker error”. This is after I had archived and successfully submitted my game to the app store. I haven’t changed a single thing. After a couple months of not even opening this laptop’s user account, I just tried to “Build and then run” from inside Xcode. I guess something got updated in Xcode while my wife was on her user account?
Under the Capabilities “tab(?)” heading I had nothing turned on, nor do I need any of these for my game’s capabilities, yet pain_gwar’s solution of switching on “Game Center” got me past this. Thanks!
I know have 2 different machine that have same issue…and i changed nothing . out of the blue it no longer compiles and craps out when it needs to link the the game center. Once this happens ALL iOS projects fail to compile. old ones…different one…does not matter.
In Xcode, I had these Apple Mach-O Linker errors too (from a Unity iOS build). My app doesn’t use Game Center capabilities, and I didn’t want to turn it on.
As pain_gwar described, I added the GameKit.framework to my Linked Frameworks and Libraries. This allowed my code to compile. Happy times.
Hello, did you have any trouble submitting your app to the store if you added the GameKit libraries without actually using Game Center? I heard some people had trouble with this.
Also, did you link it as “required” or “optional”?