更新时间:2023-01-02 11:17:31
这个错误意味着 Xcode 无法找到应该在你的开发 pod 文件夹中的包(至少对我来说是这样)>
需要仔细检查的几点:
确保您安装了 react-native-unimodules
并反映在您的 package.json
中.
确保安装了 expo-updates
包.否则运行 npm install expo-updates --save
或使用 yarn
命令.
在你的 Podfile
中,确保你有这一行:use_unimodules!
确保两者都存在后,运行 cd ios
然后运行 pod install
来安装 EX 模块.这些模块应该在您的Development Pods"文件夹中.最后,重建你的 xcode 项目.这些方法对我有用.希望他们能有所帮助.
react native ios build fails with error
'EXUpdates/EXUpdatesAppController.h' file not found
file used in AppDelegate.h
#import <Foundation/Foundation.h>
#import <EXUpdates/EXUpdatesAppController.h> <--- here
#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>
#import <UMCore/UMAppDelegateWrapper.h>
@interface AppDelegate : UMAppDelegateWrapper <RCTBridgeDelegate, EXUpdatesAppControllerDelegate>
@end
Anyone solutions?
This error means that Xcode is unable to find the package that is supposed to be in your development pod folder ( at least that is the case for me)
Few points to double check:
Ensure that you have your react-native-unimodules
installed and is reflected in your package.json
.
Ensure that expo-updates
package is installed. Else run npm install expo-updates --save
or use the yarn
command.
In your Podfile
, ensure you have this line : use_unimodules!
After ensuring both are there, run cd ios
followed by pod install
to install the EX modules. The modules should be in your 'Development Pods' folder. Lastly,
rebuild your xcode project. These ways work for me. Hopefully, they can be of some help.