AddiCloud bug?

Maybe XCode (12.3) changed something, but recently it seems like this code:

ProjectCapabilityManager projCapability = new ProjectCapabilityManager(projPath, "Entitlement.entitlements", targetGuid: pBXProject.GetUnityMainTargetGuid());
projCapability.AddiCloud(true, false, false, false, null);
projCapability.WriteToFile();

Results in

6729313--774529--Screenshot 2021-01-15 at 8.55.05 PM.png

I don’t think empty iCloud Container Identifiers should be added.

Using Unity 2020.2.1f1

1 Like

unity 2020 have bug in ProjectCapabilityManager AddiCloud method,ContainerIdValue need replace with ContainerIdKey PlistElementArray plistElementArray1 = (entitlementDoc.root[ICloudEntitlements.ContainerIdValue] = (PlistElement) new PlistElementArray()) as PlistElementArray;

Hi, How to add iCloud save feature to iOS game…I am having a tough time saving my game progress to iCloud. Are There any tutorials or links to this ?

Hi! rahulnaik9010

I belive u can find ur answer here:

forum.unity.com/threads/utility-library-ios-gknativeextensions-the-missing-ios-cloud-save-feature.643912

If you have an Apple Developer account go to: iCloud Fundamentals (Key-Value and Document Storage). There is information on how to set up the code for saving to iCloud. You can also find info on how to set up the xCode part, which requires you to create a container in iCloud.