Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

ios Error: New location is older than requested maximum age! #79

Closed
nmongiya opened this issue Oct 18, 2017 · 6 comments
Closed

ios Error: New location is older than requested maximum age! #79

nmongiya opened this issue Oct 18, 2017 · 6 comments
Assignees

Comments

@nmongiya
Copy link

Make sure to check the demo app(s) for sample usage

Make sure to check the existing issues in this repository

If the demo apps cannot help and there is no issue for your problem, tell us about it

Please, ensure your title is less than 63 characters long and starts with a capital
letter.

Which platform(s) does your issue occur on?

  • iOS
  • iOS 11.0.2
  • Device. iPhone 6?

Please, provide the following version numbers that your issue occurs with:

"nativescript-pro-ui": "^3.1.3",
tns --version 3.2.0
"tns-ios": {
"version": "3.2.0"
}

Please, tell us how to recreate the issue in as much detail as possible.

Describe the steps to reproduce it.

`geolocation.isEnabled()
.then((hasPermission) => {
if (hasPermission) {
this.getLocation();
} else {
geolocation.enableLocationRequest()
.then(() => {
this.getLocation();
})
}

		})
		.catch(() => {
			geolocation.enableLocationRequest()
				.then(() => {
					this.getLocation();
				})
		});`
@DimitarTachev
Copy link
Contributor

Hi @nmongiya,

What's the content of your "this.getLocation();" method?

@nmongiya
Copy link
Author

Hi @DimitarTachev
getLocation() { geolocation.getCurrentLocation({ desiredAccuracy: Accuracy.high, maximumAge: 5000, timeout: 20000 }) .then((location) => { console.log('location received' + location); }) .catch((error) => { console.log('error received' + error); }); }

@DimitarTachev
Copy link
Contributor

@nmongiya I suppose you found the same behavior as issue #78. You could try the workaround suggested there till someone implement the logic inside the plugin.

@AnthonySmith01
Copy link

@DimitarTachev, I think this issue is quite serious. I'm finding that it completely breaks nativescript-geolocation on newer devices.

Might try to have a look at the plugin myself, would be good to see if anyone else is working on it.

Thanks for the great plugin btw!

@DimitarTachev
Copy link
Contributor

Hi @SM1DDY, thanks for your feedback.

Unfortunately, the fix described in issue #78 is still on our TODO list. It will be great if you are able to implement it in the plugin.

@DimitarTachev
Copy link
Contributor

Fixed and released

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants