You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using React + Capacitor fails on OneSignal init. I have been using it on a Vue project (not this package, the one related to Vue) and now I want to follow the same approach/logic within a React + Capacitor app. I've been following the official documentation, online examples and Youtube videos but in my case is not working.
"@capacitor/core": "^5.2.1",
"onesignal-cordova-plugin": "^3.3.1"
import OneSignal from 'onesignal-cordova-plugin';
function App() {
const OneSignalInit = () => {
OneSignal.setAppId(XXXXXXX);
}
OneSignalInit();
return ( <h1>Hello</>);
}
When I run the app, it crash and in console log I can see the next error:
Steps to reproduce?
1. Install React + Capacitor + onesignal plugin
2. Create a simple react app and add Capacitor.
3. Copy code example and run the app
What did you expect to happen?
I expected the app to run normally and initialize Onesignal plugin as described in docs.
OneSignal Cordova SDK version
3.3.1
Which platform(s) are affected?
iOS
Android
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
What happened?
Using React + Capacitor fails on OneSignal init. I have been using it on a Vue project (not this package, the one related to Vue) and now I want to follow the same approach/logic within a React + Capacitor app. I've been following the official documentation, online examples and Youtube videos but in my case is not working.
When I run the app, it crash and in console log I can see the next error:
Steps to reproduce?
What did you expect to happen?
I expected the app to run normally and initialize Onesignal plugin as described in docs.
OneSignal Cordova SDK version
3.3.1
Which platform(s) are affected?
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: