我正在编写一个iPhone应用程序,我需要强制它退出,因为某些用户操作.清理内存后分配的应用程序,调用终止应用程序的适当方法是什么?
使用命令行启动Path Finder应用程序时,我会使用open -a Path Finder.app /Users/.基于这个想法,我使用以下代码来启动Path Finder.
我可以不使用open命令行启动应用程序吗?
NSTask *task;
task = [[NSTask alloc] init];
[task setLaunchPath: @"/usr/bin/open"];
NSArray *arguments;
arguments = [NSArray arrayWithObjects: @"-a", @"Path Finder.app", @"/Users/", nil];
[task setArguments: arguments];
NSPipe *pipe;
pipe = [NSPipe pipe];
[task setStandardOutput: pipe];
NSFileHandle *file;
file = [pipe fileHandleForReading];
[task launch];
Run Code Online (Sandbox Code Playgroud) 我如何杀死xamarin.mac中的应用程序我无法找到this.dispose或Application.Exit在xamarinMac中如何杀死Xamarin Mac中的应用程序