我跟随react-native-image-picker的自述文件进行了手动和自动链接(单独尝试)。
当我使用react-native run-ios
从终端启动模拟器时,我收到错误消息。从Xcode启动它工作正常,我可以访问CameraRoll选择器没问题。
以下是我正在使用的版本:
"react-native": "0.43.3",
"react-native-image-picker": "^0.26.3",
我在这里看到了一个类似的帖子stackoverflow,似乎我不是唯一有这个问题的人。
感谢您的帮助。
完整错误:
undefined is not an object (evaluating 'ImagePickerManager.showImagePicker')
showImagePicker
index.js:28:30
selectPhotoTapped
CamPick.js:31:32
touchableHandlePress
TouchableOpacity.js:126:45
_performSideEffectsForTransition
Touchable.js:746:34
_receiveSignal
Touchable.js:664:44
touchableHandleResponderRelease
Touchable.js:433:24
invokeGuardedCallback
ReactErrorUtils.js:30:9
executeDispatch
EventPluginUtils.js:99:42
executeDispatchesInOrder
EventPluginUtils.js:127:20
executeDispatchesAndRelease
EventPluginHub.js:37:46
forEachAccumulated
forEachAccumulated.js:30:16
processEventQueue
EventPluginHub.js:227:8
runEventQueueInBatch
ReactEventEmitterMixin.js:18:35
handleTopLevel
ReactEventEmitterMixin.js:38:25
<unknown>
ReactNativeEventEmitter.js:113:8
perform
Transaction.js:149:24
batchedUpdatesWithControlledComponents
ReactGenericBatching.js:51:26
_receiveRootNodeIDEvent
ReactNativeEventEmitter.js:111:40
receiveTouches
ReactNativeEventEmitter.js:200:8
__callFunction
MessageQueue.js:244:47
<unknown>
MessageQueue.js:108:26
guard
MessageQueue.js:46:4
callFunctionReturnFlushedQueue
MessageQueue.js:107:10
答案 0 :(得分:2)
似乎Xcode没有正确链接文件,为我工作的诀窍是:
希望它可以帮助那些可能遇到同样问题的人;)