Using Xcode (7.2), I wrote a simple iOS app based on UIDocument. (I am learning iOS.) The app works fine on my iPhone6s (9.2) -- it allows UIDocument edits as intended. Now I want to enhance the app so that it synchronizes documents across multiple iOS devices. My *first* action (before code changes) was attempting to turn iCloud capability "on", but red issues ⚠ show up and Xcode crashes. Strangely, I found that if I first change the bundle identifier from net.xxxx.foo to net.xxxx.foo2, then Xcode allows me to turn on iCloud capabilities. Huh? Why can't I add iCloud capabilities while using the same bundle identifier net.xxxx.foo?
Adding iCloud capability crashes Xcode
Do you already have the net.xxxx.foo App ID registered? Check in the Member Center to be sure. Xcode might be having a hard time associating your project with that existing ID.
Yes, the net.xxxx.foo App ID is already registered, because I installed that app onto my iPhone6s, and tested it successfully.
In step2, I made a trivial revision (changing a label in the storyboard) and then rebuilt/reinstalled the app onto my iPhone6s. Worked fine! So ... as a novice learning Xcode and iOS, I concluded that Xcode iOS developers can change their app whenever and however they want. Throughout step2, I made no changes to the bundle identifier or the App ID registration in member center.
Step3 of my lesson plan was to try using iCloud to synchronize UIDocuments across multiple iOS devices. So I tried to toggle iCloud capability ON but Xcode loudly said, "No!" To me, it seemed odd that I was allowed to change a storyboard label with no change to bundle identifier, but I was not allowed to add iCloud capability.
In summary: I misunderstand the rules for revising apps, or the care & feeding of App ID registrations. Can you recommend something for me to read? Can you spot the error in my thinking?
What specifically are the errors Xcode presents?
Log into the Member Center and check your App ID to make sure iCloud is enabled there. You can edit the App ID to enable iCloud if it's not already enabled.
Thank you. Since my last post, I installed net.xxxx.foo2 onto my iPhone and iPad, and edited documents on one device and then the other device, watching them update via iCloud. Quite nice.
I still don't know why net.xxxx.foo would not allow me to add the iCloud capabilities. The trail of clues may be too muddled at this point. Plus, I'm littering my Member Center with empty iCloud Containers while I thrash with different bundle IDs. (I see no way to delete useless iCloud Containers, so I guess they'll be my lifelong "tatoos".)
Seems to me that If I pursue this mystery any further, I should start fresh with a new project, and try to carefully reproduce my problem. Thanks bob133. If you have recommended reading that helps me understand the relationships between App ID, bundle identifier, product name, etc ... let me know.
I know the whole app ID/bundle ID thing is confusing—I had to figure it out too. This might help: Maintaining Identifiers, Devices, and Profiles.
Oh, and I've got several empty, useless iCloud containers hanging around too. Wouldn't it be nice if we could delete those? 🙂