Hello:
I'm currently working on my first app which I'm looking at releasing throught the Mac App Store - but I'm not sure if what I'm trying to do is not allowed, or if I'm just being ******.
My app is a helper for another manufacturer's app, and will need to write to the other app's ~/Library/Application Support folder - so I have:
- Enabled the App Sandbox in my application target;
- Edited the entitlements file to add an array named 'com.apple.security.temporary-exception.files.home-relative-path.read-write', which in turn has a single string entry of '/Library/Application Support/'.
Yet, when I attempt to get the Application Support folder URL with
let applicationSupportURL = FileManager.default.urls(for: .applicationSupportDirectory, in: .userDomainMask).first
then I get this returned: file:///Users/<username>/Library/Containers/<appBundleID>/Data/Library/Application%20Support/
(Note: once I get this working with the Application Support folder, then I'll further narrow it down to just the required folder I need.)
Attempting to get the user to select the appropriate folder via an OpenPanel (and thus address it via a security-scoped URL) is not desirable:
- It's the same folder on every system that my app addresses, so why should I have to ask for it?
- As it's in ~/Library, it's difficult to get users to reliably find that folder, considering it's usually hidden.
What am I missing?
Thanks.