Search Unity

Resolved App submitted to Mac App Store using Game Center features rejected - cannot be fixed

Discussion in 'macOS' started by rileycbdevelopment, Sep 11, 2021.

  1. rileycbdevelopment

    rileycbdevelopment

    Joined:
    Aug 16, 2020
    Posts:
    4
    Hello. I have been trying to submit an update to a live game on the Mac App Store that includes Game Center features, but it is constantly rejected and will not be approved.

    First of all, I signed and submitted a build with Game Center entitlements, only to have it rejected due to the app 'not linking against the GameKit framework.' I cannot find how I can make the build link to the GameKit framework manually. This is the message I received from the reviewer:
    "Guideline 2.1 - Performance
    Your app contains the Game Center entitlement, but it does not link against the GameKit framework.
    Next Steps
    If you would like to include Game Center, please link against the GameKit framework and submit an updated binary.
    Resources
    For information on Game Center, please review the Game Center Programming Guide."

    Trying to submit the app without the Game Centre entitlement does not work for obvious reasons, however the original version of the game was actually approved without this entitlement included, however the Game Center features just didn't work. Here's what they said when I tried resubmitting an update without the Game Center entitlement:

    "We found that your app incorrectly implements sandboxing.
    Specifically, we found that your app provides the following functionality but is missing the associated entitlement:
    - functionality: Game Center
    - required entitlement: "com.apple.developer.game-center"
    Next Steps
    Please update your app to include the entitlement required for the functionality, then submit your revised binary.
    For code-level assistance implementing sandboxing, contact Apple Developer Technical Support.
    Please see attached screenshot for details."

    Now as you can see they want me to include the Game Center entitlement, but this is not possible due to me being unable to 'link against the GameKit framework'.

    Basically, how can I force Unity to link the build against the GameKit framework? (Assuming this is the issue)

    Any help would be greatly appreciated as I have spent several hours over the past few days attempting to fix this and I cannot find a solution anywhere.

    Thank you

    EDIT:
    I think I found a fix. I found out I could manually link the GameKit Framework using Optool (A tool that comes with Unity Mac support that it uses to do this) with the following command:
    /Applications/Unity/Hub/Editor/<version>/Unity.app/Contents/PlaybackEngines/MacStandaloneSupport/optool install -c weak -p /System/Library/Frameworks/GameKit.framework/Versions/ -t <path to your .app>
     
    Last edited: Sep 12, 2021
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    Another option is to select "Create Xcode project" in the build settings, which will make Unity spit out a project instead of the built app. You can then modify the build settings before it's built.
     
    rileycbdevelopment likes this.
  3. rileycbdevelopment

    rileycbdevelopment

    Joined:
    Aug 16, 2020
    Posts:
    4
    Thanks for the reply. Yes I did try this and it makes the signing and framework linking process a lot easier, however how can we then build an .app file from Xcode. I could not work out how to make a working app from the Mac Unity built Xcode project.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,675
    It should produce an .app when you press "Build".
     
    rileycbdevelopment likes this.
  5. rileycbdevelopment

    rileycbdevelopment

    Joined:
    Aug 16, 2020
    Posts:
    4
    Thank you so much I should have gave Xcode another try! This works and is so much easier than messing around with certificates and Terminal for signing. I am able to submit the app with no problems now. Thanks once again.