It is well known that Apple does not allow users to view files, and files between different apps are not linked. From the computer to the mobile phone file, but also only through the open sandbox directory, to the corresponding application.
Sometimes we need to import the file into the app sandbox, or export the file from the sandbox. This requires that the app's settings are supported.
Features: Allows you to import files through itunes. You can view all the files under the sandbox.
Steps:
Add the Uifilesharingenabled key to the application's Info.plist file and set the key value to Yes.
If you want to create a new file under the sandbox
Nsfilemanager *filemanager =[Nsfilemanager Defaultmanager]; NSString*pathdocuments = [Nssearchpathfordirectoriesindomains (nsdocumentdirectory, Nsuserdomainmask, YES) ObjectAtIndex:0]; NSString*createpath = [NSString stringWithFormat:@"%@/weimage", pathdocuments]; //determines whether the folder exists, if it does not exist, creates if(![[Nsfilemanager Defaultmanager] Fileexistsatpath:createpath]) {[FileManager Createdirectoryatpath:createpath withintermediatedirectories:yes Attributes:nil Error:nil]; } Else{NSLog (@"File is exists!"); }
IOS itunes File Share