【发布时间】:2021-08-14 08:53:25
【问题描述】:
异常 '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x60000140a440' 在使用参数调用目标 LinkingManager 上的 canOpenURL 时被抛出( “关于:srcdoc”, 41622, 41623
我在我的 React-Native 应用程序中尝试使用 WebView 时遇到了这个问题。我只在 iOS 中看到这个错误,android 运行良好。这是我的 WebView 代码。
返回(
<View style={{ flex: 1, }}>
<SafeAreaView style={{ flex: 1, }}>
{renderHeader()}
<WebView
source={{uri: 'https://medmate.com.au/frequently-asked-questions/'}}
renderLoading={() => (
<ActivityIndicator
color={colors.BUTTON_BG}
size='large'
style={{position: 'absolute',
width: '100%',
height: '100%',
backgroundColor: 'white',
alignSelf: 'center',
justifyContent: 'center',
top: 0,
left: 0,
right: 0,
bottom: 0,
zIndex: 10,
elevation: 1000,}}
/>
)}
/>
这是模拟器错误。
https://i.stack.imgur.com/ObQRO.png
这是我的 package.json 文件:
1.https://i.stack.imgur.com/e9ftl.jpg 2.https://i.stack.imgur.com/nbnOf.jpg
【问题讨论】:
-
一次检查 originWhitelist github.com/react-native-webview/react-native-webview/blob/…
标签: react-native