Closed facetious closed 2 years ago
Hi @facetious . I tried adding a check, but seems like the plugin might need an update to 8.2 before that api is available.
@alexziskind1 Good point. I suppose it could just be done with regular javascript check:
if (!!applicationModule.ensureNativeApplication) {
application.ensureNativeApplication();
}
if (applicationModule.ios.delegate === undefined) {
Thanks @facetious . Would you mind submitting a PR? (or just add it into the code - you've got the rights :)
This access to
applicationModule.ios
can returnundefined
.https://github.com/alexziskind1/nativescript-oauth2/blob/d9f6a1861dcedc4e8d2ad34be8a8ae1bdb5680e8/src/delegate/index.ios.ts#L16
Calling
applicationModule.ensureNativeApplication()
first resolves the issue.I'm not sure if adding this call here is the best solution, but it is certainly a workaround that corrects the bug.