# Ionci Native background geolocation not work

**URL:** <https://forum.ionicframework.com/t/ionci-native-background-geolocation-not-work/123212>\
**Category:** Ionic Native\
**Created:** [March 2, 2018, 1:52pm UTC](https://forum.ionicframework.com/t/ionci-native-background-geolocation-not-work/123212 "2018-03-02T13:52:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SergioSGil](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sergiosgil/32/115789_2.png) [@SergioSGil](https://forum.ionicframework.com/u/SergioSGil)\
**Post date:** [March 2, 2018, 1:52pm UTC](https://forum.ionicframework.com/t/ionci-native-background-geolocation-not-work/123212/1 "2018-03-02T13:52:56Z")

</div>

## 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

 ![captura de pantalla 2018-02-23 a las 10 12 11](https://user-images.githubusercontent.com/3636232/36586431-0c97e556-1882-11e8-9f10-bc9df7366fd8.png)

## 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?

---

<div class="post-metadata">

**Author:** ![rlouie](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rlouie/32/134973_2.png) [@rlouie](https://forum.ionicframework.com/u/rlouie)\
**Post date:** [March 2, 2018, 2:54pm UTC](https://forum.ionicframework.com/t/ionci-native-background-geolocation-not-work/123212/2 "2018-03-02T14:54:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![SergioSGil](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sergiosgil/32/115789_2.png) [@SergioSGil](https://forum.ionicframework.com/u/SergioSGil)\
**Post date:** [March 2, 2018, 3:13pm UTC](https://forum.ionicframework.com/t/ionci-native-background-geolocation-not-work/123212/3 "2018-03-02T15:13:46Z")

</div>

It is instailed, this is the strangeness of the problem

I installl it using this doc:

> **[Ionic Framework](https://ionicframework.com/docs/native/background-geolocation/)**
>
> Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards

---

<div class="post-metadata">

**Author:** ![rlouie](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rlouie/32/134973_2.png) [@rlouie](https://forum.ionicframework.com/u/rlouie)\
**Post date:** [March 2, 2018, 3:40pm UTC](https://forum.ionicframework.com/t/ionci-native-background-geolocation-not-work/123212/4 "2018-03-02T15:40:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![SergioSGil](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sergiosgil/32/115789_2.png) [@SergioSGil](https://forum.ionicframework.com/u/SergioSGil)\
**Post date:** [March 3, 2018, 11:16am UTC](https://forum.ionicframework.com/t/ionci-native-background-geolocation-not-work/123212/5 "2018-03-03T11:16:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rlouie](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rlouie/32/134973_2.png) [@rlouie](https://forum.ionicframework.com/u/rlouie)\
**Post date:** [March 3, 2018, 2:47pm UTC](https://forum.ionicframework.com/t/ionci-native-background-geolocation-not-work/123212/6 "2018-03-03T14:47:20Z")

</div>

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/](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](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.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:48pm UTC](https://forum.ionicframework.com/t/ionci-native-background-geolocation-not-work/123212/7 "2021-07-19T21:48:28Z")

</div>

Closed on July 19, 2021, 9:48pm UTC


