NSString stringByAbbreviatingWithTildeInPath and Sandboxing
NSString stringByAbbreviatingWithTildeInPath and Sandboxing
- Subject: NSString stringByAbbreviatingWithTildeInPath and Sandboxing
- From: Jon Baumgartner <email@hidden>
- Date: Tue, 27 Jan 2015 12:20:37 -0500
My app uses this call, and it worked fine until I sandboxed it. The documentation for this call says:
> For sandboxed apps in OS X, the current home directory is not the same as the user’s home directory. For a sandboxed app, the home directory is the app’s home directory. So if you specified a path of /Users/<current_user>/file.txt for a sandboxed app, the returned path would be unchanged from the original. However, if you specified the same path for an app not in a sandbox, this method would replace the /Users/<current_user> portion of the path with a tilde.
So how do I get /Users/<current_user>/file.txt to output as ~/file.txt when my app is sandboxed?
_______________________________________________
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