Hey! Im new here and currently learning iOS/macOs development (SwiftUI), so...take me easy :) I want to create a simple macOS app to let user set time until computer power off. I found an example with AppleScript and use it on my app, but I found that App won't run with Sandbox enabled, and to deploy app on AppStore it show me that Sandbox must be enabled.
The script I want to use:
'tell application "System Events" to shut down'
I found some examples that add script onAbsolute path, but after I do that, it won't let me to distribute the app, only export to run local.
It is any way to make script running (no matter, if app ask for user permission/admin pass) ?