iOS crashes on BackgroundGeolocation.start()
See original GitHub issueWhen trying to start the geolocation, the app crashes without any message, error handling or anything else.
Your Environmentnumeric version changes over the time -->
- Plugin version: 3.0.3 (newest)
- Platform: iOS
- OS version: 12
- Device manufacturer and model: iPhone 6, iOS 12
- Running in Simulator: Not possible
- Cordova version (
cordova -v
): newest (already reinstalled) - Cordova platform version (
cordova platform ls
): newest (already reinstalled) - Plugin configuration options:
- Link to your project:
Context
Im just calling the start method with all granted permissions. When starting the app, it crashes instantly after calling BackgroundGeolocation.start(); I´ve tried everything but ios debugging with javascript, cordova and ionic is like hell. Thus im trying to fix that issue with your help, to see if there are any methods to avoid this crash. The ionicerrorhandler isn´t even called, because that should normally send a report to sentry (what it doesn´t do)
Things i´ve tried:
- Running on different devies (ios 12, 13)
- granting permissions manually
- remove and add plattform
- remove and add plugin
P.S. on android everything works fine.
The code im using:
BackgroundGeolocation.configure({
locationProvider: BackgroundGeolocation.DISTANCE_FILTER_PROVIDER,
desiredAccuracy: BackgroundGeolocation.HIGH_ACCURACY,
stationaryRadius: 1,
distanceFilter: 30,
interval: 1000,
fastestInterval: 1000,
activitiesInterval: 1000,
saveBatteryOnBackground: true,
maxLocations: 1,
activityType: "AutomotiveNavigation",
debug: false,
});
this.startGettingLocations(); // registers an "on('location')" listener
await this.log("Configure Done"); // pops up
BackgroundGeolocation.start(); // Crashes
await this.log("Background location started.");
Expected Behavior
The Geolocator should start…
Actual Behavior
Crash
Possible Fix
/
Steps to Reproduce
- Call BackgroundGeolocation.start();
Context
Already tried many different things, and after a week trying to debug with mac os (virtually, dedicated, physically, virtualbox) im trying this way
Debug logs
No logs.
If you need any more information: im going to provide it asap.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top GitHub Comments
As already mentioned above, setting the information via config.xml worked. If somebody is facing the same issue, the first approach should be debugging the app with XCode directly.
But i set the config things like shown below <config><widget><platform name="ios">
hi there, i managed to fix the issue above by setting alle correct Information in the plist file. I debugged it with xcode, that worked very well.
Im not using thhe config settings of the plugin and wrote it in the config xml by myself
So i think your issue isnt related to this issue