I am developing a React Native app using version 0.79 with the New Architecture enabled. I have implemented a custom Native Module (Turbo Module) using Swift, which is bridged to Objective-C via a bridging header. This setup works perfectly in a bare project.
However, I need to use some Expo libraries, so I integrated Expo into my existing bare project using the standard command:
npx install-expo-modules@latest
After the installation, when I try to build the iOS project, the build fails with the following errors pointing to AppDelegate:
error cannot find interface declaration for 'EXExpoAppDelegate', superclass of 'AppDelegate'
error cannot find interface declaration for 'ModulesProvider', superclass of 'ExpoModulesProvider'
error cannot find interface declaration for 'ExpoReactNativeFactoryDelegate', superclass of 'ReactNativeDelegate'
error Failed to build ios project. "xcodebuild" exited with error code '65'.
It seems like the headers or definitions for the Expo modules (which were automatically added to AppDelegate by the script) are not visible to the compiler.
Project Setup:
React Native: 0.79.0
Architecture: New Architecture (Turbo Modules enabled)
Language: Swift & Objective-C (Bridging Header used)
Platform: iOS
Installation Method: Bare project ->
npx install-expo-modules@latest
What I have checked:
I verified that
install-expo-modulesmodified myAppDelegate.handAppDelegate.mmto inherit fromEXExpoAppDelegate.I have run
pod installinside theiosfolder.My Swift Turbo Module works fine if I revert the Expo installation.
Reproduction: I have created a minimal reproduction repository demonstrating this issue: TurboModuleExp
Question: How can I resolve these issues.
Any help or guidance on how to resolve these header visibility issues would be appreciated.