I have a requirement to enable/disable file sharing from with in the App. My iPhone app which shares all the data in the documents to let user to take a backup of the data from iTunes so that he can restore it later. I know that i can achieve this by changing the app info.plist to enable/disable the iTunes file sharing, but as i have to disable/enable it from within the App i.e from App settings screen.
Please suggest me that how to achieve this functionality.
Thanks for you answer.
It’s not possible to do it through code on run time. There is a trick to do it but it’s can be only good if you don’t have much data to to share. Enable file sharing in plist. Then put all files in a folder name like “Share” then put a switch in UI, when user turn off switch then rename this folder like this “.Share” then it will be hidden and no longer available for sharing.
Note : It’s a trick not a good way but it works when you needed it hardly.