Chuyển đến nội dung chính

Bài đăng

Đang hiển thị bài đăng từ Tháng 10, 2014

[iOS] File Sharing support via iTunes

File-Sharing Support File-sharing support lets apps make user data files available in iTunes 9.1 and later. An app that declares its support for file sharing makes the contents of its /Documents directory available to the user. The user can then move files in and out of this directory as needed from iTunes. This feature does not allow your app to share files with other apps on the same device; that behavior requires the pasteboard or a document interaction controller object. To enable file sharing for your app, do the following: Add the UIFileSharingEnabled key to your app’s Info.plist file, and set the value of the key to YES . Put whatever files you want to share in your app’s Documents directory. When the device is plugged into the user’s computer, iTunes displays a File Sharing section in the Apps tab of the selected device. The user can add files to this directory or move files to the desktop. Apps that support file sharing should be able to recognize when