Xamarin Mac:在沙箱中启动另一个带有参数的应用程序

Xamarin Mac:在沙箱中启动另一个带有参数的应用程序,xamarin,xamarin.mac,Xamarin,Xamarin.mac,我使用本教程为我的应用程序实现了登录时启动: 基本上,您需要实现一个助手应用程序,该应用程序将在登录时注册并启动,助手将启动您的应用程序 问题是我想隐藏启动我的应用程序,为此我需要传递一个参数。不幸的是,我没有找到任何方法来做到这一点 我找到了以下启动应用程序的方法: //Works to launch the app but no way to pass arg var app = SBApplication.FromBundleIdentifier(PackageId); app?.Act

我使用本教程为我的应用程序实现了登录时启动:

基本上,您需要实现一个助手应用程序,该应用程序将在登录时注册并启动,助手将启动您的应用程序

问题是我想隐藏启动我的应用程序,为此我需要传递一个参数。不幸的是,我没有找到任何方法来做到这一点

我找到了以下启动应用程序的方法:

//Works to launch the app but no way to pass arg
var app = SBApplication.FromBundleIdentifier(PackageId);
app?.Activate();

//Same issue here
NSWorkspace.SharedWorkspace.OpenFile("/Applications/HelloWorld.app")

//If you run the code bellow outside of the sandbox it works fine.
//Inside of the sandbox it just launches the app but without args
var aTask = NSTask.LaunchFromPath("/usr/bin/open", 
                new string[] { "-a","HelloWorld.app", "--args", "--hidden" });
aTask.Launch();