Writing to Mac Support folder

J. Landman Gay jacque at hyperactivesw.com
Fri Jun 30 11:52:12 EDT 2023


I have several testers and only one has the problem. He's running Mac 
Ventura, but so are a couple of others. The app is signed and notarized 
using your wonderful tool. Normally the Mac asks if the app can write files 
to disk and directs the user to system prefs / privacy and security so the 
user can give permissions. Either one tester ignored the dialog or never 
saw it. Without write permissions the prefs file is never copied to the 
Preferences folder.

I directed him to system prefs to solve the problem but I don't want users 
to have to do that. I read that apps can automatically write to preferences 
or application support if the app is sandboxed, and it doesn't need any 
special entitlements to do that, so I think think that's what I need to do. 
But I'd like verify my assumption is correct.

@Matthias, if I enable the entitlements checkbox in your tool but don't add 
any of the listed entitlements, will it add the sandbox directive 
automatically? I think I only need that one line.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On June 30, 2023 1:35:27 AM matthias rebbe via use-livecode 
<use-livecode at lists.runrev.com> wrote:

> This is what Apple says:
>
> "If you distribute your macOS app through the App Store, you must enable 
> App Sandbox. If you notarize your macOS app to distribute it outside of the 
> App Store, you must enable hardened runtime and, optionally, can also 
> enable App Sandbox."
> https://help.apple.com/xcode/mac/current/#/devf87a2ac8f
>
>
> What os does the user run who has the problems to run the app? Did he allow 
> to run programs from outside the App Store?
>
> If you don't mind, you can send me your app and i will try it here.
>
> Regards,
> Matthias
>
>> Am 29.06.2023 um 22:50 schrieb J. Landman Gay via use-livecode 
>> <use-livecode at lists.runrev.com>:
>>
>> Short version: how do I bypass Gatekeeper to write a prefs file?
>>
>> I need to save a file in ~/Library/Application Support/myAppFolder/. Am I 
>> correct that I need to sandbox the app before I can write a file there?
>>
>> I read an LC lesson that said no special entitlements are required to 
>> create an app folder and a file. I can't test it myself because I already 
>> have full access.
>>
>> If this is correct so far, then do I just need to provide the sandbox 
>> entitlement and nothing else?
>>
>> --
>> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
>> HyperActive Software           |     http://www.hyperactivesw.com
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the use-livecode mailing list