Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ibeacon): undefined locationManager #3711

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/@ionic-native/plugins/ibeacon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export class IBeacon extends IonicNativePlugin {
*/
@CordovaCheck({ sync: true })
Delegate(): IBeaconDelegate {
const delegate = new window.cordova.plugins.locationManager.Delegate();
const delegate = new cordova.plugins.locationManager.Delegate();

delegate.didChangeAuthorizationStatus = (pluginResult?: IBeaconPluginResult) => {
return new Observable<IBeaconPluginResult>((observer: any) => {
Expand Down Expand Up @@ -358,7 +358,7 @@ export class IBeacon extends IonicNativePlugin {
});
};

window.cordova.plugins.locationManager.setDelegate(delegate);
cordova.plugins.locationManager.setDelegate(delegate);
return delegate;
}

Expand All @@ -382,7 +382,7 @@ export class IBeacon extends IonicNativePlugin {
minor?: number,
notifyEntryStateOnDisplay?: boolean
): BeaconRegion {
return new window.cordova.plugins.locationManager.BeaconRegion(
return new cordova.plugins.locationManager.BeaconRegion(
identifer,
uuid,
major,
Expand Down