Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcodebuild can't find cocoapods libraries

I have an xcode project (build from Unity) that uses cocoapods to install Firebase dependencies. It builds fine through the xcode GUI but not using the xcodebuild invocation that I use for automated builds:

xcodebuild -archivePath "$ARCHIVE_PATH" -project "$(pwd)/repo/quantum_unity/Build/$PLATFORM/Unity-iPhone.xcodeproj" -sdk iphoneos -allowProvisioningUpdates -scheme 'Unity-iPhone' -configuration 'Release Development' archive DEVELOPMENT_TEAM=$TEAMID

The build fails to find the FirebaseCore library in linking.

What needs to change in how I invoke xcodebuild so it's able to find the pods installed by cocoapods?

I'm using xcode version 9.4.1.

like image 453
bfops Avatar asked Aug 15 '18 18:08

bfops


1 Answers

Use -workspace and the xcworkspace instead of the project.

After installing via CocoaPods and depending on them, always use the Xcode workspace instead of the project.

like image 60
Paul Beusterien Avatar answered Oct 03 '22 19:10

Paul Beusterien