Closed Mouzmi closed 6 years ago
Thanks for the report, we'll investigate! Can you confirm that:
I tested this and … It Works For Me™.
What I've done:
I took the example app bundled with the plugin, and I double-checked that it has the "uses Bluetooth LE accessories" background mode enabled.
I added the PushNotificationIOS component, and added:
import { PushNotificationIOS } from "react-native";
PushNotificationIOS.requestPermissions();
at the top of the example/index.js file; and:
PushNotificationIOS.presentLocalNotification({
alertBody: "Ka-ching!",
});
... in the onEnterAction
.
I run the app in the Release configuration, so that it would bundle the JavaScript directly in the app, instead of trying to reach the development server.
I granted the "Always" authorization and permission to show notifications.
I locked the phone and tested, with the app running in the background, that the notifications get triggered.
I then killed the app, and went for a 5-minute walk in the park 🌳 next to our office. They say breaks and fresh air is good for you! Seriously though, this step is important! iOS won't relaunch a killed app if it's already in range of a beacon. And due to how Estimote Proximity is implemented, you actually need to be out of range of any Estimote beacon—so it wasn't enough for me to just leave my desk, I had to leave the office.
When I came back to my desk, I got the notification.
If the App is in killed state (ie, I tapped on the home button and swipe up the app), Notification from Beacons are not received. The issue is in iOS. In the same scenario Android is receiving notification. Is this some issue with iOS only