集成在React Native上找不到的现有应用程序iOS“React / RCTEventDispatcher.h”文件

时间:2017-02-13 12:41:23

标签: ios react-native

我正在尝试将Obj-C中制作的现有应用程序与React Native集成。当我不使用任何外部库时,它会成功构建,但是当我尝试与https://github.com/futurice/react-native-audio-toolkit(或任何其他库)集成时,它会给我这个错误:

'React/RCTEventDispatcher.h' file not found

编辑:

出于某种原因,可以通过更改导入来修复它:

<React/RCTEventDispatcher.h>

要:

"RCTEventDispatcher.h"

1 个答案:

答案 0 :(得分:0)

1-从我的iPhone模拟器中删除该应用,然后转到“硬件”->“删除所有内容和设置”。

2-删除iOS Podfile中所有链接的依赖项文件 (pod'xxxxxxx',:path =>'../ node_modules / xxxxx)

3-关闭Xcode,通过在iOS文件夹中编写“ pod update”来更新Pod,然后运行“ react-native link”。

4-打开Xcode并转到菜单->产品->清理生成文件夹,然后在Xcode中运行该应用程序。

5-将“ react-native-gesture-handler”手动链接到您的Xcode中

6-通过Xcode运行您的应用

相关问题