Search code examples
iosobjective-ciclouduimanageddocument

App stops debugging if I change the iCloud switch under Documents And Data. Keeps running on the Phone


I am integrating iCloud in my App using an UIManagedDocument. The PSC options are set when the document is initialized, and because I am debugging I always force the app to use iCloud whithout asking the user.

Everythings seems to work as expected but if on the phone or the pad I go to:

Settings -> iCloud -> Document & Data

and I turn off (if on) or on (if off) the UISwitch related to my App, it crashes without explanations.

What should I check/investigate? Am I supposed to intercept some kind of notification and do something?

Note: I am targeting iOS7 and from the documentation I understood the UIManagedDocument handling from local to ubiquity is handled automatically now, isn't it?

*Additional info: There is not exception in XCode, the app simply stops running in debug and jumps to int main(int argc, char *argv[]). On the phone/pad it keeps running, on XCode I can only restart it.

Nicola


Solution

  • The app is getting sent SIGKILL to force it to restart. Apparently this will happen whenever the permissions are changed. However I think this might be a new Xcode bug because my app behaves normally when not connected to Xcode and the usual checks for iCloud settings changes work fine.