Hi,
I ran into this problem with the InAppBrowser Plugin (@ionic-native/in-app-browser) after I tried to refactor a feature of my app. I extracted a part of the functionality of a page to a service provider.
In Android everything still works fine, but iOS execution is stopped right after the splash screen is shown with following error:
“ReferenceError: Can’t find variable: InAppBrowser”
(line number pointing to the constructor arguments of my new service provider)
constructor of my service provider
constructor(
private localizationService: ILocalizationService,
private basketService: IBasketService,
private iab: InAppBrowser,
private platform: Platform,
private injector: Injector
) {}
app.module.ts
providers:[
…
{
provide: 'ICheckoutService',
useClass: CheckoutService,
deps: [ 'ILocalizationService', 'IBasketService', InAppBrowser, Platform, Injector ]
}
]
Before I had the 3 constructor arguments injected in a Page/Component, where it worked perfectly fine…
I know I could go back to the last version of the code, but that component was seriously cluttered, a refactoring had to be done.
I have absolutely no clue what’s wrong and where it may fail and I would be very appreciative of any pointers or hints.
I already tried removing/reinstalling the plugin, same with the ios platform… even deleted the node_modules and reinstalled all npm packages which did nothing
Thanks in advance!