Search code examples
iosipadicloudnsfilemanager

NSFileManager ubiquityIdentityToken returns nil unexpectedly?


I am using this iCloud library within my application: https://github.com/iRareMedia/iCloudDocumentSync

On my iPhone running iOS 8, I run the app and ubiquityIdentityToken returns a value and everything works fine. However on my iPad running iOS 7.0.4, it returns nil.

I ensured a few things on the iPad:

  1. The iPad is connected to wifi and can connect to the internet fine

  2. iCloud is in fact set up on the iPad. I can see this because it says so in Settings and iCloud tabs are working in Safari.

  3. The documents and data option is in fact enabled

  4. Xcode set up iCloud automatically via the capabilities iCloud tab and it works on my iPhone with the same set up.

Is there any reason why this could be happening? It seems hard to believe that it can work on one device and not the next. Any help would be appreciated.


Solution

  • I know iOS 8 is still under NDA so this answer can't be as specific here as I would like it to be but I'll just say the following. This answer: https://stackoverflow.com/a/24584019/394736 points to this link: https://devforums.apple.com/thread/229509 and that fixed it for me on both iOS 7 and iOS 8 devices!