I know that you can access your own application files using NSDocumentDirectory and such, but can you do that on other applications. For example, if I wanted the Documents of another application, would it be possible to get that information? From the iPhone OS Library as directed here.
我知道您可以使用NSDocumentDirectory等访问您自己的应用程序文件,但是您可以在其他应用程序上执行此操作。例如,如果我想要另一个应用程序的文档,是否可以获取该信息?从iPhone OS库按照此处的指示。
Sincerely,
Kevin
2 个解决方案
#1
5
No, you are limited to accessing files within the application sandbox. A good introduction to this is the "File System Basics" section of the iOS File System Programming Guide
不,您只能访问应用程序沙箱中的文件。对此的一个很好的介绍是iOS文件系统编程指南的“文件系统基础”部分
#2
2
You can't directly access the files, however there are a few tricks:
您无法直接访问这些文件,但有一些技巧:
If you are trying to share data amongst a family of apps within the same Wildcard App Id, you can share data via the Keychain.
如果您尝试在同一个通配符应用ID中的一系列应用之间共享数据,则可以通过Keychain共享数据。
You can also share data using a custom Pasteboard object.
您还可以使用自定义粘贴板对象共享数据。
Of course you can always send data to a server you control.
当然,您始终可以将数据发送到您控制的服务器。
Another neat trick is saving some data as metadata in the Address Book.
另一个巧妙的技巧是将一些数据保存为地址簿中的元数据。
If it is ok, to have some user interaction, you can pass data to another app by launching it the a custom URL scheme.
如果没问题,要进行一些用户交互,您可以通过启动自定义URL方案将数据传递到另一个应用程序。
But, unfortunately direct file access is not allowed.
但是,遗憾的是不允许直接访问文件。
#1
5
No, you are limited to accessing files within the application sandbox. A good introduction to this is the "File System Basics" section of the iOS File System Programming Guide
不,您只能访问应用程序沙箱中的文件。对此的一个很好的介绍是iOS文件系统编程指南的“文件系统基础”部分
#2
2
You can't directly access the files, however there are a few tricks:
您无法直接访问这些文件,但有一些技巧:
If you are trying to share data amongst a family of apps within the same Wildcard App Id, you can share data via the Keychain.
如果您尝试在同一个通配符应用ID中的一系列应用之间共享数据,则可以通过Keychain共享数据。
You can also share data using a custom Pasteboard object.
您还可以使用自定义粘贴板对象共享数据。
Of course you can always send data to a server you control.
当然,您始终可以将数据发送到您控制的服务器。
Another neat trick is saving some data as metadata in the Address Book.
另一个巧妙的技巧是将一些数据保存为地址簿中的元数据。
If it is ok, to have some user interaction, you can pass data to another app by launching it the a custom URL scheme.
如果没问题,要进行一些用户交互,您可以通过启动自定义URL方案将数据传递到另一个应用程序。
But, unfortunately direct file access is not allowed.
但是,遗憾的是不允许直接访问文件。