Closed leocaseiro closed 8 years ago
Remove the var __extends function
:
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
and replace the __extends(appDelegate, _super);
with this.__extends(appDelegate, _super);
So your code should be as follows:
if (application.ios) {
//IOS
var appDelegate = (function (_super) {
this.__extends(appDelegate, _super);
function appDelegate() {
_super.apply(this, arguments);
}
appDelegate.prototype.applicationDidFinishLaunchingWithOptions = function (application, launchOptions) {
//Module Code to initalize
googleAnalytics.initalize({
trackingId: "UA-XXXXXXX-1"
});
};
appDelegate.ObjCProtocols = [UIApplicationDelegate];
return appDelegate;
})(UIResponder);
application.ios.delegate = appDelegate;
}
Wow, that actually works.
Thanks for that!
Hi @sitefinitysteve, thank you for this amazing plugin.
I'm having issues with WebPack. It's working fine without bundling it, but if we bundle, the app won't start, and we get the error:
I believe it's related to the issue https://github.com/NativeScript/nativescript-dev-webpack/issues/8 which is caused by the
__extends()
.Do you know an easy fix for that? Thanks