The main app communicates with the helper app periodically, but how to handle situations where the helper app gets stuck and stops responding to messages?
[NSRunningApplication forceTerminate] would have worked, but it always returns NO when app sandbox is enabled, even if the app being terminated is part of the same app group.
[NSRunningApplication forceTerminate] would have worked, but it always returns NO when app sandbox is enabled, even if the app being terminated is part of the same app group.
That kinda depends. If it’s an app with a GUI then definitely yes. However, the absence of a GUI, and the fact that it periodically goes unresponsive, makes me suspect that it’s not actually an app but a command-line tool packaged to look like an app. In that case, launching it with NSTask (Process in Swift) might make more sense. When you do that it becomes your child process and the sandbox will let you send signals to it.Isn't this the correct way to launch the helper app?
And yes, it’ll keep running after your app quits.
ps If you have code that continues running after the main app quits, be aware of clause 2.4.5(iii) of the App Store Review Guidelines.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"