I have a project using cocoapods (use_frameworks!) and Jenkins as my CI server.
Everything works fine on my local environment, including pod install, build, archive...
But when using Jenkins always archive failed
Here is error message:
Pods/FirebaseCoreDiagnostics/Firebase/CoreDiagnostics/FIRCDLibrary/FIRCoreDiagnostics.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Build step '執行 Shell' marked build as failure
Finished: FAILURE
Message when archiving:
My jenkins configuration:
Run buildstep before SCM runs
rm -rf ~/Library/Developer/Xcode/DerivedData/*
export LC_ALL=en_US.UTF-8 /usr/local/bin/pod install
Run script
## Archive the project
xcodebuild archive \
-workspace "${WORKSPACE}" \
-scheme "${SCHEME}" \
-configuration "${CONFIGURATION}" \
-sdk "${TARGET_SDK}" \
-archivePath "${ARCHIVEPATH}" \
CODE_SIGN_IDENTITY="${SIGNING_IDENTITY}" \
PROVISIONING_PROFILE="${PROVISIONING_PROFILE_SPECIFIER}"
Something I have tried and still not working:
setup environment variables
https://github.com/fastlane/fastlane/issues/12164
export UTF-8 encoding when Run Script
If you guys need more message, please let me know... Thanks
Thank you guys, I found the solution by myself. The reason is that I use wrong pods grammar.
I refer the solution from here: https://github.com/firebase/firebase-ios-sdk/issues/2100
The issue is using the deprecated version of the Google pod that forces in an extra old version of the GoogleUtilities pod that doesn't have the Environment subspec with the GULAppEnvironmentUtil.h header.
I seems like the same problem. So, I change my pods grammar from
pod 'Firebase/Analytics', '~> 6.13.0'
to
pod 'FirebaseAnalytics', '~> 6.1.7'
Everything works well.