EAS iOS build fails with error: use of undeclared identifier 'IntercomModule' even though it works on xcode

We just started using EAS, we were using expo, but it couldn’t support the modules we needed. After making the change to move off of expo we added in Intercom RN (GitHub - intercom/intercom-react-native: React Native wrapper to bridge our iOS and Android SDK) and hooked everything up. We got it working on Android (built with EAS) and iOS when built via xCode, but when we run an EAS build for iOS we get the following error:

/Users/expo/workingdir/build/ios/REDACTED/AppDelegate.m:51:4: error: use of undeclared identifier ‘IntercomModule’
[IntercomModule initialize:@“REDACTED” withAppId:@“REDACTED”];

in the file we have this import at the top

#import <IntercomModule.h>

We have the intercom module in our package.json and everything works when we build the app on our local Mac, even if we do a fresh install of the application. I can’t troubleshoot it beyond this point as I can’t access the build machine to figure out why it doesn’t work.

hi there! did you try doing a release build locally? expo run:ios --configuration Release

it’s possible that you have that import wrapped in a RCT_DEBUG macro

Yep it was in a ifdef which only showed up in release mode and I was building in debug mode, thanks.