how to share a certain directory tree list from <Application_Home>/Documents using UIFileSharingEnabled

StackOverflow https://stackoverflow.com/questions/6328869

Question

i want to integrate itunes file sharing into my app. I know that i just need to set true UIFileSharingEnabled in info.plist. But it make all files and directories in /Documents from my app is show in itunes file sharing. I just want to share a directory tree listing in itunes file sharing.

This is a screenshoot of my /Documents (i got it from iphone simulator directory but it is same for the device) enter image description here

from that pictures, i just want to share the all files in Project directory without showing Project directory itself.

Can i do that? Please help me to solve this.

Thank you, Risma

Was it helpful?

Solution

I don't think you can alter what is shared when you enable file sharing by using the UIFileSharingEnabled key in Info.plist.

However I suggest that you revamp your content so that application specific content go into the Library folder such as the database file and other non-user stuff. You might want to go through this for identifying which folders are backed up by iTunes.

OTHER TIPS

How about a symbolic link? That would solve that issue in a snap, provided you can implement them and control permissions. Not sure how to do that with iOS, but it's definitely worth looking into. When it comes to file sharing, links are your best friend.

I don't have any experience with iPhone app dev, but I've done plenty of file share management in Linux. Hopefully it's not too different... But I have no idea what system calls are available to you with iPhones. If you find out, I'd enjoy knowing. Good luck!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top