Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iCloud Drive Folder

I have an OSX app that uses iCloud documents with the older Team ID ubiquity key. Does anyone know how to get the ubiquity folder to appear in the iCloud drive folder?

I have already tried using the NSUbiquitousContainerIsDocumentScopePublic key set to true in the applications pList to no effect.

Folders that appear in the iCloud drive include Apple's application, and Pixelmator.

like image 395
AndyTang Avatar asked Dec 26 '22 02:12

AndyTang


1 Answers

Add these values to your info.plist file and change your build number.

<key>NSUbiquitousContainers</key>
    <dict>
        <key>iCloud.com.example.app</key>
        <dict>
            <key>NSUbiquitousContainerIsDocumentScopePublic</key>
            <true/>
            <key>NSUbiquitousContainerName</key>
            <string>App name to display in iCloud Drive</string>
            <key>NSUbiquitousContainerSupportedFolderLevels</key>
            <string>None</string>
        </dict>
    </dict>

and add these keys to your entitlements, you will see an error on the iCloud section of capabilities, but its working fine. So DO NOT click the fix button or change it from the capabilities or it will not work anymore.

<key>com.apple.developer.ubiquity-container-identifiers</key>
        <array>
            <string>iCloud.$(CFBundleIdentifier)</string>
        </array>
        <key>com.apple.developer.icloud-services</key>
        <array>
            <string>CloudDocuments</string>
        </array>
        <key>com.apple.developer.ubiquity-kvstore-identifier</key>
        <string>$(TeamIdentifierPrefix)$(CFBundleIdentifier)</string>
like image 55
Maximilian Litteral Avatar answered Dec 28 '22 09:12

Maximilian Litteral