Post

Replies

Boosts

Views

Activity

How to escape sandbox when performing integration testing?
I am performing some tests that involves the app extension and an external app connected through XPC I get the following when I try to connect to an external app from the safari app extension with sandbox enabled connection to service named "com.test.sample"was invalidated: failed at lookup with error 159 - Sandbox restriction." UserInfo={NSDebugDescription=The connection to service named com.test.sample was invalidated: failed at lookup with error 159 - Sandbox restriction. I have tried: Disabling the sandbox for the app extension target Adding the entitlements file path in the test target Both of which still give me the same result. How can I proceed with this? Does the entitlement for the sandbox only work when Safari is running the appex?
5
0
1.9k
Mar ’22
Error when running a binary from containing app
I am running a Safari Web extension and looking to launch a shell script from the containing app. Error in process Error Domain=NSCocoaErrorDomain Code=4 "The file “test.command” doesn’t exist." I get the above error when I try to access the binary. I use NSOpenPanel to allow the user to give permission to access the file system. The program works perfectly without the sandbox and so that ensures there is no file path error. I have the following entitlements: com.apple.security.scripting-targets com.apple.security.files.user-selected.executable com.apple.security.files.user-selected.read-write  let task = Process()     task.launchPath = "/Users/test/test.command"      let openPanel = NSOpenPanel()   openPanel.prompt = "Choose"   openPanel.canChooseFiles = false   openPanel.canChooseDirectories = true        do{       try task.run()     }catch{       os_log(.error,"Error in process")       print(" \(error)")     } What could be the issue ?
8
0
1.1k
Mar ’21
General questions on Safari Web Extension, App Extension and native
I would like to create multiple App Extension processes from Safari Web Extension by calling the browser.runtime.connectNative API. Would this be feasible? Is there another method to talk to multiple App extension binaries from the Safari Web extension other than using browser.runtime.connectNative Does the Safari Web Extension always need to be bundled with app extension and native app? Can it talk to other app extensions/native app
0
0
555
Mar ’21
Spawning multiple Native messaging host from Safari Web Extensions
The Safari Web Extension can connect to the App extension via the the browser.runtime.sendNativeMessage and browser.runtime.connectNative APIs. How many Native Messaging host processes can be created through the above APIs? Can new processes be spun up per browser.runtime.connectNative call just like in chrome? or is it always going to be one process ? What other alternatives can we leverage
1
0
878
Mar ’21