4

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?

2 Answers2

7

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:

  1. Ensure that you have your react-native-unimodules installed and is reflected in your package.json.

  2. Ensure that expo-updates package is installed. Else run npm install expo-updates --save or use the yarn command.

  3. 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.

toydarian
  • 4,246
  • 5
  • 23
  • 35
  • `use_unimodules!` is key but just adding it without the appropriate require_relative at the top of the file will fail. See here for a good example of a full Podfile. https://stackoverflow.com/a/65084966/1131990 I used this and it resolved my issue – kakoma Dec 16 '20 at 20:44
  • I get "use_unimodules!" not found in my Podfile – JeremyF Mar 14 '22 at 21:14
3

Yes, as Kakoma says it is very necessary to place the route:

require_relative '../node_modules/react-native-unimodules/cocoapods'

at the beginning of the Podfile to avoid the following error:

Invalid Podfile file: undefined method use_unimodules! ' for # <Pod :: Podfile:

Angel Angeles
  • 91
  • 1
  • 3