Is there any way to call applicationWillTerminate in jsb?


#1

or alternative way to stop the app, when some critical error occurred, such as “update failed”


#2

cc.Director.end() does not run correctly?


#3

not exactly, the comment indicates
/*** Ends the execution, releases the running scene.
It doesn’t remove the OpenGL view from its parent. You have to do it manually.
**/

when I tried calling this end() from js, the logic loop was stopped and left me a black screen…
WenHai Lin wrote:

cc.Director.end() does not run correctly?


#4

Did you want to exit your program when errors were triggered?
If so, you probably needs to bind a function which invoke exit(0); to JS.


#5

Maybe we just wanna exit our program when press “exit” button or “return” keypad.