Issue building react-native project on ios - 'RCTAppDelegate.h' file not found"
Asked Answered
M

0

6

I'm helping someone with a react-native project (v0.71.7). Works fine on android, but on iOS I cannot for the life of me get it to build. They created the project on a m1 mac, but I'm using an intel mac - which i think might be related to the problem. There are some threads out there about this error message, but none of the proposed solutions have worked for me (and the react-native ticket on the topic is a long screen of 'this worked for me', 'this didnt work for me' etc). The error message that I get when I build is - "..../AppDelegate.h:1:9: fatal error: 'RCTAppDelegate.h' file not found"

Looking in the AppDelegate file i have -

#import <RCTAppDelegate.h>
#import <UIKit/UIKit.h>

@interface AppDelegate : RCTAppDelegate

@end

So it tries to import that file (and it is indeed not in the path its looking in). So my question(s) - i) What is RCTAppDelegate for? ii) why is it being imported? iii) Why is it not there? iv) and obviously, how should i proceed to fix it? Maybe I can just remove it?

bit of a noob in the react-native native side of things, sorry if this is a dumb question.

Things ive tried (together and separate) - i) changing excluded archs in xcode ii) reinstalling cocoapods via gem insteaad of hombrew iii) deleted pods, podfile.lock and created a new podfile iv) pod install v) removed node_modules

nb we're using pnpm as our package manager. cheers, any help much appreciated.

Meet answered 28/6, 2023 at 19:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.