1
blacktulip 2012-04-11 03:30:50 +08:00
你的理解是对的,是复制过去。iOS上每个程序都运行在自己的沙盒里,没法访问其它程序的文件。
|
2
GhXst 2012-04-11 04:50:19 +08:00 via iPhone
@blacktulip 我也有些疑问,既然iOS每个程序都是独立的,那这种文件复制是如何完成的?
|
3
ladevan OP @blacktulip 沙盒的目的是保障系统安全,限制应用访问系统的一些东西。但为什么文件操作这些访问也要限制呢,而且也不是访问系统里的东西,只是其它应用的文件。Apple应该对这种访问有一些区分比较好啊
|
4
blacktulip 2012-04-11 05:16:58 +08:00
我找到 UIDocumentInteractionController 看了下,看的不是很明白,哎,我可能有理解错误,无视我一楼的帖子吧。
|
5
vonsy 2012-04-11 09:08:50 +08:00
每个程序有自己的目录(Documents,Library,tmp...)
程序(Reader)可以注册支持的文件类型.然后另一程序(Dropbox)可以将文件发送给它 个人理解,不对请指正. ---------------------------- The App Sandbox http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/TheiOSEnvironment/TheiOSEnvironment.html Registering the File Types Your App Supports https://developer.apple.com/library/ios/#documentation/FileManagement/Conceptual/DocumentInteraction_TopicsForIOS/Articles/RegisteringtheFileTypesYourAppSupports.html#//apple_ref/doc/uid/TP40010411-SW1 To declare its support for file types, your app must include the CFBundleDocumentTypes key in its Info.plistproperty list file. (See “Core Foundation Keys”.) The system adds this information to a registry that other apps can access through a document interaction controller. UIDocumentInteractionController UIDocumentInteractionControllerDelegate - documentInteractionController:willBeginSendingToApplication: |