• 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: Sandboxing die.die.die
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sandboxing die.die.die


  • Subject: Re: Sandboxing die.die.die
  • From: Mike Abdullah <email@hidden>
  • Date: Thu, 23 Aug 2012 18:53:05 +0100

On 23 Aug 2012, at 18:11, Greg Parker wrote:

> On Aug 22, 2012, at 7:14 PM, Graham Cox <email@hidden> wrote:
>> Turns out the problem I was having with this is because of the behaviour of [NSURL fileURLWithPath:isDirectory:].
>>
>> When I passed the path to the iPhoto database file (~/Pictures/iPhoto Library/Album.xml) the resulting URL was bizarrely altered to point to some non-existent path within my sandbox. In fact it looks like a bug because it ended up concatenating 'file://' somewhere in the middle of the path which makes no sense.
>
> From the +fileURLWithPath:isDirectory: documentation:
> "If path begins with a tilde, it must first be expanded with stringByExpandingTildeInPath."
>
> Note also that paths with '~' in them are treated differently in sandboxed apps.
>
>
>> Instead, I used [NSURL URLWithString:] and it works correctly.
>
> Don't do that. +URLWithString: expects a string that represents a URL, not a string that represents a filesystem path.

It seems that he does actually have a URL string to start with, rather than a path.


_______________________________________________

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: 
 >Sandboxing die.die.die (From: Graham Cox <email@hidden>)
 >Re: Sandboxing die.die.die (From: Jens Alfke <email@hidden>)
 >Re: Sandboxing die.die.die (From: Kyle Sluder <email@hidden>)
 >Re: Sandboxing die.die.die (From: Alex Zavatone <email@hidden>)
 >Re: Sandboxing die.die.die (From: Graham Cox <email@hidden>)
 >Re: Sandboxing die.die.die (From: Graham Cox <email@hidden>)
 >Re: Sandboxing die.die.die (From: Greg Parker <email@hidden>)

  • Prev by Date: Modal window and app Quit
  • Next by Date: Re: DisplayReconfigurationCallBack with nil cgDisplayID
  • Previous by thread: Re: Sandboxing die.die.die
  • Next by thread: Re: Sandboxing die.die.die
  • Index(es):
    • Date
    • Thread