mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 11:42:04 +08:00
Merge pull request #526 from NativeScript/app-delegate
wrong app delegate creation removed
This commit is contained in:
@ -145,7 +145,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() {
|
||||||
@ -153,10 +152,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);
|
||||||
@ -174,7 +169,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