无法在iOS上使用ionic2退出应用程序吗?是否可以退出应用?

问题描述 投票:6回答:1

我已经构建并使用了Ionic2应用

this.platform.exitApp()

在app.component.ts中退出应用程序。

在Android上运行良好,但在iOS上出现此错误

undefined is not an object (evaluating 'e.navigator.app.exitApp')
ios angular react-native flutter ionic2
1个回答
11
投票

在iPhone上,没有退出应用程序的概念。导致应用程序退出的唯一操作是按下手机上的“主页”按钮,而开发人员则无权访问此按钮。

根据Apple,您的应用程序不应自行终止。请检查this链接

© www.soinside.com 2019 - 2024. All rights reserved.