tldr: My conclusion: there is some kind of critical bug related to UnityWebRequest and iOS 15. Here are the details:
What happens
-The app initializes and loads up. After about 5 seconds, the app freezes.
-The OS does not kill the App.
-But all Unity events (i.e., Update() etc.) stop firing.
-Starting the game in Airplane mode allows it open up normally without getting stuck.
More details
-Upon starting or resuming, the game makes a call to PlayFab to login, using a UnityWebRequest.
-If the app starts in Airplane mode, the login gracefully fails, and the game opens normally.
-If the app is put into the background, then airplane mode is turned off, then you reopen the app: it triggers another login, which freezes the app. This isolates the problem to the PlayFab calls, which are fairly simple and utilize UnityWebRequest.
Debug data gathered
-Since there is no crash, there is no stack trace.
-I have never reproduced the issue in dozens of installs on my own devices.
-Occurs for about 1% of users on iOS after after installing an update for the game. Sample size is over 100k downloads.
-It can also happen to players the first time they download the game.
-Happens on all devices types.
-Happens only on iOS 15.x.
-The game currently has over 100k downloads, and this issues has never occurred on Android or Steam, only iOS.
What fixes it
-Reinstalling the game fixes the issues.
-Offloading and re-downloading the game ALSO fixes the issue.
-This rules out the possibility of the problem being save-state related, or related to my code at all.
What I’ve tried
-Unity 2019, Unity 2020, and Unity 2021
-Updating all sdks, etc.
-Removing all 3rd party sdks and plugins except for PlayFab
-About to try using xCode 12.5 instead of xCode 13
Could it be the PlayFab sdk?
-I am skeptical that the PlayFab sdk has a bug this critical, but it is possible.
The central mystery to me: what kind of issue would offloading + re-downloading the game fix?
Curious if anyone might have some insight or ideas!