application should not crash when start() method called multiple times

This commit is contained in:
Vladimir Enchev
2015-11-02 13:22:03 +02:00
parent 2f27018092
commit e1399987a4

View File

@ -217,7 +217,11 @@ global.__onUncaughtError = function (error: Error) {
definition.notify({ eventName: definition.uncaughtErrorEvent, object: <any>definition.ios, ios: error });
}
var started: boolean = false;
exports.start = function () {
if (!started) {
appModule.loadCss();
UIApplicationMain(0, null, null, exports.ios && exports.ios.delegate ? NSStringFromClass(exports.ios.delegate) : NSStringFromClass(Responder));
started = true;
}
}