Hello everybody,
I have implemented OneSignal in my React-Native application with Expo, but I have a problem. Not always when I do a deploy they work correctly (right now they don't work for me).
I use Expo to make my deploy and send the compilation to Apple, plus he takes care of creating the certificates (except for the notification key).
This has worked before but not every time I do a deoploy. Am I missing something ? Is there some kind of bug with the implementation ? (No Recipients appears in the OneSignal panel)
The OneSignal plugin in the first place:
"plugins": [
[
"onesignal-expo-plugin",
{
"mode": "production"
}
],
[
"expo-location",
{
"locationAlwaysAndWhenInUsePermission": "Allow Planeta Huerto to use your location."
}
]
]
Class to use the library:
class OneSignalNotificationService implements INotificationProviderEntity {
initialize(): void {
OneSignal.setAppId(configApp.notifications.oneSignalAppId);
OneSignal.promptForPushNotificationsWithUserResponse();
}
handleNotificationsReceived(): void {
//Method for handling notifications received while app in foreground
OneSignal.setNotificationWillShowInForegroundHandler(
(notificationReceivedEvent: any) => {
let notification = notificationReceivedEvent.getNotification();
// Complete with null means don't show a notification.
notificationReceivedEvent.complete(notification);
}
);
}
handleNotificationsOpened(): void {
//Method for handling notifications opened
OneSignal.setNotificationOpenedHandler((notification: any) => {
const data = notification.notification.additionalData;
if (data) {
EventBus.emit("openNotification", data);
}
});
}
}
What happened?
Hello everybody, I have implemented OneSignal in my React-Native application with Expo, but I have a problem. Not always when I do a deploy they work correctly (right now they don't work for me). I use Expo to make my deploy and send the compilation to Apple, plus he takes care of creating the certificates (except for the notification key). This has worked before but not every time I do a deoploy. Am I missing something ? Is there some kind of bug with the implementation ? (No Recipients appears in the OneSignal panel) The OneSignal plugin in the first place:
Class to use the library:
Call:
Steps to reproduce?
What did you expect to happen?
Push notifications should work
OneSignal Expo SDK version
"onesignal-expo-plugin": "1.0.2", "expo": "~48.0.10", "react-native-onesignal": "^4.5.1"
I know it's not the latest version, but with this one it worked. Even so, I have updated the libraries in several tests and nothing.
Platform
iOS
Relevant log output
No response
Code of Conduct