iCloud驱动器文件夹



我有一个OSX应用程序,它使用带有旧Team ID泛在密钥的iCloud文档。有人知道如何让无处不在的文件夹出现在iCloud驱动器文件夹中吗?

我已经尝试过在应用程序pList中使用设置为true的NSUbiquitousContainersDocumentScopePublic密钥,但没有效果。

iCloud驱动器中出现的文件夹包括苹果的应用程序和Pixelmator。

将这些值添加到info.plist文件中,然后更改内部版本号

<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>

并将这些密钥添加到您的权利中,您将在iCloud功能部分看到一个错误,但它工作正常。因此,不要点击修复按钮或从功能中更改它,否则它将不再工作。

<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>

相关内容

最新更新