I work with Xcode 7 and Swift 2 for create an IOS app. I want my users to import file in my application and recover the IOS device by connecting to iTunes. I would have to can access the file from my code ... Here is a sample application that offers this principle (VLC, Excel ...). And here's a screen for you to understand! ;)
Here is a documentation: Core Services Layer
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.
After enabling File Sharing, you could just manipulating the Documents
directory.
You could also use a tutorial like this one:
iTunes Tutorial for iOS: How To Integrate iTunes File Sharing With Your iOS App
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With