So, i used to be making a customized NativeScript Plugin to implement NewRelic for my iOS software. Testing the plugin within the NativeScript Plugin Seed enviroment appears to work wonderful.
After i added the plugin to my very own challenge, it is getting an error, when it tries to name NewRelic.
That is, how NewRelic is being referred to as within the plugin.
That is the index.ios.ts half:
import { NewRelicCommon, NewRelicOptions } from './widespread';
import { } from '@nativescript/core';
declare const NewRelic;
@NativeClass()
export class NewRelicAgent extends NewRelicCommon {
constructor() {
tremendous();
}
init(args: NewRelicOptions): void {
NewRelic.startWithApplicationToken(args.token);
}
}
That is the service i construct in my challenge:
import { Injectable } from '@angular/core';
import { NewRelicAgent, NewRelicOptions } from '@companyscrope/new-relic';
import { NewRelicService } from '@resident-nx/shared';
const newrelic = new NewRelicAgent();
let args: NewRelicOptions;
@Injectable()
export class NewRelicNSService extends NewRelicService {
constructor() {
tremendous();
}
public initialize() {
args = {
token: 'GENERATED_TOKEN',
};
newrelic.init(args);
}
}
I attempted calling the service in my app.element.ts however i get this error:
ERROR ReferenceError: NewRelic is just not outlined
Does anybody know, if i did one thing fallacious within the plugin half or why is it not discovering NewRelic?
I anticipated NewRelic for iOS to begin when the app begins.