xcodefirebaseunity-game-enginecocoapodsxcode9.4

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.


Solution

  • 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.