I was debugging my sandboxed MAS app tonight via App Wrapper and got the following message (more or less) “TheApp wants permission to access the drive Storage1 - Give Access/Deny Access”
I’ve seen these messages many times in Catalina, but never when debugging my own app. I have a couple of questions, actually three:
- What generated this message? My app somehow? Xojo? Catalina?
- What kind of access is being asked for/granted? All the files on drive Storage1?
- If responding to the dialog is granting my app access to Storage1, do I still need to code Security Scoped Bookmarks for it? Or will my app be able to access files on Storage1 simply because I clicked the Give Access button?
Many thanks for any help. I’m having trouble getting a clear picture of file access in Catalina.
- You can find this out by checking yourself using folderitem.isReadable and folderitem.isWriteable.
- The OLD rule with Sandboxed Apps; is you need to use SSBs for locations that are outside of the container (or the Apple supplied Recent Items menu, or macOS Resume). Temporary exceptions exist; but they were designed to aid with migration to the App Sandbox and Apple has never liked allowing them on the App Store. Some people are granted permission to use em; while others have had to remove features from their apps.
It appears that this new system conflicts with the App Sandbox and to be honest I wouldnt gurantee anything that deviates from the OLD rules to work or stay working.
I use SSBs for the MacApp Store and don’t use them for the non-App Store version of my app.
Thank you, this is getting clearer.
@Sam Rowlands - Any idea how temporary “temporary” exceptions are? Or even, what does Apple mean by a temporary exception? Your app gets access once or twice, maybe?
@Beatrix Willius - That makes complete sense. Kind of unfortunate we have to maintain two OSX versions of our apps, though. I have enough trouble maintaining Mac & PC versions.
Thank you both for your help.
I take care of the different versions with a global:
[code]#if app.kMaxVersion <> Globals.Version.lite
dim theFolderitem as FolderItem = getPrefFolderitemNormal(fieldName)
Temporary meant that they would go away; when they announced them back in macOS 10.7… But the App Sandbox hasn’t seen much love since, my guess is that the original team (or individual) who implemented the App Sandbox is no longer there, so all the changes that they had planned vaporized. It would also explain why we now have a yet another but different security system. If the App Sandbox had been improved to handle more situations, we’d all be using Sandboxed applications and there’d be no need for the fear mongering, anti 3rd Party developer, user infuriating “Privacy” dialogs.
If your application does what it needs too in the App Sandbox, I would suggest using the App Sandbox for both inside and outside of the App Store. If you think two versions is too many, just wait for a bit, it’s rumored that the Mac will be switching to ARM processors and don’t forget that Mac apps are probably going away in favor of running iOS apps on the Mac.
I mean the Mac is clearly serves no other purpose than an accessory for your Phone right?
Unfortunately, well said Sam.