2

I have an iCloud enabled app which works well. However, on testing, when my app is running and I either switch off or on Documents & Data for my specific app, via iCloud Settings, it crashes.

The only information for my crash in xCode is the call-stack...as shown. Otherwise, I'm at a loss. Any ideas?enter image description here

My setup is this...

I am using iOS v7.1.2/Xcode 5.1.1 I am 'backing-up' snapshots of my database (zip files) in an iCloud folder known as 'Backup'...I'm assuming Apple would be OK with this setup, rather than copying everything to the documents folder.

enter image description here

I do at a certain point in my program create a use an NSMetaDataQuery to monitor the Backup folder but it is nil most of the time and not operating.

The system will crash at any point of the program if I change the setting in the Documents and Data part of iCloud config...(My Test App) enter image description here

Note...Switching on or off the main Documents and Data UISwitch has no effect and app does not crash.

Other than that, there's not a lot going on. The zip file is simply copied to iCloud.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Fittoburst
  • 2,215
  • 2
  • 21
  • 33
  • Need more information, such as (1) what version of iOS? (2) what iCloud API (Core Data, UIDocument, k/v store)? (3) how does your app actually use this API? (4) are you listening for any iCloud notifications, and if so, what do you do when they're posted? – Tom Harrington Jul 17 '14 at 17:05
  • Hi Tom. Have updated the info. Hope this makes sense. – Fittoburst Jul 17 '14 at 21:24
  • Interesting....This problem seems to manifest itself on other apps I have running under xCode as well but when I run the apps independently on the iPad, they don't crash. Must be something to do with my Mc/xCode/iPad setup, so may not be actually a problem. – Fittoburst Jul 18 '14 at 07:50
  • I'm getting the exact same thing here... Did you get anywhere with this? – Bertie Oct 13 '14 at 11:46
  • Seems to be causing strange behaviour even if I run the app from the device. – Bertie Oct 13 '14 at 11:46
  • Nope. Still causes problem. It's not a big issue in the great scheme of things for me, but I wonder if it's an iOS bug. – Fittoburst Oct 13 '14 at 12:05
  • I noticed that the app receives a `applicationWillTerminate:` before closing, which means it's not an actual crash, but just some strange behavior in iOS. – alex-i Nov 20 '14 at 10:35
  • I'm getting the same problem testing my app on the simulator. Did you get any progress on this? – Loc Pham Feb 25 '15 at 15:45
  • Firstly, are you watching NSUbiquityIdentityDidChangeNotification? You then need to check [NSFileManager defaultManager].ubiquityIdentityToken to see if you are logged onto iCloud and take appropriate action. In my experience crashes can occur with the simulator, but a real device will behave as you would expect. – MichaelR Oct 10 '15 at 01:39

0 Answers0