iCloud驱动器文件夹 [英] iCloud Drive Folder
问题描述
我有一个OSX应用程序,该应用程序使用具有较旧Team ID普遍存在密钥的iCloud文档.有人知道如何让无处不在的文件夹出现在iCloud驱动器文件夹中吗?
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?
我已经尝试在应用程序pList中使用NSUbiquitousContainerIsDocumentScopePublic密钥设置为true无效.
I have already tried using the NSUbiquitousContainerIsDocumentScopePublic key set to true in the applications pList to no effect.
出现在iCloud驱动器中的文件夹包括Apple的应用程序和Pixelmator.
Folders that appear in the iCloud drive include Apple's application, and Pixelmator.
推荐答案
将这些值添加到info.plist文件中,并更改内部版本号.
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>
并将这些密钥添加到您的权利中,您将在功能的iCloud部分看到错误,但工作正常.因此,请勿单击修复按钮或从功能中对其进行更改,否则它将不再起作用.
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>
这篇关于iCloud驱动器文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!