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

Update package to use react-native-geolocation #69

Closed
oakis opened this issue Apr 15, 2019 · 9 comments
Closed

Update package to use react-native-geolocation #69

oakis opened this issue Apr 15, 2019 · 9 comments

Comments

@oakis
Copy link
Contributor

oakis commented Apr 15, 2019

Geolocation is being removed in RN 0.60 and is moved to https://github.com/react-native-community/react-native-geolocation

@JanithaR
Copy link

What do you mean by the title? Isn't this package a solution (alternative) for react-native-geolocation?

@oakis
Copy link
Contributor Author

oakis commented May 14, 2019

@JanithaR
Copy link

JanithaR commented May 14, 2019 via email

@Agontuk
Copy link
Owner

Agontuk commented May 26, 2019

react-native-geolocation is needed because this package uses RN's default implementation for iOS. Since it's moved into a separate repo we have to integrate that too. I can push a commit but can't test it cause I don't have any iOS device.

@canpoyrazoglu
Copy link

canpoyrazoglu commented Jun 25, 2019

I've forked the repo (feel free to use if you need it before this repo is officially updated) at https://github.com/canpoyrazoglu/react-native-geolocation-service. (Though you'll need to add and link the dependency manually, see below.)

I can confirm that it works (at least, on iOS, couldn't test Android yet) after adding the geolocation package:

yarn add @react-native-community/geolocation

Linking it:
react-native link @react-native-community/geolocation

And referencing it in index.js (I've already done it in my fork):
import Geolocation from '@react-native-community/geolocation'

And also deleting the line (I've already done it in my fork):
let Geolocation = global.navigator.geolocation;
(as we'll be using the imported version as the same variable).

I'm on RN 0.60 RC2 and can confirm it works correctly on my device (iPhone X, iOS 12.3.1).

@Agontuk
Copy link
Owner

Agontuk commented Jun 30, 2019

Sorry guys, I've been pretty busy with work lately so haven't pushed an update regarding this. I'll fix this tonight.

@Agontuk
Copy link
Owner

Agontuk commented Jul 2, 2019

I've pushed a commit in master branch to fix this, please try and let me know if it works. I'll then release it in npm registry.

@c-schuette
Copy link

Hey, anythink new about adding it to the npm registry? And thanks for this helpful package :)

@Agontuk
Copy link
Owner

Agontuk commented Aug 2, 2019

New version is already available in npm.

@Agontuk Agontuk closed this as completed Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants