You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
message: undefined is not an object (evaluating 'RCTLocationObserver.getCurrentPosition')"
It seems that require('NativeModules').LocationObserver returns undefined in Geolocation.ios.js
I did add this to my info.plist:
<key>NSLocationWhenInUseUsageDescription</key>
<string>You need to add NSLocationWhenInUseUsageDescription key in Info.plist to enable geolocation, otherwise it is going to *fail silently*!</string>
I didn't realized I had to link libs manually. I don't think it's in the docs. If no one is working on it to the docs, I'm happy to add it this weekend :)
@naoisegolden I also got this error and i'm using pod too, but i can't fix this bug with the method you reminded. When I use pod search RCTGeolocation to search it, nothing can be find in the repos. Could you do me a favor to analyze about it? Thank you very much!
Activity
vjeux commentedon Mar 25, 2015
This is a bug on our end, the native module must not have been linked to the xcode project. @a2 can you help?
a2 commentedon Mar 25, 2015
Is this in an example project or in an app you're working on?
jnak commentedon Mar 25, 2015
Ah ok! I was trying this from the Movies app. How can I help ?
a2 commentedon Mar 25, 2015
I'll take a look now! 😺
a2 commentedon Mar 25, 2015
Oh, I see what you mean. Here's what you have to do:
That should be all you need. Let me know if that works for you. 😸
jnak commentedon Mar 25, 2015
AWESOME!
I didn't realized I had to link libs manually. I don't think it's in the docs. If no one is working on it to the docs, I'm happy to add it this weekend :)
Let me know!
everystone commentedon Nov 7, 2015
What about when developing for Android on Windows?
naoisegolden commentedon Dec 10, 2015
If you are working with Cocoapods, adding
RCTGeolocationto thePodfileand then runningpod installagain should do the trick.mikelambert commentedon May 11, 2016
Why was there is no mention of any of this on https://facebook.github.io/react-native/docs/geolocation.html ? :(
mobilesite commentedon Jun 28, 2016
@naoisegolden I also got this error and i'm using pod too, but i can't fix this bug with the method you reminded. When I use
pod search RCTGeolocationto search it, nothing can be find in the repos. Could you do me a favor to analyze about it? Thank you very much!smokinjoe commentedon Oct 27, 2016
@a2 is there a solution for Xcode 7.3.1? I was able to follow until selecting the library. I don't have libRCTGeolocation.a available.
