Solskjaer
Solskjaer

Reputation: 175

How can I copy files to Documents folder of my app through iTunes

I saw some apps like GoodReader have this function.

User can copy their documents to a folder of app through iTunes and then use them in app.

What can I do to perform this function.

Thanks!

Upvotes: 0

Views: 835

Answers (2)

virushuo
virushuo

Reputation: 660

UIFileSharingEnabled

UIFileSharingEnabled (Boolean - iOS) specifies whether the application shares files through iTunes. If this key is YES, the application shares files. If it is not present or is NO, the application does not share files. Applications must put any files they want to share with the user in their /Documents directory, where is the path to the application’s home directory.

In iTunes, the user can access an application’s shared files from the File Sharing section of the Apps tab for the selected device. From this tab, users can add and remove files from the directory.

This key is supported in iOS 3.2 and later.

from: http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html

Upvotes: 2

jbat100
jbat100

Reputation: 16827

You have to set UIFileSharingEnabled key in the info plist of your app.

Upvotes: 1

Related Questions