Going back to the TV Menu with the Menu button on the remote

The native.requestExit() command doesn’t do anything on the tvOS, and it seems like Corona overrides the standard remote input. 

The expected behaviour, when at the main menu of a game, would for the Menu button on the remote to exit the app, and go to back to the tvOS. For regular, non-Corona apps, this should work naturally out of the box according to other reading I’ve done (if using the Xcode views and whatnot).

However, in a Corona-based app, nothing happens because of the override, and since native.requestExit() doesn’t work, I cannot find a graceful solution. Right now, I call os.exit() upon the menu key press on my main menu which kills the app - but this looks kind of bad and I am fairly certain that Apple will reject that in the review process.

I am looking into using a C-plugin (with Corona Enterprise) for either re-taking back control over the menu button or calling an official “suspend the app”-command from there (however, there doesn’t seem to be one).

Has anybody solved this? How to exit a tvOS app using the menu button?

native.requestExit() won’t work on tvOS or iOS. This is because of Apple’s guidelines, and functionality that quits your app can get your app rejected from the store.

The menu button is one of the larger issues we have with tvOS controls at the moment (including an issue where controllers don’t work with native UI elements). It’s an issue we’re aware of and will fix, but like everything else it takes time and manpower.

Thank you for the bug report and information, we’ll definitely respond to the ticket once we have a fix.

Thanks for the answer :slight_smile:

I know, the guidelines are pretty firm on that, but I can’t see another solution at the moment. Right now, I am calling os.exit() to kill the app go back to the tv menu. Not a perfect solution - but honestly, it isn’t something noticeable for the average user. The guidelines, however, are pretty firmly against that so I am well aware that my chances of getting approved are slim to none, but I am still submitting the app today to see what happens… I’ll let you know the result.

Great to hear that you’re working on it, best of luck!

native.requestExit() won’t work on tvOS or iOS. This is because of Apple’s guidelines, and functionality that quits your app can get your app rejected from the store.

The menu button is one of the larger issues we have with tvOS controls at the moment (including an issue where controllers don’t work with native UI elements). It’s an issue we’re aware of and will fix, but like everything else it takes time and manpower.

Thank you for the bug report and information, we’ll definitely respond to the ticket once we have a fix.

Thanks for the answer :slight_smile:

I know, the guidelines are pretty firm on that, but I can’t see another solution at the moment. Right now, I am calling os.exit() to kill the app go back to the tv menu. Not a perfect solution - but honestly, it isn’t something noticeable for the average user. The guidelines, however, are pretty firmly against that so I am well aware that my chances of getting approved are slim to none, but I am still submitting the app today to see what happens… I’ll let you know the result.

Great to hear that you’re working on it, best of luck!