ios 是否有任何工具可以浏览您应用的 iCloud 数据?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10644609/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 18:25:49  来源:igfitidea点击:

Are there any tools for browsing iCloud data of your app?

iphoneiosicloud

提问by murat

I am working on integrating iCloud in my app and sometimes having problems with conflicts and save errors. The fact that the data is stored on the cloud makes it very hard to debug the problems.

我正在努力将 iCloud 集成到我的应用程序中,但有时会遇到冲突和保存错误的问题。数据存储在云上的事实使得调试问题变得非常困难。

As far as I know, the data on the iCloud servers are mirrored to a directory on the device. Is there any tool (an iOS or OSX app) that will allow me to see the contents of this directory or the files in the iCloud servers? I know that it is possible to query the files in the directory with NSMetadataQueryclass. However, I am looking for a built-in tool from Apple or an open source application that I can use with my own entitlements.

据我所知,iCloud 服务器上的数据被镜像到设备上的一个目录中。是否有任何工具(iOS 或 OSX 应用程序)可以让我查看此目录的内容或 iCloud 服务器中的文件?我知道可以使用NSMetadataQuery类查询目录中的文件。但是,我正在寻找 Apple 的内置工具或我可以使用自己的权利的开源应用程序。

So far I have tried the following tools with no luck:

到目前为止,我已经尝试了以下工具但没有运气:

  • On Mac OS X Lion, System Pereferences >> iCloud >> Manage: This only displays the name and size of the documents. It does not allow me to download or see the content.
  • On iOS 5, Settings >> iCloud >> Storage & Backup >> Manage Storage: Same as above.
  • On Xcode 4.3.2, Organizer >> Devices >> >> Applications >> Download: This allows me to download the application data but it does not contain the iCloud data.
  • I have also tried browsing the phone with iPhone Explorer application but it does not display the contents of /private/var which is where the iCloud data is stored.
  • 在 Mac OS X Lion 上,系统参数 >> iCloud >> 管理:这仅显示文档的名称和大小。它不允许我下载或查看内容。
  • 在 iOS 5 上,设置 >> iCloud >> 存储和备份 >> 管理存储:同上。
  • 在 Xcode 4.3.2 上,管理器 >> 设备 >> >> 应用程序 >> 下载:这允许我下载应用程序数据,但它不包含 iCloud 数据。
  • 我还尝试使用 iPhone Explorer 应用程序浏览手机,但它没有显示存储 iCloud 数据的 /private/var 的内容。

回答by ecume des jours

...or visit http://developer.icloud.comto see what is actually stored in the cloud on Apple's servers...

...或访问http://developer.icloud.com以查看实际存储在 Apple 服务器云中的内容...

回答by murat

I found the answer to my question in thisanswer.

我在这个答案中找到了我的问题的答案。

It turns out the data on the cloud is automatically downloaded to my mac under "~/Library/Mobile Documents" folder if I enable "Document & Data" in iCloud Settings page and install a Mac app that is using iCloud.

事实证明,如果我在 iCloud 设置页面中启用“文档和数据”并安装使用 iCloud 的 Mac 应用程序,云上的数据会自动下载到我的 Mac 下的“~/Library/Mobile Documents”文件夹下。

回答by melsam

Currently there is no documented way to view native iCloud data. However, depending on what your data is, you might be able to view it under some circumstances. For example, iCloud can be used to sync databases that are accessed via CoreData. If you store your data in a Sqlite database, which is then managed and accessed via CoreData, you can use 3rd party desktop apps to view the Sqlite file. I use this tool to view my Sqlite databases on a Mac: http://www.sqlabs.net/sqlitemanager.php

目前没有记录的方式来查看本机 iCloud 数据。但是,根据您的数据是什么,您可能能够在某些情况下查看它。例如,iCloud 可用于同步通过 CoreData 访问的数据库。如果您将数据存储在 Sqlite 数据库中,然后通过 CoreData 管理和访问该数据库,您可以使用 3rd 方桌面应用程序查看 Sqlite 文件。我使用这个工具在 Mac 上查看我的 Sqlite 数据库:http: //www.sqlabs.net/sqlitemanager.php