The Developer documentation says:
Do not call this method from your app’s main thread. Because this method might take a nontrivial amount of time to set up iCloud and return the requested URL, you should always call it from a secondary thread. To determine if iCloud is available, especially at launch time, check the value of the ubiquityIdentityToken property instead.
Are you calling it from the main thread? What does the ubiquityIdentityToken property return?
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: