iTunes file sharing - how to upload different folders?
Asked Answered
C

5

5

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.

Catchall answered 18/3, 2011 at 10:49 Comment(1)
It is mind blowing that to this day we can't enter into a folder on the right folder pane, you can't rearrange, and you can't download if something is already in a folder. This is the worst interface I've ever seen it is, if anything, counter productive!Torrlow
P
4

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

Potaufeu answered 18/3, 2011 at 11:11 Comment(2)
Ok, thanks, but why? Is that for performance or security reasons? Any ideas on that?Catchall
Maybe someone has some links how to extract zip-files from my app?Catchall
P
14

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.

Pantograph answered 22/7, 2013 at 19:20 Comment(7)
Thank you, this works. I find it unbelievable that in 2013 we still have software that has difficulties in such fundamental areas as moving files/directories from one computer to the next one lying aside and even connected through a cable. iPhones and more generally the whole "smartdevice" culture sicken me in how they miss the whole point of general-purpose computing and bring down fully functional computers to the level of a restricted special-purpose device, simply by limiting the user interface and keeping their non-standard communication protocols closed. Sorry for the rant.Wofford
Excellent- that really helped me to move data between apps on two devices. (I wonder if I can do this on a PC too, if I rename the folder before copying, or whether it is the operating system that shows the files as a single file in the iTunes file sharing window?)Survance
This should surely be designated as the correct answer, I think.Jordain
'Once folder.pkg has been added, rename it to its original name'. Care to share how that is done? I'm going completely bonkers trying to find the answer to what should be a simple problem. As far as I can see 'rename it to its original name' is NOT POSSIBLE in iTunes File Sharing list...Electroform
@RedNightingale Simply double tap the file name will enable renaming it in iTunes File Sharing list.Macmullin
Derp... Thanks! Worked around the problem in the end by using iExplorer which (while it crashes an awful lot) allows full manipulation of the app data internalsElectroform
Works great on a Mac, but there is no way to do that on WindowsContemporaneous
P
4

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

Potaufeu answered 18/3, 2011 at 11:11 Comment(2)
Ok, thanks, but why? Is that for performance or security reasons? Any ideas on that?Catchall
Maybe someone has some links how to extract zip-files from my app?Catchall
U
3

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:

  • Rename a file or folder: click it once, wait for a couple of seconds, and click it again. This will replace the name with the renaming edit box
  • Delete a file or folder: select it, then hit the "Del" key on your keyboard
  • Upload a folder: drag-and-drop it from your computer copy

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:

  1. Download the folder to the computer
  2. Make any desired change to the folder tree on the computer copy
  3. Delete the File Sharing copy of the folder (or, optionally, rename it to something like folder.old for safety)
  4. Upload the modified folder from the computer, using drag-and-drop
  5. (optionally) Delete the safety copy in File Sharing, after verifying that the App works fine with the newly uploaded version of the folder

I hope this helps

Undercool answered 5/9, 2018 at 8:35 Comment(0)
R
1

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.

Roan answered 20/2, 2015 at 17:52 Comment(0)
A
0

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.

Atalaya answered 12/4, 2020 at 8:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.