From 5cc91bc79a1c7e3c6bf0d034dc28d2972d37c63b Mon Sep 17 00:00:00 2001 From: Matthew Harris Date: Fri, 9 Aug 2019 16:07:39 +0700 Subject: [PATCH] fix(background-geolocation): enum not string (#3131) based on [this stackoverflow issue](https://stackoverflow.com/questions/57293829/argument-of-type-location-is-not-assignable-to-parameter-of-type-backgroundge/57302110#57302110) it seems passing the string causes problems in (some / all) scenarios --- src/@ionic-native/plugins/background-geolocation/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/@ionic-native/plugins/background-geolocation/index.ts b/src/@ionic-native/plugins/background-geolocation/index.ts index d9e15121f..c6b540bce 100644 --- a/src/@ionic-native/plugins/background-geolocation/index.ts +++ b/src/@ionic-native/plugins/background-geolocation/index.ts @@ -499,7 +499,7 @@ export declare enum BackgroundGeolocationIOSActivity { * BackgroundGeolocation must be called within app.ts and or before Geolocation. Otherwise the platform will not ask you for background tracking permission. * * ```typescript - * import { BackgroundGeolocation, BackgroundGeolocationConfig, BackgroundGeolocationResponse } from '@ionic-native/background-geolocation'; + * import { BackgroundGeolocation, BackgroundGeolocationConfig, BackgroundGeolocationEvents, BackgroundGeolocationResponse } from '@ionic-native/background-geolocation'; * * constructor(private backgroundGeolocation: BackgroundGeolocation) { } * @@ -516,7 +516,7 @@ export declare enum BackgroundGeolocationIOSActivity { * this.backgroundGeolocation.configure(config) * .then(() => { * - * this.backgroundGeolocation.on('location').subscribe((location: BackgroundGeolocationResponse) => { + * this.backgroundGeolocation.on(BackgroundGeolocationEvents.location).subscribe((location: BackgroundGeolocationResponse) => { * console.log(location); * * // IMPORTANT: You must execute the finish method here to inform the native plugin that you're finished,