with localDomainMask is precisely the one that gives me the writing error
Davidap
El 14/4/21 a las 19:26, Marco S Hyman escribió:
Our app isn't sandboxed, but when I try to create a "/Library/Application
Support/NewFolder" folder in there I get the following message:
/*You don't have permission to save the file "NewFolder" in the folder "Application
Support."*/
Yup. You want ~/Library/Application Support/NewFolder for per user files. Use
FileManager. In swift something like
let fileManager = FileManager.default
let supportDir = fileManager.url(for: .applicationSupportDirectory,
in: .userDomainMask,
appropriateFor: nil,
create: true)
that creates the app support directory for your app. You can then append
NewFolder to the resulting URL and create it.
I *think* (never used it, might be wrong) if you replace .userDomainMask with
.localDomainMask you will get a URL available to all users on the local machine.
There may be other options that are better suited to your use.
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com