• 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
initFileURLWithPath run on emulator, not run on device
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

initFileURLWithPath run on emulator, not run on device


  • Subject: initFileURLWithPath run on emulator, not run on device
  • From: Riccardo Barbetti <email@hidden>
  • Date: Mon, 30 Jan 2012 16:57:20 +0100

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];


This code work fine in emulator, but on device don't work even with replace NSSharedPublicDirectory with NSDocumentDirectory.

result is always NO.

Is there some unknown error?
Should I implement a different method?

Grazie
Riccardo Barbetti


_______________________________________________

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


  • Follow-Ups:
    • Re: initFileURLWithPath run on emulator, not run on device
      • From: Franck Zoccolo <email@hidden>
    • Re: initFileURLWithPath run on emulator, not run on device
      • From: "Stephen J. Butler" <email@hidden>
  • Prev by Date: Re: NSPopUpButton Binding Frustration
  • Next by Date: Re: initFileURLWithPath run on emulator, not run on device
  • Previous by thread: VFR-Reader loading pdf from a NSURL
  • Next by thread: Re: initFileURLWithPath run on emulator, not run on device
  • Index(es):
    • Date
    • Thread