objective c get iTunes shared document directory files list
Posted by Eng.Ahmed AlSadiOct 6
xcode – iphone – objective c
Hi;
How to Enable iTunes “folder” file sharing:
some times you want to enable iTunes file sharing ; it’s easy , select project –> info –> Custom iOS Target Properties –> add new row and select “Application supports iTunes file sharing” with value “YES” , now you can see sharing folder on iTunes if you select your application from apps.
How to get files list of iTunes document directory :
This method returns an array contains files of iTunes file sharing folder :
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
//ExampleDB.com
//By . Al Sadi
+(NSArray*) GetDocumentsFiles
{
NSArray* documentsFiles;
NSError* err = nil;
NSArray* allFoldersInDocuments = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString* documentsFolder = [allFoldersInDocuments objectAtIndex:0];
documentsFiles = [[NSFileManager defaultManager]contentsOfDirectoryAtPath:documentsFolder error:&err];
allFoldersInDocuments = nil;
documentsFolder = nil;
return documentsFiles;
} |
Related posts:
- objective c documents and temp directory Xcode – Objective-c Hi, If you want to get path of documents directory , you...
- How to make a setup for vb.net application The VB.NET output executable file may have some dependencies on some Activex objects or .NET...
- objective c iOS sqlite3 tutorial with source code sample Xcode – objective-c -iphone source code; Hi, iPhone iOS embedded sqlite3 , first thing you...
- objective c turn iPhone flashlight on off objective c turn iPhone flashlight on off XCode – Objective-c Hi, If you want to...
- Objective c char* to NSString xcode – Objective-c Hi; To convert C String ” char* ” to objective-c string ”...
Leave a Reply