I'm working on a MacOS app where I can open certain urls in a specific chrome profile.
I have this code below which works when I set AppSandbox to false but of course App Store rejects my app because app sandboxing is turned off.
When sandboxing is on, the app crashes with "operation not permitted" and "permission denied" errors.
let commandPath = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
let arguments = ["--args", "--profile-directory=Profile 1", "https://www.google.com"]
let processUrl = URL(fileURLWithPath: commandPath)
try! Process.run(processUrl, arguments: arguments, terminationHandler: nil)
I tried to open the chrome with open -na "Google Chrome" .... but that doesn't work either.
Any directions on how to overcome this issue is appreciated.