Exposing an app’s ubiquitous container to iCloud Drive in iOS 8

I was experiencing a similar problem with my application. I was able to make this work by doing the following:

  1. Add the NSUbiquitousContainers setting to my Info.plist file according to documentation here https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/ExtensibilityPG/FileProvider.html. Here is the relevant code:

    <dict>
        <!-- ... other top-level Info.plist settings ... -->
        <key>NSUbiquitousContainers</key>
        <dict>
            <key>iCloud.com.example.MyApp</key>
            <dict>
                <key>NSUbiquitousContainerIsDocumentScopePublic</key>
                <true/>
                <key>NSUbiquitousContainerSupportedFolderLevels</key>
                <string>Any</string>
                <key>NSUbiquitousContainerName</key>
                <string>MyApp</string>
            </dict>
        </dict>
    </dict>
    
  2. Important! I then changed the above NSUbiquitousContainerSupportedFolderLevels string value from Any to One

    <key>NSUbiquitousContainerSupportedFolderLevels</key>
    <string>One</string>
    
  3. Next, and last, I had to change CFBundleVersion to a higher version. I also bumped the CFBundleShortVersionString to a new version as well.

Built and ran and after that, the folder with my applications icon appeared properly in iCloud Drive! Hope this helps!

Leave a Comment

tech