• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: initFileURLWithPath run on emulator, not run on device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >initFileURLWithPath run on emulator, not run on device (From: Riccardo Barbetti <email@hidden>)

  • Prev by Date: Re: initFileURLWithPath run on emulator, not run on device
  • Next by Date: Re: NSPopUpButton Binding Frustration
  • Previous by thread: Re: initFileURLWithPath run on emulator, not run on device
  • Next by thread: Core Data Entity And Attribute Names In XML Store
  • Index(es):
    • Date
    • Thread