TestFlight Build of Game not Working - Mac App

Ok, so I'm building with Unity and play testing in there and it's fine, no errors. I export a build to Xcode and build and run in there, I play the game extensively and it works fine. No errors reported.

Then when I archive and upload the game and download a TestFlight version - all of a sudden the main game action scene doesn't load. The loading screen is stuck and it doesn't fully load all features. The game background music is playing and only some interaction with menu items is available.

No crash.

What could be happening here?

  • It would be useful to have some guidance here. This is an issue with TestFlight or the Xcode Archive process. I am trying to release a game for the Mac Store this week. I'm on the latest version of Xcode and OS. I've tried on both Intel Mac and Silicon, same result.

Add a Comment

Replies

This is an issue with TestFlight or the Xcode Archive process.

Try this:

  1. In the Xcode organiser, find the exact archive that you uploaded to TestFlight.

  2. Click Distribute App.

  3. Select Development and click Next.

  4. Then follow the workflow from there.

The end result is a copy of your app with exactly the same code as your TestFlight build, but Development signed. Does this exhibit the problem?

If it does, you know that the issue with how your app was archived. OTOH, if it doesn’t show the problem, the issue is something to do with how your app was uploaded to the App Store and then processed for TestFlight.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thank you for responding and providing this insight. I have followed these steps and now I see the same issue and it's from archive. It's definitely not the way it plays on build - clearly an issue with how it is being archived.

Could you recommend any different settings? I have no idea how to archive it differently as its just an automated process.

I was required to enable 'App Sandbox' I'm not sure if that is the issue but it wouldn't archive without this enabled.

Ok, after further testing and exporting in development mode I have discovered that it is indeed enabling App Sandbox that is causing the issue. Problem is, Xcode won't let me archive to App Store Connect without this enabled?

I've even put an entitlements file into the folder but its still not working:

<?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/>
</dict>
</plist>

Xcode won't let me archive to App Store Connect without this enabled?

Right. Because the Mac App Store requires that all apps be sandboxed.

Enabling the App Sandbox applies a world of extra security restrictions to your app, and it’s hard to say which of those is triggering this issue. There are three ways you can approach this:

  • Look at your app’s own error handling for errors that are likely to be the result of a sandbox violation. For example, if you try to access a file outside of your sandbox, the open system call will return EPERM.

  • Look for sandbox violations and, if you find any, map them back to your original code. For info on how to do this, see Viewing Sandbox Violation Reports.

  • Consult the support resources for your third-party tools to see if there’s common lore about making the resulting apps compatible with the sandbox.

For general background on the App Sandbox, see App Sandbox Design Guide.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"