Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/opengl/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 无法读取未定义的本机权限的属性getPermissionStatus_React Native - Fatal编程技术网

React native 无法读取未定义的本机权限的属性getPermissionStatus

React native 无法读取未定义的本机权限的属性getPermissionStatus,react-native,React Native,调用Permissions.check()时出现此错误 我直接使用react本机权限自述文件中的代码 componentWillMount(){ 权限。检查('photo')。然后(响应=>{ 控制台日志(响应); }); }结果是 Permissions.getTypes() 无链接工作 我最终不得不按照这里的手册链接说明进行操作: 使用手动链接 In the XCode's "Project navigator", right click on your proje

调用Permissions.check()时出现此错误

我直接使用react本机权限自述文件中的代码

componentWillMount(){
权限。检查('photo')。然后(响应=>{
控制台日志(响应);
});
}
结果是

Permissions.getTypes()
无链接工作

我最终不得不按照这里的手册链接说明进行操作:

使用手动链接

In the XCode's "Project navigator", right click on your project's Libraries folder ➜ Add Files to <...>

Go to node_modules ➜ react-native-permissions ➜ select ReactNativePermissions.xcodeproj

Add libReactNativePermissions.a to Build Phases -> Link Binary With Libraries
在XCode的“项目导航器”中,右键单击项目的库文件夹➜ 将文件添加到
转到节点_模块➜ 反应本机权限➜ 选择ReactNativePermissions.xcodeproj
添加libReactNativePermissions.a以生成阶段->将二进制文件链接到库