Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

NSHomeDirectory doesn't give sandboxed "Container" path even when sandboxed

$
0
0

According to Apple's documentation for NSHomeDirectory()...

In OS X, it is the application’s sandbox directory or the current user’s home directory (if the application is not in a sandbox)

However, even when I choose the option to "Enable App Sandboxing", a call to NSHomeDirectory() always returns /Users/{username} instead of /Users/{username}/Library/Containers/{bundleID}/Data. For NSHomeDirectory(), I'm currently using...

[DllImport(MonoMac.Constants.FoundationLibrary)]
public static extern IntPtr NSHomeDirectory();

public static string ContainerDirectory
{
    get {
        return ((NSString)Runtime.GetNSObject (NSHomeDirectory ())).ToString ();
    }
}

I've emailed Xamarin support which they "sent to the engineers", but they suggested I ask on here as well. Thoughts?


Viewing all articles
Browse latest Browse all 204402

Trending Articles