Reputation: 2653
i want to use the "file sharing" feature in my app. I want to create a photo-app which has no content when the user starts it. Therefore the user can select an image-folder on his mac or pc. After that and starting the app on his iphone or ipad, all the content of his image-folder will be viewable.
I think its only possible to add simple files to my app - not content folders, right? Any ideas how i could do this?
Thanks for your time and help.
Upvotes: 5
Views: 9035
Reputation: 3691
I was not able to drag-and-drop a folder from my PC (Windows 10). But I found a free application called iFunbox that allowed me to copy a folder to an application's documents.
Upvotes: 0
Reputation: 41
It is indeed possible to add a folder to and App's File Sharing space using iTunes version 12+. However, the iTunes upload button will not work for this, because its file selection interface insists on plain file selection only, excluding folders. The way which works is to drag-and-drop a folder from your PC to the iTunes File Sharing window.
Since the iTunes interface for handling file sharing is very poorly designed, is is worth recalling the tricks that you can use to perform operations on the File Sharing space, that iTunes does not provide a button for:
It remains impossible to directly see or alter the contents of a File Sharing folder in iTunes. My workaround for doing this is the following:
I hope this helps
Upvotes: 3
Reputation: 6708
You cannot upload folder to the app.
one way to do so
create .zip file of that folder and upload. extract that zip file from app.
checkout this project, It has a code to extract zip file.
https://github.com/ZipArchive/ZipArchive
Upvotes: 4
Reputation: 11
I found that using iTunes 12, and iOS8, I can now ADD folders to an apps Documents folder using iTunes File Sharing. Previously it was only possible to add single files.
Upvotes: 1
Reputation: 151
On your mac, rename the folder to folder.pkg.
You can now add folder.pkg to the documents for your app using iTunes File Sharing.
Once folder.pkg has been added, rename it to its original name.
Not sure how to do this with iTunes on a PC.
Upvotes: 14