Crash after using Apply unity plugin (GameKit-3.0.0)

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:

Answered by Fadi-Abuzant in 813641022

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

Make sure you follow all the instructions for setting up iCloud for your app on this page:

https://developer.apple.com/documentation/gamekit/saving_the_player_s_game_data_to_an_icloud_account

And follow all the instructions for setting up ubiquity containers on this page:

https://developer.apple.com/documentation/xcode/configuring-icloud-services

Accepted Answer

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

Crash after using Apply unity plugin (GameKit-3.0.0)
 
 
Q