Our app just works fine, but every time the user closes it (swipes it out), a crash message appears after about 10 seconds. Even if I share the crash report with TestFlight, it only includes a simple JSON file, but no detailed description what happened, so I have no clue what is going on.
The app does not show crash messages if opened from Xcode or from the App Store. Only TestFlight seems to be affected.
I did some more tests and noticed that the problem appears less likely when you bring the application to the background first and then - after a while - close it completely. If you do close it directly - by flicking it out of the screen - the error message appears nearly every time. It seems as if some Unity-internal teardown needs longer than 10s in this case.
I learned in the meantime that this problem also affects the production app. In this case, the crash message is not being shown. However, if you try to open the app again before waiting 10 seconds, nothing will happen. Only after this time period, the app will show up again. You only notice this if you close the app and try to open it again immediately.
Glad I am not alone. Any chance to raise this to Unity’s attention? It’s pretty annoying that a production app gets delayed on startup just because a previous instance is somehow running in the background. I am using some networking code based on BestHTTP, maybe that’s the reason? Does anybody else use this kind of async code?
I got the same problem with the release app on Testflight with [Unity-2018.4.10f1] but it just crashed when I kill the app in landscape mode, no crash if I kill the app in portrait mode. If I build the app directly into the phone via Xcode, the crash also won’t happen.
Are you sure the crash doesn’t happen? I noticed that it does, but it is not reported (at least if I open the app from the App Store). You can test it easily: Open your app, and close it completely. Then, try to start it again. If this second start takes approx 10 secs (and nothing is happening), then iOS is waiting for the timeout and will let the app crash internally afterwards. Only then it actually starts up.
I am encountering the exact same issue: crash 5s after closing the application. Using Unity 2021.3.2f1 & Xcode 14.1.
Like @waldgeist ,our app is on Testflight and I also noticed that bringing the app to background first, waiting a bit, and then closing it does not result in a crash. Worth noting is that the crash popup only appears for our users on testflight but not on our adhoc dev builds. But crash logs on the device confirm that it occurs for both.
Would really appreciate any help I can get on this.