I should've included how I'm attempting to execute applescript from the Child app:
NSDictionary* errorDict; NSAppleScript* scriptObject = [[NSAppleScript alloc] initWithSource: @"tell application id \"com.foo.parent\" to sign_out"]; NSAppleEventDescriptor* returnDescriptor = [scriptObject executeAndReturnError: &errorDict];
Maybe I can only execute compiled applescripts?
Post
Replies
Boosts
Views
Activity
I tried to post a comment to Quinn's question but the code formatting for comments is ugly. Here is how I'm starting the child app:
let process = Process()
let url = Bundle.main.bundleURL.path + "/Contents/MacOS/Child.app/Contents/MacOS/Child"
process.executableURL = URL(fileURLWithPath:url)
process.terminationHandler = { (process) in
print("\ndidFinish: \(!process.isRunning)")
}
do {
try process.run()
} catch let error as NSError {
NSLog("Failed to execute ", error)
}
I figured it out
I discovered the networksetup tool. Example usage:
networksetup -setnetworkserviceenabled "MyTestVPN" off
networksetup -removenetworkservice "MyTestVPN"
networksetup -listallnetworkservices
Did you figure this out? I'm seeing the same thing.
This is programmer error. I failed to include WebKit.framework in the release build. It works now.
Yes, I am signing with --deep. Thanks for the link, I'll do some reading.
This is for the macOS App Store, not iOS
Resolved how?