更新时间:2023-12-04 15:59:28
您可以调用退出方法
exit(-1)
或者您可以使用 NSXPCConnection.suspend
UIControl().sendAction(#selector(NSXPCConnection.suspend),
to: UIApplication.shared, for: nil)
此外,Apple不建议强制终止您的应用程序.没关系,怎么做.
Besides Apple isn't recommending to force terminate your app. It doesn't matter how you do that.
检查此帖子.