I don't use debug mode, I use release app and compile with hosted server.
I use test flight on app store to trial the application on the device, I really don't know why the apps crash, even the code you have explain on this thread
This is how all B4i developers develop. You should start with installing B4i Bridge and getting your app to run in debug mode. This will allow you to see the logs and understand why it fails.