iosicloudicloud-api

Why ubiquityIdentityToken returns nil?


NSFileManager.defaultManager().ubiquityIdentityToken on some device in some case returns nil, even I set up iCloud Documents in Capabilities and I am logged in to iCloud on device. How reliable operation of the ubiquityIdentityToken do you met? Am I doing something wrong?

On iPhone it returns correctly with a real token, but on iPad it returns with nil, even if I am logged in.


Solution

  • To get token, you need additionaly to turn on iCloud Drive on device. If it is off ubiquityIdentityToken will return nil.

    enter image description here