Geolocation plugin from ionic is not working in windows phone 10 device

Hi Team,

I am using below code for Geolocation plugin.

Help me to fix this issue.

  Geolocation.getCurrentPosition().then((resp) => {
}).catch((error) => {
  console.log('Error getting location', error);

catch block is executing.

K Mohammad Mujahid

(I changed your post to format your code or error message correctly. Please use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.)

What is error saying?
Are you using the plugin via Ionic Native?

Yes I am using ionic native plugin. I have created the new project. But in new project it’s working as expected. I am not getting what was the issue with this project.

The issue is likely that you were trying to use v2 static class method syntax with ionic-native v3, which wants you to inject plugin shim objects and call object methods on them instead.