I used Dart process to make shell commands on macOS. I used Flutter to make the macOS app. Now I want to run shell commands from the app.
Command for running app
/Users/lihongjun/shell/libs/zipalign -v 4 "/Users/lihongjun/Downloads/app-release.apk" "/Users/lihongjun/Documents/test/tempApk/app_aligned.apk" ,
Error:
sh: /Users/Shared/shell/libs/zipalign: Operation not permitted
I have searched a lot but I can't resolve this, like process_runner, shell, system plug.
If I execute shell on mac's Terminal it works well.
bool rsult = System.invoke('/Users/Shared/shell/libs/zipalign -v 4');
print('result:$rsult');
ProcessCmd cmd = ProcessCmd('java', ['-version'],runInShell: false,);
runCmd(cmd).then((value) {
print(value.stdout.toString());
});
Now I want to use the same in Dart code to make the shell commands.
How can I do this? Thanks!