Is there a way to build the app from scratch upon each launch for iOS simulator in Titanium?
In other words, in debugging an issue related to registering local notifications, I'd like to not have to go into iOS simulator and manually delete app each time before launching again.
Titanium does not uninstall the app before installing the new build of your app. We found that it was causing problems with people that actually had persistent data such as sqlite databases.
We don't expose a flag to uninstall the app, but you can do it if you don't mind editing the Titanium SDK. To do it, first find your Titanium SDK installation. Then go into the iphone/cli/hooks/run.js
file and search for ioslib.simulator.launch(
. The second arg is an options object where you can add a setting called uninstallApp
and just set it to true
. Once you do this, it'll uninstall the app before installing the new one. Any app data will get nuked, though I'm not sure about the notifications.
Remember this change applies to all projects you'd be building using that Titanium SDK and you'd have to apply this change to any other Titanium SDK that you use.