简体   繁体   English

iCloud驱动器文件夹

[英]iCloud Drive Folder

I have an OSX app that uses iCloud documents with the older Team ID ubiquity key. 我有一个OSX应用程序,它使用带有旧Team ID普遍密钥的iCloud文档。 Does anyone know how to get the ubiquity folder to appear in the iCloud drive folder? 有谁知道如何让ubiquity文件夹出现在iCloud驱动器文件夹中?

I have already tried using the NSUbiquitousContainerIsDocumentScopePublic key set to true in the applications pList to no effect. 我已经尝试在应用程序pList中使用NSUbiquitousContainerIsDocumentScopePublic键设置为true无效。

Folders that appear in the iCloud drive include Apple's application, and Pixelmator. 出现在iCloud驱动器中的文件夹包括Apple的应用程序和Pixelmator。

Add these values to your info.plist file and change your build number . 将这些值添加到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>

and add these keys to your entitlements, you will see an error on the iCloud section of capabilities, but its working fine. 并将这些密钥添加到您的权利中,您将在iCloud功能部分看到错误,但其工作正常。 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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM