Ionci Native background geolocation not work

Environment

  • Plugin version: Last version
  • Platform: iOS
  • OS version: 10
  • Device manufacturer and model: iPhone 7
  • Cordova version (cordova -v): 7.1.0
  • Cordova platform version (cordova platform ls): iOS
  • Plugin configuration options:
    desiredAccuracy: 10, stationaryRadius: 1, distanceFilter: 1, debug: true, stopOnTerminate: false,
    // Solo para Android
    locationProvider: 1, startForeground: true, interval: 6000, fastestInterval: 5000, activitiesInterval: 10000,

Context

Runtime error: Uncaught (in promise) plugin_not_installed

Steps to Reproduce

  1. Opening the app

Context

Debug logs

[10:13:04] tslint: src/app/app.module.ts, line: 28
‘BackgroundGeolocationConfig’ is declared but never used.
L27: import { Geolocation } from ‘@ionic-native/geolocation’;
L28: import { BackgroundGeolocation, BackgroundGeolocationConfig, BackgroundGeolocationResponse } from '@ionic-na
L29: import { Camera /,CameraOptions/ } from ‘@ionic-native/camera’;
[10:13:04] tslint: src/app/app.module.ts, line: 28
‘BackgroundGeolocationResponse’ is declared but never used.
L27: import { Geolocation } from ‘@ionic-native/geolocation’;
L28: import { BackgroundGeolocation, BackgroundGeolocationConfig, BackgroundGeolocationResponse } from '@ionic-na
L29: import { Camera /,CameraOptions/ } from ‘@ionic-native/camera’;
[10:13:04] lint finished in 4.22 s
[10:13:15] console.log: Ionic Pro initializing (app id: %cbf12280b%c) color: blue color: black
[10:13:16] console.log: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
[10:13:16] console.log: Ionic Native: deviceready event fired after 1264 ms
[10:13:16] console.warn: Native: tried calling BackgroundGeolocation.isLocationEnabled, but the BackgroundGeolocation plugin is not installed.
[10:13:16] console.warn: Install the BackgroundGeolocation plugin: 'ionic cordova plugin add
cordova-plugin-mauron85-background-geolocation’

Anybody have this similar errors?

Based on the error message I’d say the plugin isn’t installed. Also seems odd that your description says this is in iOS but the included image is very clearly a web browser.

It is instailed, this is the strangeness of the problem

I installl it using this doc:

Okay but what about the second part of what I posted, why is your screenshot of a browser…? Are you really running this on your iPhone?

You are seeing this error, because I’m running it in IONIC DEVAPP (LIKE NATIVE APP ON MY PHONE), then… the error is displayed in the browser and in the application console too. The plugin is installed, but I think it doesn’t work correctly, I was speaking with the creator of this plugin and he say me that there is some error in the Ionic Native version.

Ya, exactly, so you’re not running the actual app on your phone, this is why I was asking. The ionic dev app, as stated in it’s docs (https://ionicframework.com/docs/pro/devapp/) only has certain plugins installed on it. Here’s a direct link to the plugins pre installed on it: https://ionicframework.com/docs/pro/view.html#plugin-support

If you need other plugins that aren’t on that list, you must actually build and run the app on your phone, not just serve your web code over the net into the dev app.