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
1. Update package to last version 5.0.0 from 3.1.1
2. Delete ios folder
3. npm i
4. npx cap sync
5. All works fine :)
6. ionic serve
7. Errors :( 'Property getDeviceState does not exist on type 'OneSognalPlugin'
Really, everything related to Onesignal."Function" gives me an error
This is my working code on 3.3.1
`
/* Onesignal */
import OneSignal from 'onesignal-cordova-plugin';
document.addEventListener("deviceready", OneSignalInit, false);
function OneSignalInit(): void {
OneSignal.setAppId("ID");
OneSignal.setNotificationOpenedHandler(function(jsonData) {
console.log('notificationOpenedCallback: ' + JSON.stringify(jsonData));
});
OneSignal.promptForPushNotificationsWithUserResponse(function(accepted) {
console.log("User accepted notifications: " + accepted);
});
OneSignal.getDeviceState((state) => {
app.config.globalProperties.$oneSignalState = state;
});
}
### What did you expect to happen?
All works fine after upgrade plugin
### OneSignal Cordova SDK version
5.0.0
### Which platform(s) are affected?
- [X] iOS
- [X] Android
### Relevant log output
_No response_
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
<!-- probot = {"onesignal-probot":{"response_time_in_business_days":21}} -->
The text was updated successfully, but these errors were encountered:
What happened?
I have an app write in Vue3 with ionic/capacitor
I'm on 3.3.1 and everyting works fine.
But if i upgrade to 5.0.0 some errors became
Steps to reproduce?
The text was updated successfully, but these errors were encountered: