-
Notifications
You must be signed in to change notification settings - Fork 406
Closed
Labels
staleauto labeled abandoned issues after a period of inactivityauto labeled abandoned issues after a period of inactivity
Description
Your Environment
- Plugin version: 3.1.0
- Platform: iOS
- OS version: 13.1
- Device manufacturer and model:
- Running in Simulator: Yes
- Cordova version (
cordova -v): Capacitor 1.3.0 - Cordova platform version (
cordova platform ls): - Plugin configuration options: debug: true, desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY, saveBatteryOnBackground: true
- Link to your project:
Context
In CDVBackgroundGeolocation, the notification delegate gets set:
center.delegate = self;
Immediately afterwards, in debug mode, this value gets stored in prevNotificationDelegate:
prevNotificationDelegate = center.delegate;
center.delegate = self;
When handling the notification, it calls always the handler of prevNotificationDelegate (which is self). This leads to and endless loop.
Expected Behavior
Notification should be handled in debug mode as well.
Actual Behavior
App crashes.
Possible Fix
IMHO prevNotificationDelegate is completely useless. Probably you can just remove it. Or at least call it only, if it != self.
Steps to Reproduce
Context
Debug logs
jackie-d
Metadata
Metadata
Assignees
Labels
staleauto labeled abandoned issues after a period of inactivityauto labeled abandoned issues after a period of inactivity