Search code examples
ioscordovaphonegapdevextreme

Close DevExtreme iOS App programmatically



I'm developing an iOS app with DevExtreme and I like to close it when the user tap on a specific menu item.
From this article and this one it seems Apple doesn't allow to force closing apps. In fact the code snippet which comes preloaded in every DevExtreme project doesn't consider iOS platform.

function exitApp() {
    switch (DevExpress.devices.real().platform) {
        case "android":
            navigator.app.exitApp();
            break;
        case "win":
            MSApp.terminateApp('');
            break;

    }
}

My questions are:

  • is force closing app a behavior which is not expected in iOS platform?
  • if not, is there a sample I can use to implement the behavior?

Thanks


Solution

  • Apple does indeed not allow apps that can kill themselves: