Merge pull request #3260 from NativeScript/raikov/fix-livesync-ios

Fixed: XML/HTML livesync not working on iOS
This commit is contained in:
tzraikov
2016-12-14 11:25:04 +02:00
committed by GitHub

View File

@@ -87,7 +87,7 @@ class IOSApplication implements definition.iOSApplication {
get window(): Window { get window(): Window {
return this._window; return this._window;
} }
get delegate(): typeof UIApplicationDelegate { get delegate(): typeof UIApplicationDelegate {
return this._delegate; return this._delegate;
@@ -225,7 +225,7 @@ global.__onUncaughtError = function (error: definition.NativeScriptError) {
if (types.isFunction(typedExports.onUncaughtError)) { if (types.isFunction(typedExports.onUncaughtError)) {
typedExports.onUncaughtError(error); typedExports.onUncaughtError(error);
} }
typedExports.notify({ eventName: typedExports.uncaughtErrorEvent, object: typedExports.ios, ios: error }); typedExports.notify({ eventName: typedExports.uncaughtErrorEvent, object: typedExports.ios, ios: error });
} }
@@ -276,11 +276,11 @@ typedExports.start = function (entry?: NavigationEntry) {
if (entry) { if (entry) {
exports.mainEntry = entry; exports.mainEntry = entry;
} }
started = true;
loadCss(); loadCss();
if(!iosApp.nativeApp) { if(!iosApp.nativeApp) {
// Normal NativeScript app will need UIApplicationMain. // Normal NativeScript app will need UIApplicationMain.
UIApplicationMain(0, null, null, typedExports.ios && typedExports.ios.delegate ? NSStringFromClass(typedExports.ios.delegate) : NSStringFromClass(Responder)); UIApplicationMain(0, null, null, typedExports.ios && typedExports.ios.delegate ? NSStringFromClass(typedExports.ios.delegate) : NSStringFromClass(Responder));
} else { } else {
let rootView = createRootView(); let rootView = createRootView();