Agontuk / react-native-geolocation-service

React native geolocation service for iOS and android
https://www.npmjs.com/package/react-native-geolocation-service
MIT License
1.61k stars 292 forks source link

Expo RNFusedLocation.getCurrentPosition is null error #259

Closed KatancicDenisz closed 2 years ago

KatancicDenisz commented 3 years ago

Can I use this package with expo? I tried it and I got an error saying null is not an object (evaluating RNFusedLocation.getCurrentPosition)

Agontuk commented 3 years ago

Not sure, I didn't try expo yet. I'll check their documentation to see if they support integrating native modules.

KatancicDenisz commented 3 years ago

Not sure, I didn't try expo yet. I'll check their documentation to see if they support integrating native modules.

Okay, thank you.

KatancicDenisz commented 3 years ago

Not sure, I didn't try expo yet. I'll check their documentation to see if they support integrating native modules.

Any luck? :)

Agontuk commented 3 years ago

Not able to try it out right now. But as far as I understand, you can't use native dependencies if you're on Managed Workflow. It should work fine in Bare Workflow.

JohnMealy23 commented 2 years ago

@Agontuk,

It's been a year, and I'm wondering if things have changed.

I'm currently getting the error indicated by the OP, but looking at Expo's docs, it does look like the managed workflow intends to support getCurrentPosition and other location functionality with the proper app.json config.

I'll also follow up on the Expo side to see I can dig anything up there. Would love some help or indication from this side, too, if possible. New at React Native and could use all the help I can get!

Agontuk commented 2 years ago

I'm pretty sure expo does not support third party native libraries. You can check here https://docs.expo.dev/workflow/using-libraries/#determining-third-party-library-compatibility

You need to eject your expo project to install libraries with native code

Agontuk commented 2 years ago

Closing this, since it's not possible to add native dependencies in Expo's Managed Workflow.

mohammed412 commented 1 year ago

@Agontuk i got the same issue did you find a solution ??

chhornponleu commented 2 months ago

Same issue with Expo 51