Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

GameCenter Social api on Mac OS sandboxing problem

Discussion in 'Editor & General Support' started by Pharaoh35, Aug 26, 2014.

  1. Pharaoh35

    Pharaoh35

    Joined:
    Dec 25, 2012
    Posts:
    57
    Hi, I have a strange problem, I've developed a game with a game center functionality for ios and mac os. IOS version of game center works well, but when I build debug version and after that making as written here

    http://sookocheff.com/posts/2013-04-09-submitting-a-unity3d-game-to-the-mac-app-store/

    After installing new package I see my game in Applications folder, game runs well, but Game Center
    keeps silent. Help me please, what can I do wrong? IOS version works perfect!

    Which certificate should I use for debug build to test it localy? 1 or 2? scr.jpg
     
    Last edited: Aug 26, 2014
    rebolomo1 likes this.
  2. Pharaoh35

    Pharaoh35

    Joined:
    Dec 25, 2012
    Posts:
    57
    Solved! You need to use a second one Mac Developer certificate and the first one for distribution and also use this entitlements to allow Game Center

    <?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.security.temporary-exception.mach-lookup.global-name</key>
    <array>
    <string>com.apple.gamed.osx</string>
    <string>com.apple.gamed.xpc</string>
    <string>com.apple.developer.game-center</string>
    </array>
    </dict>
    </plist>
     
    Last edited: Aug 26, 2014
  3. Pharaoh35

    Pharaoh35

    Joined:
    Dec 25, 2012
    Posts:
    57
    Hi everybody, today I've received a rejection for my game, Resolution Center has two reasons for it:

    --------------------
    • 2.3: Apps that do not perform as advertised by the developer will be rejected
    • 2.31: Apps that are not sandboxed appropriately may be rejected
    2.3
    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.

    For information on Game Center, please refer to the Game Center Programming Guide.

    If you are using a third-party framework that links against the GameKit framework, you may wish to consult with them 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 source, you may be able to search the compiled binary using "strings" or "otool" command line tools. The "strings" tool can output a list of the 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.

    2.31
    We've determined that one or more temporary entitlement exceptions requested for this app are not appropriate and will not be granted:

    com.apple.security.temporary-exception.mach-lookup.global-name com.apple.developer.game-center
    com.apple.security.temporary-exception.mach-lookup.global-name com.apple.gamed.xpc

    We understand this may prevent the app from being approved for the Mac App Store. We encourage you to investigate other ways of implementing the desired functionality.

    See App Sandboxing for links to essential video and documentation to learn how to sandbox your application.
    Should you need code-level assistance implementing sandboxing, contact Apple Developer Technical Support.

    -------------------
    So
    , as I understand they don't found any game-center functional in my game, because I hide my leader-board button due the game-center availability. It means, that game center didn't launched well. Now I don't know the right way to use correct entitlements for my game to use game center. Previous post version is not approved by apple, if I trying to add just
    <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/>

    I have an error during uploading my game package by application loader. That I am using wrong entitlement for my provisioning profile. So, guys, write me here please the correct way of sandboxing my game for using game- center.

    Thank you!
     
  4. Pharaoh35

    Pharaoh35

    Joined:
    Dec 25, 2012
    Posts:
    57
    The same code was successfully accepted by ios app store, but rejected mac store version, so the problem is wrong entitlements to work game center properly on mac os. Still need help, if someone have experience with a game with game center. Thanks!
     
  5. Lockster

    Lockster

    Joined:
    Dec 15, 2015
    Posts:
    2
    Hi there,
    You only need the exception entitlement for it to launch on your machine in order to test it.
    Even though the release version without an exception won't launch on your machine, it will work perfectly fine once downloaded from AppStore.
    So, release version entitlements should look like this:
    <?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/>
    </dict>
    </plist>
    Game center will not work for AppStore users if there is an exception entitlementsas it essentially forces sandbox mode for game center.