IONIC 4 how to use react native plugin in ionic native


this plugin does exactly what I need in the simplest way, I know react can now somehow work in ionic 4, I’m just not sure if react native plugins can work in ionic native, but I really need this or a similar plugin/fix for ionic

I installed it: npm install react-native-appstore-version-checker --save

I imported and injected in app.module.ts
import { getAppstoreAppVersion } from “react-native-appstore-version-checker”;
and in providers I added getAppstoreAppVersion

I imported it into app.component.ts and injected it into the construtor
and I am using it in a method

everything seems like it could really work, but when build gets to 95% it catches
image

I think all I’m missing is this

build.grade updated
image

settings.grade updated

All i’m missing is the mainactivity configuration, could someone help me through it I don’t understand what I might be doing wrong

  • Add import com.masteratul.RNAppstoreVersionCheckerPackage; to the imports at the top of the file
  • Add new RNAppstoreVersionCheckerPackage() to the list returned by the getPackages() method