0
我有一个反应本机应用程序(v0.42.0
),我尝试使用Geolocation但是当我navigator.geolocation
如下:本机模块不能navigator.geolocation为空的阵营本地
本机模块不能为空。
是否有其他人遇到这个问题或知道如何诊断原因?
我有一个反应本机应用程序(v0.42.0
),我尝试使用Geolocation但是当我navigator.geolocation
如下:本机模块不能navigator.geolocation为空的阵营本地
本机模块不能为空。
是否有其他人遇到这个问题或知道如何诊断原因?
事实证明,使用的CocoaPods时作出反应原住民有必要包括在Podfile
RCTGeolocation
:
pod 'React', :path => '../some/path/node_modules/react-native', :subspecs => [
'Core',
'RCTAnimation',
'RCTImage',
'RCTText',
'RCTWebSocket', # needed for debugging
'RCTLinkingIOS',
'ART',
'RCTPushNotification',
'RCTActionSheet',
'RCTGeolocation'
]
知道错误:由于重写原型,你需要做到这一步,问候)。 https://facebook.github.io/react-native/docs/pushnotificationios.html – 2017-09-25 20:33:37