I'm sure I'm missing something obvious.
I added os.exit(EX_OK) after the v.present() line in my code, and when I run my app, Pythonista exists right away.
My code:
v = ui.load_view('umswi')
v.present()
os._exit(EX_OK)
If I remove the os._exit(EX_OK), my app runs until I press the "X" in the upper left-hand corner. If I put the os._exit(EX_OK) back in, my app starts and immediately exits.
If a user presses "X" in the upper left-hand corner, I want Pythonista to close. But I don't want it to close until someone presses that "X".
What am I doing wrong?