Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

App links against the GameKit framework, reject by Apple Reviewer!

Discussion in 'macOS' started by Oscar-Tsang, Jul 26, 2018.

  1. Oscar-Tsang

    Oscar-Tsang

    Joined:
    Nov 7, 2012
    Posts:
    78
    How to unlink the GameKit framework?

    My game do not need game center, but the Unity generated osx build contain GameKit framework Lib.
    Apple request my to unlink the GameKit framework, how can I do?

    Unity version 2018.2, mono build.

    P.S. Using IL2CPP build will direct reject on uploading file to Appstore, because the include some lib only support i386, and do not have x64.
     
  2. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    613
    Same with me. ERROR ITMS-90240: "Unsupported Architectures. i386
     
  3. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    613
    Remove GameKit with a hack:
    Code (CSharp):
    1. HACK TO REMOVE GAME-CENTER LIBRARY FROM BUILD. (failed submission for this)
    2.  
    3.    
    4. Download MachOView http://sourceforge.net/projects/machoview/
    5.    
    6. Open the binary in Contents/MacOS
    7.    
    8. Expand the "Load Commands" section
    9.    
    10. Look for LC_LOAD_WEAK_DYLIB (GameKit)
    11.    
    12. Notice the command size is 88, we need to find a same length framework to replace it, we'll use Webkit
    13.  
    14. Change Command Data to 0x0000000C
    15.  
    16. Change Current Version to 0x02194A09
    17.  
    18. Change Name to 0x2F53797374656D2F4C6962726172792F4672616D65776F726B732F5765624B69742E6672616D65776F726B2F56657273696F6E732F412F5765624B697400
    19.  
    20. File -> Save
    21.    Run
     
    Xander-Davis and ugur like this.
  4. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    613
    .NET 4.x with both MONO and IL2CPP fails because the include some lib only support i386, and do not have x64.
     
  5. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    613
    I confirm that only .NET 3.5 MONO works, it should pass with the above GameKit framework hack. Unity guys and girls please check this.
     
  6. giorgos_gs

    giorgos_gs

    Joined:
    Apr 23, 2014
    Posts:
    613
    Forgot to say that I use latest Unity 2018.2.0f2 mac
     
  7. Oscar-Tsang

    Oscar-Tsang

    Joined:
    Nov 7, 2012
    Posts:
    78
    No Unity guys there? Why no Unity people reply it.
     
  8. Davlin

    Davlin

    Joined:
    Feb 19, 2013
    Posts:
    55
    Same issue...
    Unity 2018.2.0
     
  9. AMA_MR

    AMA_MR

    Joined:
    Mar 23, 2018
    Posts:
    17
    Same issue here. I've applied giorgos_gs' fix with the minor update that the latest WebKit version is 025C0407 , and the command I found is LC_LOAD_DYLIB, rather than LC_LOAD_WEAK_DYLIB.
     
  10. virgilcwyile

    virgilcwyile

    Joined:
    Jan 31, 2016
    Posts:
    72
    Same issue with latest Unity,
    From Apple
    Guideline 2.1 - Performance


    Your app links against the GameKit framework but does not appear to include Game Center functionality.

    Next Steps

    If your app does include Game Center functionality, please respond to this message in Resolution Center with steps on how to locate it within your app.

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

    Resources

    For information on Game Center, please review the Game Center Programming Guide.

    If you are using a third-party framework that links against the GameKit framework, you may want to contact the third-party framework provider for help on unlinking from it.

    Alternatively, this framework may reside in a library included with your application. If you do not have access to the library’s course, you may be able to search the compiled binary using "strings" or "otool" command line tools. The "strings" tools can output a list of methods that the library calls and "otool -ov" will output the Objective-C class structures and their defined methods. These techniques can help you narrow down where the problematic code resides.
     
  11. Oscar-Tsang

    Oscar-Tsang

    Joined:
    Nov 7, 2012
    Posts:
    78
    Roll back to 2017! Forget 2018.

    Unity don't care you can submit to app store or not. Up to now no Unity person reply this.
    Some guys said no one force you publish to app store.
     
  12. BrainAndBrain

    BrainAndBrain

    Joined:
    Nov 27, 2014
    Posts:
    115
    Has anyone reported this as a bug to Unity? It's obviously a problem.

    Unity folks, can we get an official response?

    Thanks!

    - David
     
  13. AMA_MR

    AMA_MR

    Joined:
    Mar 23, 2018
    Posts:
    17
    That shouldn't be necessary- the fix that giorgo_gs outlined a few posts above seems to work pretty well.

    Obviously a patch to unity itself would be appreciated, but rolling back to 2017 isn't needed.
     
  14. BrainAndBrain

    BrainAndBrain

    Joined:
    Nov 27, 2014
    Posts:
    115
    My game was just approved, and no removal of GameKit was necessary. It was built with Unity 2018.2.8f1. Perhaps a plugin is actually what's causing the issue?
     
  15. Oscar-Tsang

    Oscar-Tsang

    Joined:
    Nov 7, 2012
    Posts:
    78
    My last try is 2018.2.2, after fail to review. I have rolled back to 2017. Haven't try any more. But I monitor unity new release week by week. Do not see any release note said solved the GameKit problem.

    Is Unity silently solve this problem and do not claim it is bug? or You just pass the apple review by lucky?

    I don't know....
     
  16. jkampitakis

    jkampitakis

    Joined:
    Dec 27, 2015
    Posts:
    56
    Same issue here...
     
  17. JariHuomo

    JariHuomo

    Joined:
    Feb 8, 2013
    Posts:
    44


    Unity 2018.3.b8 app rejected too. Created empty project , GameKit is linked in UnityPlayer.dylib . So looks definitely a Unity Bug. Sending a bug report.
     
  18. JariHuomo

    JariHuomo

    Joined:
    Feb 8, 2013
    Posts:
    44
  19. JariHuomo

    JariHuomo

    Joined:
    Feb 8, 2013
    Posts:
    44
    This hack works with 2018.3 too, update approved.
    The file that needs to be modified with 2018.3 is UnityPlayer.dylib

     
    Xander-Davis and sandeeprana like this.
  20. skirtz1

    skirtz1

    Joined:
    Mar 8, 2015
    Posts:
    20
    My app was approved today after applying the hack above to my executable in Contents/MacOS. Unity should fix this bug asap, it is a showstopper, please upvote the bug as well.
     
    Xander-Davis and sandeeprana like this.
  21. jason_yak

    jason_yak

    Joined:
    Aug 25, 2016
    Posts:
    472
    Isn't it about time the mac app store was treated as a legitimate platform? At the very least can Unity please please add the option to export to an xcode project just like the export to project option you offer for Android and iOS? The current delivery process for mac apps is terrible, meanwhile Apple are making great strides in growing the platform. ^ These kinds of hacks are just silly. But anyway.. thank you all for figuring this out.
     
    Xander-Davis likes this.
  22. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    I'm running into the same issue now. My build was rejected because of GameKit.

    First of all the Unity guide on how to prepare your app for macOS App Store submission is about 60% current-- I had to search for workarounds to fix the rest. It took me several days just to get a .pkg that could upload at all via Application Loader and then wasn't immediately rejected by Apple right after at the Application Loader stage but before the AppStore Connect submission.

    Secondly, this GameKit / GameCenter bug is OLD-- I'm seeing posts from as far back as 2014 about it.

    Why doesn't Unity understand we should be able to just push a button, get a packaged binary we can upload with Application Loader to the macOS App Store. That should be a checkbox on the Build Settings. Or, yes, at the very least, create an Xcode project like iOS and tvOS and go from there. This current delivery process where we literally have to use terminal to hack our apps is insane.
     
    Last edited: Jan 23, 2019
  23. BrainAndBrain

    BrainAndBrain

    Joined:
    Nov 27, 2014
    Posts:
    115
    You are correct, it is insane!

    In the meantime, this guide may be of some use: https://github.com/UNSH/Unity-Apple-Distribution-Workflow

    Also, the bug may be caused by a plugin, rather than Unity itself. I would try submitting a dummy bare-bones project and see if it makes it all the way through Application Loader. Then start hacking away at your plugins.

    Good luck! Hopefully Unity will add an option to build an XCode project soon.
     
    Xander-Davis likes this.
  24. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    So I'm wondering-- is it easier to remove GameKit or is it easier to add GameCenter functionality? And if the latter, oh god, how do I do that now when all I wanted to do was ship yesterday? lol
     
  25. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    I tried an alternate build where I don't do this hack and instead submitted it to the App Store with GameCenter (and iCloud) turned off on the App ID. When creating an App ID, these are turned on by default and this didn't create a problem with the iOS and tvOS builds, even if your app doesn't use them (as is the case here with macOS). I figured I'd want these on with the App ID anyway because it'd be nice to use these services in the future, if not now, and turning them off brings up a pop-up in Apple Developer that you are about to invalidate the App ID by turning them off. I figured, it's worth a try to switch them off and resubmit. So by the time my macOS submission goes into Review (probably around 12 hours from now) we'll see if that's all it was at this point and if that actually gets approved...

    Now to work ahead assuming it will fail, I'm trying the hack (notes below):

    EDIT: Ok, I think I figured out how to do these instructions with some consolidation/updating to process from all of our previous posts here:
    • Download MachOView http://sourceforge.net/projects/machoview/
    • UPDATED: Open the binary in Contents/Frameworks/UnityPlayer.dylib
    • Expand the "Load Commands" section
    • UPDATED: Look for LC_LOAD_DYLIB (GameKit)
    • Notice the command size is 88, we need to find a same length framework to replace it, we'll use Webkit
    • FLAG: Change Command Data to 0x0000000C (it's already this now though...)
    • UPDATED: Change Current Version to 0x025C0407
    • Change Name to 0x2F53797374656D2F4C6962726172792F4672616D65776F726B732F5765624B69742E6672616D65776F726B2F56657273696F6E732F412F5765624B697400
    • File -> Save
    Offhand it was really hard to tell from looking at that last step if Name was any different. They appeared virtually identical just from a glance. Maybe that’s part of the trick.

    It's also worth noting that I'm just pasting in values after the 0x as nothing is listed with the 0x in the editor.

    It's also unclear if this only works with .NET 3.5 (Deprecated and Doomed!) or if no one has yet to test it with .NET 4.x and post whether that works or not. I'm currently trying in .NET 4.x, Unity 2018.3.2f1. Mario voice: "Here we gooooo!"

    I am able to get all the way through codesigning, packaging, and uploading via Application Loader, with processing completing on the build, selecting the build from App Store Connect, and finally submitting the app itself fully to Apple for final approval to go live. So we seem to have green lights all the way until an actual Apple human finally checks the App Store submission that we get the rejection due to GameKit.

    Once my current submission will almost certainly fail tomorrow from my undoubtedly naive and feeble App ID GameCenter switch-off attempt (haha), I'll try submitting the build with the hack instead and report the results. I shall lull myself to sleep tonight with fantasies that this all just works.
     
    Last edited: Jan 25, 2019
    markachten88 likes this.
  26. Pelican_7

    Pelican_7

    Joined:
    Nov 25, 2014
    Posts:
    190
    Just FYI, I was rejected a few days ago for GameKit linkage with Game Center OFF on the App ID. Sorry to be the bearer of bad news... :D

    I have since been accepted however by altering the UnityPlayer.dylib's load commands to replace the GameKit command with another of the same size (although I didn't link to WebKit as above).
     
    Xander-Davis likes this.
  27. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    Thanks for the tip! Mind sharing what you did link to instead of WebKit if that's not too sensitive? Might help others have an alternative if for whatever reason WebKit stops working as a solution? Was there a reason you tried something different at all?
     
    Last edited: Jan 25, 2019
  28. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    LOL As of this morning with Unity 2018.3.3f1 it appears Unity has removed GameKit to avoid this bug!!!

    https://unity3d.com/unity/whats-new/2018.3.3

    To Unity devs, THANK YOU. I am going to try a submission built from 2018.3.3f1 now.
     
    Pelican_7 likes this.
  29. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    Submission was Approved! The fix in 2018.3.3f1 works!
     
  30. virgilcwyile

    virgilcwyile

    Joined:
    Jan 31, 2016
    Posts:
    72
    Xander-Davis likes this.
  31. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    306
    Is there a working workaround for Unity 2020.3.13?
     
  32. wagenheimer

    wagenheimer

    Joined:
    Jun 1, 2018
    Posts:
    306
    I think I have a fix for it!
    Working on Unity 2019.3.13f1

    Open your .entitlements files on XCODE and add :

    com.apple.developer.game-center

    And set the value to NO

    My game was just approved with this change.
     
  33. Nickjd331

    Nickjd331

    Joined:
    Aug 22, 2014
    Posts:
    29
    I just tried wagenheimer's fix on 2020.3.25 but sadly that didn't resolve the issue for me.

    I still got the same response from The App Store review team about the Game Center entitlements.

    Does anyone have alternative ideas?

    It's worth mentioning that I have had luck other times with submitting the same app, so it seems random whether Apple pick up on the issue or not.
     
  34. Nickjd331

    Nickjd331

    Joined:
    Aug 22, 2014
    Posts:
    29
    Is there any news on a fix for this?