Cocoapods 1.6.1 throws compilation error with FBAudienceNetwork.h not found
See original GitHub issue🐛 Bug Report
Environment
Expo CLI 2.17.1 environment info: System: OS: macOS 10.14.4 Shell: 5.3 - /bin/zsh Binaries: Node: 10.15.3 - /usr/local/bin/node Yarn: 1.13.0 - /usr/local/bin/yarn npm: 6.4.1 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman IDEs: Android Studio: 3.3 AI-182.5107.16.33.5264788 Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild npmPackages: expo: ^32.0.0 => 32.0.6 react: 16.5.0 => 16.5.0 react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1 react-navigation: ^3.0.9 => 3.9.1 npmGlobalPackages: expo-cli: 2.17.1
Building for iOS
Steps to Reproduce
- Create an expo app
- Eject
- Use the following podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
target 'application' do
pod 'ExpoKit',
:git => "http://github.com/expo/expo.git",
:tag => "ios/2.10.6",
:subspecs => [
"Core"
],
:inhibit_warnings => true
pod 'EXAdsAdMob',
:path => "../node_modules/expo-ads-admob/ios"
pod 'EXSegment',
:path => "../node_modules/expo-analytics-segment/ios"
pod 'EXAppAuth',
:path => "../node_modules/expo-app-auth/ios"
pod 'EXAppLoaderProvider',
:path => "../node_modules/expo-app-loader-provider/ios"
pod 'EXBackgroundFetch',
:path => "../node_modules/expo-background-fetch/ios"
pod 'EXBarCodeScanner',
:path => "../node_modules/expo-barcode-scanner/ios"
pod 'EXBarCodeScannerInterface',
:path => "../node_modules/expo-barcode-scanner-interface/ios"
pod 'EXCamera',
:path => "../node_modules/expo-camera/ios"
pod 'EXCameraInterface',
:path => "../node_modules/expo-camera-interface/ios"
pod 'EXConstants',
:path => "../node_modules/expo-constants/ios"
pod 'EXConstantsInterface',
:path => "../node_modules/expo-constants-interface/ios"
pod 'EXContacts',
:path => "../node_modules/expo-contacts/ios"
pod 'EXCore',
:path => "../node_modules/expo-core/ios"
pod 'EXErrors',
:path => "../node_modules/expo-errors/ios"
pod 'EXFaceDetectorInterface',
:path => "../node_modules/expo-face-detector-interface/ios"
pod 'EXFileSystem',
:path => "../node_modules/expo-file-system/ios"
pod 'EXFileSystemInterface',
:path => "../node_modules/expo-file-system-interface/ios"
pod 'EXFont',
:path => "../node_modules/expo-font/ios"
pod 'EXFontInterface',
:path => "../node_modules/expo-font-interface/ios"
pod 'EXGL',
:path => "../node_modules/expo-gl/ios"
pod 'EXGL-CPP',
:path => "../node_modules/expo-gl-cpp/cpp"
pod 'EXGoogleSignIn',
:path => "../node_modules/expo-google-sign-in/ios"
pod 'EXImageLoaderInterface',
:path => "../node_modules/expo-image-loader-interface/ios"
pod 'EXLocalAuthentication',
:path => "../node_modules/expo-local-authentication/ios"
pod 'EXLocalization',
:path => "../node_modules/expo-localization/ios"
pod 'EXLocation',
:path => "../node_modules/expo-location/ios"
pod 'EXMediaLibrary',
:path => "../node_modules/expo-media-library/ios"
pod 'EXPermissions',
:path => "../node_modules/expo-permissions/ios"
pod 'EXPermissionsInterface',
:path => "../node_modules/expo-permissions-interface/ios"
pod 'EXPrint',
:path => "../node_modules/expo-print/ios"
pod 'EXReactNativeAdapter',
:path => "../node_modules/expo-react-native-adapter/ios"
pod 'EXSensors',
:path => "../node_modules/expo-sensors/ios"
pod 'EXSensorsInterface',
:path => "../node_modules/expo-sensors-interface/ios"
pod 'EXSMS',
:path => "../node_modules/expo-sms/ios"
pod 'EXTaskManager',
:path => "../node_modules/expo-task-manager/ios"
pod 'EXTaskManagerInterface',
:path => "../node_modules/expo-task-manager-interface/ios"
pod 'React',
:path => "../node_modules/react-native",
:inhibit_warnings => true,
:subspecs => [
"Core",
"ART",
"RCTActionSheet",
"RCTAnimation",
"RCTCameraRoll",
"RCTGeolocation",
"RCTImage",
"RCTNetwork",
"RCTText",
"RCTVibration",
"RCTWebSocket",
"DevSupport",
"CxxBridge"
]
pod 'yoga',
:path => "../node_modules/react-native/ReactCommon/yoga",
:inhibit_warnings => true
pod 'DoubleConversion',
:podspec => "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec",
:inhibit_warnings => true
pod 'Folly',
:podspec => "../node_modules/react-native/third-party-podspecs/Folly.podspec",
:inhibit_warnings => true
pod 'glog',
:podspec => "../node_modules/react-native/third-party-podspecs/glog.podspec",
:inhibit_warnings => true
pod 'appcenter', path: '../node_modules/appcenter/ios'
pod 'appcenter-analytics', path: '../node_modules/appcenter-analytics/ios'
pod 'appcenter-crashes', path: '../node_modules/appcenter-crashes/ios'
post_install do |installer|
installer.pods_project.main_group.tab_width = '2';
installer.pods_project.main_group.indent_width = '2';
installer.target_installation_results[0].each do |installationResultArray|
targetName = installationResultArray[0];
target = installationResultArray[1]
if targetName == 'ExpoKit'
target.native_target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'EX_DETACHED=1'
# needed for GoogleMaps 2.x
config.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= []
config.build_settings['FRAMEWORK_SEARCH_PATHS'] << '${PODS_ROOT}/GoogleMaps/Base/Frameworks'
config.build_settings['FRAMEWORK_SEARCH_PATHS'] << '${PODS_ROOT}/GoogleMaps/Maps/Frameworks'
end
end
if ['Amplitude-iOS','Analytics','AppAuth','Branch','CocoaLumberjack','FBSDKCoreKit','FBSDKLoginKit','FBSDKShareKit','GPUImage','JKBigInteger2'].include? targetName
target.native_target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
end
end
# Can't specify this in the React podspec because we need
# to use those podspecs for detached projects which don't reference ExponentCPP.
if targetName.start_with?('React')
target.native_target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
config.build_settings['HEADER_SEARCH_PATHS'] ||= ['$(inherited)']
end
end
# Build React Native with RCT_DEV enabled and RCT_ENABLE_INSPECTOR and
# RCT_ENABLE_PACKAGER_CONNECTION disabled
next unless targetName == 'React'
target.native_target.build_configurations.each do |config|
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)']
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_DEV=1'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'RCT_ENABLE_INSPECTOR=0'
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] << 'ENABLE_PACKAGER_CONNECTION=0'
end
end
end
end
Expected Behavior
Compile with no errors
Actual Behavior
XCode complains that FBAudienceNetwork.h is not found
Reproducible Demo
Will see if I can get a reproducible demo out
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Trouble with installing cocoapods | Apple Developer Forums
I am getting the same error over and over again and I do not know why. ... extension failed to compile, please check...
Read more >Add the Audience Network SDK to your iOS App
If using CocoaPods is not an option, you can download the Audience Network SDK ... This error means that you didn't embed Audience...
Read more >iOS - Build fails with CocoaPods cannot find header files
I have checked out his branch and tried to build it, but I am getting an error: ASLogger/ASLogger.h file not found. Even if...
Read more >Troubleshooting - CocoaPods Guides
To solve this, you might need to uninstall the gem first and then re-install. The gem might not be able to compile, to...
Read more >cocoapods is not installed. | The AI Search Engine You Control
sudo gem uninstall cocoapods && sudo gem install cocoapods; restart IDE or Editor. the last step should solve the issue if not close...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I probably should have mentioned that Cocoapods 1.5.3 works without a hitch, I can compile it with no issues. Just figured I would highlight this here with an updated Podfile that works with 1.6.x and above.
This will go out with SDK 33 (SDK 32 : CocoaPods <=1.5 :: SDK 33 : CocoaPods >=1.6)