Search Unity

[URGENT]MAC App review team rejected because GameKit framework linked!

Discussion in 'Editor & General Support' started by BBRome, Aug 9, 2014.

  1. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Did you use the asset I told you from the asset store?
     
  2. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    @MobApps ,@Pharaoh35, I have almost the same problem. BUT my rejection message differs a little bit:

    The app links against the GameKit framework but has no apparent Game Center functionality. If we've missed functionality within your app that uses Game Center, please use the Resolution Center to describe where we can find this functionality.

    If you do not intend to use Game Center functionality, please unlink the GameKit framework, otherwise, if you intend to use Game Center functionality, please add the "com.apple.developer.game-center" entitlement and submit an updated binary.


    And YES, I'm using Social API in my game. And I tried the Unity Entitlements Tools also. No results. When I open the game for testing, nothing happens! But when I log out from GameCenter.app, the Game Center dialog shows up in my game. I enter the email and pass, the dialog disappears and then shows up again and again and again, until I press cancel. In the Console.app I have this deny mach-lookup com.apple.marco Did you guys have this problem while testing?
     
  3. Pharaoh35

    Pharaoh35

    Joined:
    Dec 25, 2012
    Posts:
    57
    Yes, it was waste of money.
     
  4. Pharaoh35

    Pharaoh35

    Joined:
    Dec 25, 2012
    Posts:
    57
    I have the same problem with a lot of login dialogs with mac os version only. iOS version of game works perfect!(same code)
     
  5. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    Hm..it's interesting, why Apple Team states that I do have linked GameKit and no functionality but in your case you have GS functionality without linked Gamekit.

    My iOS version also works perfectly. Maybe someone from Unity can give us an answer? Does anybody have an approved Mac OS version WITH Game Center functionality?
     
  6. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Not a waste of money, are you using it correctly.
    So did you tick the check box: Services: Game Centre????
    You need to fiddle with permissions and sandboxing.

    Thing is why keep complaining on here when you need to post a bug report to Unity if indeed its a Unity issue.
     
  7. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    I agree, this tool saves you about 10 minutes on doing code signing. But It doesn't matter whether you use it or not, the problem still exists. Probably it's a unity bug. By the way, how to file a bug report to unity?
     
  8. Pharaoh35

    Pharaoh35

    Joined:
    Dec 25, 2012
    Posts:
    57
    For me it was waste of money, because there is no difficult to sign build manually. You can find a lot of articles how to do it at the internet, the most problem is to write right entitlements, but it is easy to create native mac os app in xcode and take a look at all necessary entitlements. All other stuff is very simple. This asset is good for people who don't want to think and ready to pay in all strange situations. I've purchased it just because read posts here. And ofcourse I've checked GameCenter checkbox. The problem is still exists, and I am still waiting for the one who will be able to release build with GameCenter functionality for mac store.
     
  9. MobApps

    MobApps

    Joined:
    Aug 5, 2013
    Posts:
    17
    @MrEsquire, Yes i tick GameCenter, also contacted with Unity Emtitlement Tool Set. They also not aware of this issue. I mailed to Unity executive as well, but due to Christmas vacation I have to wait couple of days more.

    @Maxxxxxx ,
    I am getting same issue as above. Works fine in iOS with same code and approved as well.

    Hoping Unity will come with solution soon.
     
  10. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    The issue here is that Apple seems to be rejecting Apps which use GameCenter functionality but are not linking to the GC framework.

    Longer explanation:

    Looking back at this, this summer, Apple started rejecting Apps if they linked to GC without actually using it. Since Unity does not actually link the Unity standalone player when you build a player in the editor but only packages it with the game data files (we link it when we build the standalone player package for the editor), it is not known at link time whether GC will be used or not - so this is not something we can easily fix by correctly linking GC when linking the player. We talked to Apple back then and came up with the solution not to link GC into the player, but rather, to dynamically load the GC symbols at runtime. That way, the app did not appear to link against GC, and apps which did not use GC would pass App Store Validation again. We also did a test submission of an app which *did* use GC using this method, and it also passed at that point, so we concluded that Apple would not enforce actually linking the GameKit framework when using GameCenter. This was the change we shipped in 4.5.4 patch 1.

    But, looking at this thread here, it seems that now they *do* enforce actually linking GameKit when you want to use GC, thus preventing you from shipping a game which uses GC, which puts us back to square one. As a possible workaround, you could go back to a version of Unity before 4.5.4p1 (if you don't depend on newer functionality that is), and ship using that (as that would still always link against GC). We will look into solving this properly, but I don't know what the solution will be. The problem is on our radar now (I was not aware of it before now).
     
    twobob and MrEsquire like this.
  11. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    @jonas echterhoff , thanks for your response. Also, I thing you should choose testing on a local computer as a starting point. Because, as I mentioned earlier, When I open the game for testing, nothing happens! But when I log out from GameCenter.app, the Game Center dialog shows up in my game. I enter the email and pass, the dialog disappears and then shows up again and again and again, until I press cancel. In the Console.app I have this deny mach-lookup com.apple.marco. So, maybe the problem is here.

    And in my case the Review Team says that I do have a link against GameKit.
     
  12. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    @Pharaoh35 , @MobApps

    I looked a bit more into this, and how we could solve this, and here's a potential solution, to add the GameCenter linkage Apple requires to the binary post-build:

    1. get optool (git clone --recursive https://github.com/alexzielenski/optool)
    2. build it
    3. run:
    optool install -c weak -p /System/Library/Frameworks/GameKit.framework/Versions/A/GameKit -t <executable_path>

    This should probably work (you can only tell for sure once it passes MAS submission, of course), please give it a try, and let us know if it works. If it does, we might consider integrating this as part of our build pipeline.
     
    twobob likes this.
  13. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Which Unity version is this?
     
  14. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    4.6.1, OS X Yosemite 10.10.1
     
    Last edited: Dec 30, 2014
  15. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    I've just tried 4.5.3. Same results, can't log-in to game center while testing, nothing happens. But I've noticed that if I'm logged in to the GameCenter.app and press show leaderboards button in my game, the following window appears
     

    Attached Files:

  16. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    Before testing Game Center locally you should make sure your app is running in a sandbox. You can verify that in Activity Monitor by adding "Sandbox" column to the view.
     
  17. MobApps

    MobApps

    Joined:
    Aug 5, 2013
    Posts:
    17
    @jonas echterhoff, Thank you very much for looking into the issue. I will try with the older version of Unity and let you know what happens.

    As said by @Mantas Puida, please refer below link:
    http://forum.unity3d.com/conversations/game-center-social-api-issue-with-mac-app-store.421548/

    But I am not getting this from where and how I can get the solution if my app is not running in "Sandbox". This is the first time I am hearing this. I submitted many games to MAS, but facing this issue first time.
     
  18. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    I've just double checked with Activity Monitor. The sandbox flag: YES. So the game is running in sandbox mode. I have the following entitlements:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>com.apple.security.app-sandbox</key>
    <true/>
    <key>com.apple.security.network.client</key>
    <true/>
    <key>com.apple.security.network.server</key>
    <true/>
    <key>com.apple.developer.game-center</key>
    <true/>
    <key>com.apple.security.device.usb</key>
    <true/>
    <key>com.apple.application-identifier</key>
    <string>xxx.com.company.appname</string>
    </dict>
    </plist>

    Also I codesigned with the following certificates:
    Mac Developer: Company Name and Developer ID Installer:Company Name for the package creation.

    So, everything seems to be correct, but doesn't work
     
  19. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    I will be forwarding this to our QA. Btw, which OS X version are you testing on?

    In general I think there are two kinds of problems we should address:
    a) GameCenter not working for locally signed apps
    b) submission rejections for not being linked with GameKit.framework

    For b) please give it a try workaround Jonas mentioned above and let us know if it helped.
    Thanks for your help tracking down issues!
     
  20. MobApps

    MobApps

    Joined:
    Aug 5, 2013
    Posts:
    17
  21. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    @MobApps , it looks like you have a problem with project dependencies. I'm not a github user, so I don't know how to download project with dependencies. But I downloaded and installed a github.app and after that I was able to download optool, build and run it. So, try this method, it should help. But, as I said earlier, this tool doesn't work for me.

    I have 10.10.1 as well and Unity 4.6.1
     
    Last edited: Jan 2, 2015
  22. MobApps

    MobApps

    Joined:
    Aug 5, 2013
    Posts:
    17
    @Maxxxxxx, Thanks for the info. Now we have only one option that wait for new version of Unity.
    @Mantas Puida,
    Yes, you are right. Please let us know once there is any update. Eagerly waiting.
     
  23. Pharaoh35

    Pharaoh35

    Joined:
    Dec 25, 2012
    Posts:
    57
    The problem is there were some bugs with a native resolution during fullscreen start up with a lower versions, so it is impossible to use:(
     
    Last edited: Jan 2, 2015
  24. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    It still looks like Maxxxx has a different problem from yours, and I still believe yours should be fixable using optool. It seems like that fails to build because the github clone fails. I don't know why that might be, though.
     
  25. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Please try the suggested solution using optool.
     
  26. MobApps

    MobApps

    Joined:
    Aug 5, 2013
    Posts:
    17
    I downloaded github app from https://mac.github.com/, signed up on github and then only I am able to clone optool. Now the build is successful. Applied your solution and good news...my game is approved by MAS.
    Here is the link: https://itunes.apple.com/us/app/sports-car-track-racers-real/id950630954?ls=1&mt=8

    Thank you very much.
     
    Last edited: Jan 7, 2015
  27. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Good news, thanks for sharing. I will see how hard it is to make this step automatically be applied by Unity when building a player.
     
  28. MobApps

    MobApps

    Joined:
    Aug 5, 2013
    Posts:
    17
    Yes. It will be easy for you :)

    And I have one more question that why this solution not working on locally signed app? I think for local testing there may be different workaround. Am I correct?
     
  29. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    How is it not working for a locally signed app?
     
  30. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    Nothing changed with the locally signed app using optool. I still can't login to the game center. It keeps asking me for email and pass. However I will try to approve it to the MAS and will let you know about the result soon.
     
  31. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    I've just got feedback from appstore review team:

    2.2: Apps that exhibit bugs will be rejected
    2.2
    Here is how we found this bug:

    When clicking on the Game Center button on the main menu, the Game Center login dialog appears, and then nothing more happens after the user logs in. No leaderboards are displayed.


    @MobApps , could you please describe your packaging steps, entitlements,etc. I really need help.
     
  32. Klamore74r

    Klamore74r

    Joined:
    Dec 19, 2014
    Posts:
    5
    Any new about that? We still waiting.

    We using 4.5.6f1 on Mac Yosemite 10.10.1 and We are trying to build an update for game that use GameCenter, but still have problem with leaderboards (not showed when called) and also the app was rejected for gamekit link:

    2.2 Apps that exhibit bugs will be rejected
    Here is how we found this bug: When clicking on the Leaderboards or Trophies buttons, nothing happens.

    2.3 Apps that do not perform as advertised by the developer will be rejected
    The app does not link against the GameKit framework, but has Game Center functionality.

    No news about this bug on the Patch 4.6.1p4? What is the official solution for this issues?

     
  33. jerrodputman

    jerrodputman

    Joined:
    Jun 4, 2008
    Posts:
    181
    Oh good, this is finally being looked at. I filed a bug report back on December 9th about this issue (case #654544), but of course, as with pretty much all Unity bug reports, it never got looked at.

    So we ended up shipping without Game Center support, and whenever users ask me why the game doesn't have Game Center support, I just tell them that it's an issue with our engine provider Unity, and there's nothing we can do to fix it.

    It's alright though. We're already using Unreal for our next project anyway.
     
  34. Bulwark-Studios

    Bulwark-Studios

    Joined:
    Sep 20, 2013
    Posts:
    18
    Hi!

    We had te same problem.
    Apple rejected our app several times because of the app didn't link against the GameKit Framework.

    We try this workaround:

    get optool (git clone --recursive https://github.com/alexzielenski/optool)
    build it
    run: optool install -c weak -p /System/Library/Frameworks/GameKit.framework/Versions/A/GameKit -t <executable_path>

    Steps:
    1. You need to build your .app with Unity.
    2. Execute the command above.
    3. Codesign your app with the right entitlements.
    4. Submit to iTunesConnect.

    Our app has been validated one day ago.

    Unity needs to communicate about that.
     
  35. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    @Bulwark Studios , did you include embedded.provisionprofile in your bundle while signing? I'm asking because if I do signing only(without including this file) I get the following error when deliver the app to iTunesConnect :
    Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile:'com.apple.developer.game-center'
     
  36. Bulwark-Studios

    Bulwark-Studios

    Joined:
    Sep 20, 2013
    Posts:
    18
    We use the "Mac App Store Toolset" plugin for Unity to codesign the app : https://www.assetstore.unity3d.com/en/#!/content/9231
    It's a great plugin by the way.

    I don't remember if you need to include the provisionning profile in the bundle when you codesign the app manualy.

    Try to generate new provisionning profiles from the "Apple dev center".
    If you enable or disable the GameCenter in your AppId settings (Apple dev center) you need to regenerate new provisionning profiles maybe that's the problem.
     
  37. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    Thanks for your advice! Maybe AppID is a problem, I will try
     
  38. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    @Bulwark Studios did you try to test Game Center in your game on your Mac, does it work locally?
     
  39. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    I had to resubmit my game to the Mac App Store so I upped the version number in iTunes Connect and in Mac App Store Toolset from 1.0.5 to 1.0.6. Built and uploaded the .pkg file. But I keep getting invalid binary from iTunes Connect. In Mac App Store PIPELINE tab under SHARED SETTINGS I initially set Version Number to 1.0.6, and Build Number to 1. When uploaded to iTunes Connect this showed up as 1.0.6 (1) which is good in my opinion. This causes an invalid binary. Looking at the plist I see that:

    CFBundleVersion = 1 and CFBundleShortVersionString = 1.0.6.

    That is what's causing the error according to Apple. CFBundleVersion needs to be 1.0.6. So to make that happen, in iTunes Connect I upped the version number again to 1.0.7, and in Mac App Store I set both
    Version Number and Build Number to 1.0.7. Built and uploaded the .pkg file. And AGAIN I got invalid binary.

    What the heck is going on. A week ago I didn't have these problems.

    Here's what Apple says:

    Dear developer,

    We have discovered one or more issues with your recent submission for "TOT 3". To process your submission, the following issues must be corrected:

    Invalid or Non-Increasing CFBundleVersion - The value specified in the bundle's Info.plist file for the key CFBundleVersion must be a string consisting of any number of dot-separated components, where each component is composed only of the digits 0 through 9. For example, any of the following are syntactically valid values for CFBundleVersion: "1.0", "4.2.1", "5545.12", "1.4.0.0.5"; whereas the following are all syntactically invalid: "GX5", "3.4.2b6", "2.6GM", "1.0 (Gold)", "-3.6". Additionally, each updated version of the same application must have a CFBundleVersion that increases relative to that of the previous version that was actually made available for sale on the iTunes Store. For example, if a previously-available version had a CFBundleVersion of "1.4", then any of the following would be acceptable as the next update: "1.4.0.0.0.0.5", "1.4.1", "1.4.332", "1.5"; but all of the following (though syntactically valid) would be unacceptable: "1.4", "1.3", "1.3.99999", "0.9". For more information about the CFBundleVersion key and the Info.plist file, see Apple's Runtime Configuration Guidelines athttp://developer.apple.com/library/ios/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html
     
  40. Bulwark-Studios

    Bulwark-Studios

    Joined:
    Sep 20, 2013
    Posts:
    18
    Yes it worked locally too.

    You just need to codesign the app with a developper provisionning profile instead of a appStore provisionning profile and try the app.

    We had some issue to activate the GameCenter Mac Sandbox with our Mac.
    I need to force the sandbox mode with some commands line:

    defaults write com.apple.gamecenter GKUseSandboxServer 1
    killall -9 gamed


    More informations here : https://devforums.apple.com/thread/258219?tstart=0

    I didn't use the Social API from Unity to manage achievements / leaderboards ... I use the GameCenter Mac plugin from prime31. I don't know if this had an impact.
     
  41. Pharaoh35

    Pharaoh35

    Joined:
    Dec 25, 2012
    Posts:
    57
    App is approved successfully, but Social.ShowLeaderboardUI(); ii not shows window. Social.localUser.authenticated is true, also I can see GameCenter Welcome message on game loading. What can be wrong? I am using Jemast tool for code signing and entitlements.
     
  42. Tiberius1701

    Tiberius1701

    Joined:
    Sep 16, 2014
    Posts:
    71
    My app has also failed with the:
    The app has the Game Center entitlement without linking against the GameKit framework.

    I tried downloading and building optool as was mentioned in this thread, but it has multiple errors in the latest Xcode.

    For now, this is the only bug keeping my app from being approved, and I am fairly frustrated that there is no good solution available. I am using Unity 4.6.1. If anyone can help, it would be greatly appreciated.
     
  43. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Unity 5 will automatically add or remove the GameKit linkage as needed if GameCenter if used or not. So updating to Unity 5 would fix this issue. Alternatively, the optool trick mentioned here works - if you post the errors you have in XCode here, maybe someone can help figuring out why it does not build for you.
     
  44. Tiberius1701

    Tiberius1701

    Joined:
    Sep 16, 2014
    Posts:
    71
    So my resubmission failed too, with the same error after using Unity 4.6.4. Trying the optool route again -

    The optool errors I get are:

    optool 2 issues
    Apple Mach-O Linker (Id) Error
    "_OBJC_CLASS_$_FSArgumentSignature", referenced from:

    Apple Mach-O Linker (Id) Error
    Linker command failed with exit code 1 (use -v to see invocation)

    Thank you for any help with this.
     
    Last edited: Apr 10, 2015
  45. Maxxxxxx

    Maxxxxxx

    Joined:
    Dec 27, 2014
    Posts:
    14
    I also confirm that GS works with optool but Social.ShowLeaderboardUI() doesnt. The same issue as @Pharaoh35 mentioned above. I'm using Unity 4.6.4
     
  46. Muguruza

    Muguruza

    Joined:
    Dec 4, 2014
    Posts:
    2
    My MacOS game got rejected too, below what the Apple Review Team said:

    "The app still links against the GameKit framework but has no apparent Game Center functionality."

    Which is true, I don't use Game Center at all. Could I use the optool to unbind the GameCenter or something?. I thought on adding Game Center from the Apple Dev Portal, create new certs and sign the app with that but I fear that if they review the game and they see I don't use Game Center at all they will reject it again... somebody knows if that could happen?.

    Thanks!
     
  47. paramama

    paramama

    Joined:
    May 10, 2014
    Posts:
    6
    In Unity project we used Mac PrimeGameCenter plugin, but he doesn't work. And we deleted GameCenter from project

    I used the "Mac App Store Toolset" plugin for Unity to codesign the app :https://www.assetstore.unity3d.com/en/#!/content/9231
    Also used optool (git clone --recursive https://github.com/alexzielenski/optool)
    But Apple rejected our app:
    Unity: 4.6.3
    How resolve this problem?
     
    Last edited: Jun 1, 2015
  48. Mantas-Puida

    Mantas-Puida

    Joined:
    Nov 13, 2008
    Posts:
    1,864
    I believe it tells that you still have Game Center mentioned in entitlements generated by "Mac App Store Toolset". Try disabling it in that tool.
     
  49. paramama

    paramama

    Joined:
    May 10, 2014
    Posts:
    6
    Of course i disabling it in Mac App Store Toolset. I looked all code and anywhere deleted GC code
     
  50. paramama

    paramama

    Joined:
    May 10, 2014
    Posts:
    6
    And i have another question: i tried to use Prime GameCenter Plugin. But he doesn't works: if to open mac gamecenter and then launch the app, all works fine. But if i don't opened mac gameCenter and launched the app, all gc functionality not worked. Prime says, that problem in Unity or Apple.
    Prime Mac GC plugin: the latest
    OS X Yosemite
    Unity: 4.6.3
    How resolve this problem?