以编程方式关闭 DevExtreme iOS 应用程序
Close DevExtreme iOS App programmatically
我正在使用 DevExtreme 开发一个 iOS 应用程序,我喜欢在用户点击特定菜单项时关闭它。
从 this article and this one 看来,Apple 似乎不允许强制关闭应用程序。事实上,每个 DevExtreme 项目中预加载的代码片段都没有考虑 iOS 平台。
function exitApp() {
switch (DevExpress.devices.real().platform) {
case "android":
navigator.app.exitApp();
break;
case "win":
MSApp.terminateApp('');
break;
}
}
我的问题是:
- 强制关闭应用程序是否是 iOS 平台所不期望的行为?
- 如果没有,是否有我可以用来实现该行为的示例?
谢谢
Apple 确实不允许可以自杀的应用程序:
我正在使用 DevExtreme 开发一个 iOS 应用程序,我喜欢在用户点击特定菜单项时关闭它。
从 this article and this one 看来,Apple 似乎不允许强制关闭应用程序。事实上,每个 DevExtreme 项目中预加载的代码片段都没有考虑 iOS 平台。
function exitApp() {
switch (DevExpress.devices.real().platform) {
case "android":
navigator.app.exitApp();
break;
case "win":
MSApp.terminateApp('');
break;
}
}
我的问题是:
- 强制关闭应用程序是否是 iOS 平台所不期望的行为?
- 如果没有,是否有我可以用来实现该行为的示例?
谢谢
Apple 确实不允许可以自杀的应用程序: