-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[question]: Does this work in ExpoGo? #211
Comments
It does not work with Expo Go. Please see this repo's README for supported environments |
It also triggers the same error on npx expo run:android which shows supported. It does still seem to run in ExpoGo on the emulator though after running run:android, so is there another step you need to do to get it to work? We can compile an APK, but if there is a faster and easier method of debugging that would be very helpful. |
To anyone else having trouble with the "Cannot read property 'initialize' of undefined", it's because we used the example plugin and it's very out of date. With the current version you import it as Not We were trying to find a better example of usage, because the documentation didn't specify how to prompt users to enable notifications, however OneSignal has changed how this happens using in app messaging (which is actually pretty cool and has many other use cases) So you really do just need the initialize function. I suggest you read OneSignal's documentation as it's a bit more detailed: Once we made the change, npx expo run:android worked perfectly. |
@PolyPlugins thx so much! this should be updatet in the docs |
How can we help?
When trying to initialize, we're getting "Cannot read property 'initialize' of undefined"
We log OneSignal and it returns null.
We tried to npx expo run:android and the same thing is happening.
OneSignal Expo SDK version
"onesignal-expo-plugin": "^2.0.2",
"react-native-onesignal": "5.0.2",
Platform
Android
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: