URLForUbiquityContainerIdentifier returns nil even if configured correctly

后端 未结 8 2215
小鲜肉
小鲜肉 2020-12-31 06:47

I am having the problem, that URLForUbiquityContainerIdentifier is returning nil in some cases even if the user has set up everything correctly in the settings. My code:

8条回答
  •  清酒与你
    2020-12-31 07:28

    If anyone is having the same problem using the iOS8 Betas, there seems to be a bug with the way the Entitlements are generated in Xcode 6. I was banging my head against this for days until coming across this post in the Apple Developer Forums: https://devforums.apple.com/thread/229509?

    Essentially, Xcode generates a key named com.apple.developer.icloud-container-identifiers when it should be com.apple.developer.ubiquity-container-identifiers (ubiquity, not icloud). It may also have the value set as iCloud.$(CFBundleIdentifier) when it should be $(TeamIdentifierPrefix).$(CFBundleIdentifier).

    Of course this may get fixed in the next Beta but for anyone as confused as me I hope this helps.

提交回复
热议问题