MacOS App Sandbox - how can I distribute my app?

I'm new to MacOS development, so apologies for any immaturity in the question!

I'm getting ready to release an app I've developed. I would prefer to do it via the App Store, but ran into the Sand Box requirements. My app is heavy on folder/file read/write.

Given my newness to the ecosystem, I'm struggling to understand if my app can be made so that it can be distributed via the Mac App Store.

It works perfectly in a non-sandbox local environment.

Here is what my app does/needs to do
  1. Be able to access / read files from a location the user chooses the first time / but be able to read them the next time without prompting

  2. Be able to create a folder at a location automatically when the app launches a process in the background. I can ask for the user to provide access to a folder (let's say project folder), but need to be able to read/write files and folders inside it without prompting for permissions each time.

  3. Be able to launch a process (in my case, pandoc, which is a widely used document conversion command line app) in the background to work on the files within the selected folder. And in that way, that process needs to be able to access and read/write into subfolder

I understand that I can do all this with a notarized app and sell outside the App Store, but I would love to do it within the store, even if it means I can ask the user, at launch for example, to designate a specific folder as a project folder within which the app can do read/writes without prompting.

Note: for usability reasons I need to be able to have a project folder that is not the sand box folder.

I read something about bookmarks etc. but can't figure out if what I'm asking for is possible. And if so, any pointers or recent articles I could look at is very appreciated.

Thanks!

You are on the right track with bookmarks. What you want is a Security Scoped Bookmark.
@Etresoft - thank you! That is heartening.

I've done some more digging. I think the biggest one that I haven't found an answer to is (a) can I automatically create folders within the security-accessed folder and (b) can I launch a background process that could access my project folder (and its internals)

Is there a good recent swift code or article - I can't seem to find something my newbie mind can handle.

I've done some more digging. I think the biggest one that I haven't found an answer to is (a) can I automatically create folders within the security-accessed folder and (b) can I launch a background process that could access my project folder (and its internals)

Is there a good recent swift code or article - I can't seem to find something my newbie mind can handle.

I'm afraid I can't answer those questions. It is possible to do those things. But writing a Mac app - just a Mac app - no sandbox, no Mac App Store, no security scoped bookmarks, no background processes - is exceptionally difficult.

It is good to inquire about the technical and procedural limitations of the sandbox and Mac App Store before starting a project. But it is better to start with a smaller, more manageable idea. It is easier to make an iOS app and get that running on the Mac via SwiftUI or Catalyst.


MacOS App Sandbox - how can I distribute my app?
 
 
Q