Hi,
I tried to save the game progress using the official Apple plugin for Unity but the crash happened when I active the "iCloud Documents" inside capabilities and when deactivated it this error message appeared:
Code=27 Domain=GKErrorDomain Description=The requested operation could not be completed because you are not signed in to iCloud or have not enabled iCloud Drive. (UbiquityContainerUnavailable)
Authentication with Game Center works fine using the Core plugin, but nothing works correctly when I use the GameKit plugin.
Note: I already active iCloud for app Identifier.
Tichnecal informations:
- Unity version: 2022.3.47f1 LTS
- XCode 16
- Swift 6
- GameKit-3.0.0 (Apply unity plugin)
- Core-3.1.5 (Apply unity plugin)
I found the solution.
Since Unity tries to optimize the game size they have an option to remove unused or unreachable code that is called "Managed Stripping Level".
This option removes some files from GameKit, one of them Default constructor for type Apple.GameKit.GKSavedGame
to avoid this you have to change this option from Low to Minimal
for more information Link