Fortunately, the Macify Runtime has functionality to receive a Quit command from your app and will immediately shut down upon receiving it.
This is accomplished by your Clickteam Fusion app calling the javascript "quit()" function from within the event editor.
You can call this function using the HTML5 Object inside Clickteam Fusion. When your app is ready to quit, on the HTML5 Object, call the following sequence of commands:
- Reset Parameters
- Add String Parameter "quit()"
- Call Function "eval"
This will call the javascript quit() function from the hosting page, which the Macify runtime will interpret and quit. Make sure you have saved any data to INI files or to a remote server prior to calling these commands or the data will be lost.
You can see this in action in the sample project included with Macify. Here is a screenshot of the events in question.