IM trying to use onesignal with react native. I linked everything on android and ios. Everything is working fine on ios but I get undefined is not an object (evaluating RNOneSignal.configure).
and I just added this line: OneSignal.configure({});
on the AppDelegate.m put the @synthesize oneSignal = _oneSignal; statement between the @implementation block and the @end block. I was putting it after @end and I was having the same problem. Hope it helps.
I had the same issue. In my way the reason was this library was not linked correctly. Check this strings in file android/app/src/main/java/YOUR_APP_FOLDER/MainApplication.java:
import com.geektime.rnonesignalandroid.ReactNativeOneSignalPackage;
before first method and
new ReactNativeOneSignalPackage()
inside "return Arrays.asList("
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.