mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
wrong app delegate creation removed
This commit is contained in:
@ -144,7 +144,6 @@ class IOSApplication implements definition.iOSApplication {
|
|||||||
|
|
||||||
public nativeApp: any;
|
public nativeApp: any;
|
||||||
public rootController: any;
|
public rootController: any;
|
||||||
private _tnsAppdelegate: TNSAppDelegate;
|
|
||||||
private _registeredObservers = {};
|
private _registeredObservers = {};
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
@ -152,10 +151,6 @@ class IOSApplication implements definition.iOSApplication {
|
|||||||
this.nativeApp = UIApplication.sharedApplication();
|
this.nativeApp = UIApplication.sharedApplication();
|
||||||
}
|
}
|
||||||
|
|
||||||
public init() {
|
|
||||||
this._tnsAppdelegate = new TNSAppDelegate();
|
|
||||||
}
|
|
||||||
|
|
||||||
public addNotificationObserver(notificationName: string, onReceiveCallback: (notification: NSNotification) => void) {
|
public addNotificationObserver(notificationName: string, onReceiveCallback: (notification: NSNotification) => void) {
|
||||||
var observer = NotificationReceiver.new().initWithCallback(onReceiveCallback);
|
var observer = NotificationReceiver.new().initWithCallback(onReceiveCallback);
|
||||||
NSNotificationCenter.defaultCenter().addObserverSelectorNameObject(observer, "onReceive", notificationName, null);
|
NSNotificationCenter.defaultCenter().addObserverSelectorNameObject(observer, "onReceive", notificationName, null);
|
||||||
@ -173,7 +168,6 @@ class IOSApplication implements definition.iOSApplication {
|
|||||||
// TODO: If we have nested require(application) calls we may enter unfinished module state, which will create two delegates, resulting in an exception
|
// TODO: If we have nested require(application) calls we may enter unfinished module state, which will create two delegates, resulting in an exception
|
||||||
var app = new IOSApplication();
|
var app = new IOSApplication();
|
||||||
exports.ios = app;
|
exports.ios = app;
|
||||||
app.init();
|
|
||||||
|
|
||||||
exports.start = function () {
|
exports.start = function () {
|
||||||
appModule.loadCss();
|
appModule.loadCss();
|
||||||
|
Reference in New Issue
Block a user