Text of developer.apple.com › forums › thread › 851075 as Styx crawled it on Nov 19, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

FileManager.ubiquityIdentityToken … | Apple Developer Forums

FileManager.ubiquityIdentityToken returns nil despite correct entitlements, iCloud sign-in, and app-level iCloud Drive permission App & System Services iCloud iCloud Drive Files and Storage You’re now watching this thread. If you’ve opted in to email or web notifications, you’ll be notified when there’s activity. Click again to stop watching or visit your profile to manage watched threads and notifications. You’ve stopped watching this thread and will no longer receive emails or web notifications when there’s activity.

Click again to start watching. mjmora87 OP Created Oct ’26 Replies 1 Boosts 0 Views 259 Participants 2 I have a shipped App Store app (bundle ID com.stoolkit.app) using a private iCloud container (iCloud.com.stoolkit.app) purely for file-based backup via FileManager's ubiquity container APIs, not CloudKit database/CKContainer. The availability check is as simple as: FileManager.default.ubiquityIdentityToken != nil This consistently returns nil, even though: the app's embedded provisioning profile (verified by extracting embedded.mobileprovision from the built .ipa and parsing it) correctly includes com.apple.developer.icloud-container-identifiers, com.apple.developer.ubiquity-container-identifiers (both = iCloud.com.stoolkit.app), and com.apple.developer.icloud-services.

The app's entitlements plist correctly declares com.apple.developer.icloud-container-identifiers: [iCloud.com.stoolkit.app] and com.apple.developer.icloud-services: [CloudDocuments]. The test device is signed into iCloud. Settings > Apple ID > iCloud > Apps Using iCloud shows the app listed and toggled on. The device-wide iCloud Drive toggle is on. No Content and Privacy / Screen Time restrictions are active. It reproduces identically on two separate physical devices (an iPad via TestFlight, an iPhone via the live App Store), both running the same signed build.

Relaunching the app and toggling iCloud Drive off/on device-wide did not change the behavior. I don't currently have access to a Mac/Xcode to produce a verified minimal reproduction project, but the check itself is a single system API call, so I'd expect a fresh single-view app with the same iCloud container entitlement to reproduce it directly. What could cause ubiquityIdentityToken to return nil under these conditions?

Is there an account- or container-side initialization step I might be missing beyond registering the container under the App ID's capabilities? Replies 1 Boosts 0 Views 259 Participants 2 DTS Engineer OP Apple 3w I tend to believe that is a container / entitlement configuration issue. How to configure an iCloud Documents app is detailed in the following article / sample code: Synchronizing documents in the iCloud environment .

If not yet, you can give it a try. I suggest that you start with a brand new iCloud container, and if that works, replace the new container with your current one. You don't need to publish an iCloud container to iCloud Drive, btw. following the steps listed in the "Configure the sample code project" section should be enough. Best, —— Ziqiao Chen  Worldwide Developer Relations. Add comment