Re: initFileURLWithPath run on emulator, not run on device
Re: initFileURLWithPath run on emulator, not run on device
- Subject: Re: initFileURLWithPath run on emulator, not run on device
- From: Franck Zoccolo <email@hidden>
- Date: Mon, 30 Jan 2012 19:54:40 +0100
Le 30 janv. 2012 à 16:57, Riccardo Barbetti a écrit :
> I have a problem, after that I had write and test code on simulator, today I have work on device.
>
> In my program I save my NSArray:
>
>
> NSArray *paths = NSSearchPathForDirectoriesInDomains(NSSharedPublicDirectory, NSUserDomainMask, YES);
>
> NSString *documentsDirectory = [paths objectAtIndex:0];
> NSURL *URLDirectory = [[NSURL alloc] initFileURLWithPath:documentsDirectory];
>
> BOOL result = [anArray writeToURL:URLDirectory atomically:YES];
First, I'm not sure NSSharedPublicDirectory is available on iOS.
Second, I think your URL points to a directory and is missing the filename you are writing to...
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden