Problem with "Add iCloud Containers to you App ID"

Hi guys!
I just have this error in latest version of xcode.

I have compiled without problems in early version.
I got Include CloudKit support in developper account in this game
What should i do right now?

1 Like

Downgrade to Unity 5.6 and works like a charm :stuck_out_tongue:
edit…
The problem comes with 5.4 and 5.5 every time you export to xcode with package name setup correctly. Instead of this, if i export my project to xcode with a bad package name and then fix the name in xcode you can get with out problem the cloud id from cloud store kit.

2 Likes

I had this problem and MrPacoGP has the a solution which works (thanks!)

However rather than exporting with a bad package name, just go to the General tab in Xcode and add an β€˜x’ or whatever to your Bundle Identifier. Go to the Capabilities Tab and the error will have gone from the iCloud. Go back to the General tab and remove the β€˜x’ so the Bundle Identifier is correct again. Go to the Capabilities tab and set the iCloud stuff which will be now error free.

So same solution but just keeps it within Xcode :slight_smile:

2 Likes

ZOMG! I spent about 2 hours on this problem in Xcode on a regular xcode project, found this when searching for the same answer, thank you MrPacoGP, changing the bundle id to something else then hitting enter, going to the cloud kit it then has checkmarks for everything, go back and change the name back to the correct bundle ID and everything is working.

2 Likes

you save my life

1 Like

Just worked for me with XCode 9.3!

Spent almost day to find out the problem. you save me BOSS! :slight_smile:

This looks like the Unity issues. Did anybody was able to solve it without downgrading to 5.6 or making crazy moves with bundle id?

I was very sceptic before I tried it. But then again, I did experience some other stuff requiring this kind of fix. And guess what? It works! Thanks for the tip m8.

This works thank you.

I was having this problem as late as mid 2019, this solution still worked for me !

EDIT: Also worth to know!!! this created an extra icloud.company.gameX cloud container in my online dashboard, which cannot be deleted, quite annoying.

I had a similar issue and what helped me was setting a PRODUCT_BUNDLE_IDENTIFIER in Build Settings in Xcode to be equal to the bundle id.

I made a function that will set that setting automatically when I export the build so that I don’t have to do it manually:

[PostProcessBuild]
public static void AddBuildProperty(BuildTarget buildTarget, string pathToBuiltProject)
{
    PBXProject project = new PBXProject();
    string sPath = PBXProject.GetPBXProjectPath(pathToBuiltProject);
    project.ReadFromFile(sPath);
    string tn = PBXProject.GetUnityTargetName();
    string g = project.TargetGuidByName(tn);

    project.AddBuildProperty(g, "PRODUCT_BUNDLE_IDENTIFIER", Application.identifier);

    File.WriteAllText(sPath, project.WriteToString());

}
1 Like