[英]Application's iCloud drive folder doesn't show in macOS
I have an app that needs to store video files in it's own container folder in iCloud Drive.我有一个应用程序需要将视频文件存储在 iCloud Drive 中它自己的容器文件夹中。 I have tried suggestions from most forums and I still couldn't resolve this issue.我已经尝试了大多数论坛的建议,但我仍然无法解决这个问题。
These are the things I did to setup a cloud container for my app -这些是我为我的应用程序设置云容器所做的事情 -
Added iCloud capability.添加了 iCloud 功能。 Selected 'iCloud Documents' for Services and selected the appropriate iCloud container that I had created through my developer account.为服务选择了“iCloud 文档”并选择了我通过我的开发者帐户创建的适当的 iCloud 容器。
Added the following entry in Info.plist在 Info.plist 中添加了以下条目
<key>NSUbiquitousContainers</key>
<dict>
<key>iCloud.com.TeamName.AppName</key>
<dict>
<key>NSUbiquitousContainerIsDocumentScopePublic</key>
<true/>
<key>NSUbiquitousContainerName</key>
<string>AppName</string>
<key>NSUbiquitousContainerSupportedFolderLevels</key>
<string>Any</string>
</dict>
</dict>
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.com.TeamName.AppName</string>
</array>
<key>com.apple.developer.icloud-services</key>
<array>
<string>CloudDocuments</string>
</array>
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array>
<string>iCloud.com.TeamName.AppName</string>
</array>
Have tried with new bundle identifiers and cloud containers.已尝试使用新的捆绑标识符和云容器。
Have tried updating the Version and the Build value已尝试更新版本和构建值
The app folder is created at '/Users/{user}/Library/Mobile\ Documents/iCloud~com~TeamName~AppName/Documents' and I can see the files I've written to it. app 文件夹是在“/Users/{user}/Library/Mobile\ Documents/iCloud~com~TeamName~AppName/Documents”创建的,我可以看到我写入的文件。
I can find these files at iCloud -> Manage Storage -> AppName on my iPhone too.我也可以在我的 iPhone 上的 iCloud -> Manage Storage -> AppName 找到这些文件。
Will 'NSUbiquitousContainerIsDocumentScopePublic' be accepted as true only when an app is released on the Appstore?只有当应用程序在 Appstore 上发布时,“NSUbiquitousContainerIsDocumentScopePublic”才会被接受为 true 吗? Or it's just that I'm missing something here?或者只是我在这里遗漏了一些东西?
Same here, I followed every tip I could find here and on other websites, but still the folder / files are not showing up visibly.同样在这里,我遵循了在这里和其他网站上可以找到的所有提示,但文件夹/文件仍然没有明显显示。
Problem: ubiquitous container works, files can be read and written, but are not showing up in macOS Finder, nor in the Files app on iOS devices.问题:无处不在的容器工作,可以读取和写入文件,但没有显示在 macOS Finder 中,也没有显示在 iOS 设备上的文件应用程序中。 macOS 11.5, iOS 14.7, Xcode 12.5.1 macOS 11.5、iOS 14.7、Xcode 12.5.1
I have tried:我努力了:
NSUbiquitousContainers
(eg. both the container id and my bundle id) NSUbiquitousContainers
的 info.plist 值的每个变体(例如,容器 ID 和我的捆绑包 ID)NSUbiquitousContainerIsDocumentScopePublic
NSUbiquitousContainerIsDocumentScopePublic
的 info.plist 值的每个变体NSUbiquitousContainerName
NSUbiquitousContainerName
的 info.plist 值的每个变体NSUbiquitousContainerSupportedFolderLevels
NSUbiquitousContainerSupportedFolderLevels
的 info.plist 值的每个变体It is driving me crazy.这让我快疯了。 Who can help?谁能帮忙?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.