fastlane: Fastlane fail with: Invalid code signing settings
I’m always getting Your project settings define invalid code signing settings. Locally it’s working but not on the CI server. I think I have everything fine but something is missing:
Variable Dump:
{:DEFAULT_PLATFORM=>:ios, :ENVIRONMENT=>nil, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios beta", :CERT_FILE_PATH=>"./YSLE7K35GW.cer", :CERT_CERTIFICATE_ID=>"YSLE7K35GW", :SIGH_PROFILE_PATH=>"/Users/distiller/x-ios-app/AppStore_x.x.x.mobileprovision", :SIGH_UDID=>"076b19d1-1dcd-4191-9c6a-cbea25015ggc", :BUILD_NUMBER=>"10"}
I used Code Signing: Best Solution - Using environment variables approach.
Version
Successfully installed fastlane-1.26.0
Fastfile
desc "**Build** the app"
lane :build do |options|
# Code Signing
if options[:sign]
cert
end
# Provisioning profiles
sigh
# Use the UDID of the newly created provisioning profile
ENV["PROFILE_UDID"] = lane_context[SharedValues::SIGH_UDID]
# App build number
if options[:increment]
increment_build_number
end
# Build your app
gym
end
desc "Submit a new Beta Build to **TestFlight** and **Crashlytics**"
desc "This will also make sure the profile is up to date"
lane :beta do |options|
# Notifications
if options[:slack]
$use_slack = true
else
$use_slack = false
end
# Steps
cert
build(release: false, sign: true, increment: true)
testflight(skip_deploy: true) # Skip the distribution of the app to all beta testers
crashlytics(crashlytics_path: './Pods/Crashlytics/Crashlytics.framework', ipa_path: './build/X.ipa')
end
Gymfile
scheme "X"
# sdk "8.0"
clean true
# store the ipa in this folder
output_directory "./build"
# the name of the ipa file
output_name "X"
Log
[06:49:37]: --- Step: cert ---
[06:49:37]: ------------------
[06:49:47]: Starting login with user 'services@x.x'
[06:50:00]: Successfully logged in
[06:50:02]: Certificate P5YNN9KJL8 (X) can't be found on your local computer
[06:50:02]: Couldn't find an existing certificate... creating a new one
1 key imported.
1 certificate imported.
[06:50:04]: Successfully generated YSLE7K35GW which was imported to the local machine.
[06:50:07]: Use signing certificate 'YSLE7K35GW' from now on!
[06:50:07]: --------------------------------------
[06:50:07]: --- Step: Switch to ios build lane ---
[06:50:07]: --------------------------------------
[06:50:07]: Cruising over to lane 'ios build' 🚖
[06:50:07]: ------------------
[06:50:07]: --- Step: cert ---
[06:50:07]: ------------------
[06:50:07]: Starting login with user 'services@x.x'
[06:50:08]: Successfully logged in
[06:50:09]: Certificate P5YNN9KJL8 (X) can't be found on your local computer
[06:50:10]: Found the certificate YSLE7K35GW (X) which is installed on the local machine. Using this one.
[06:50:10]: Use signing certificate 'YSLE7K35GW' from now on!
[06:50:10]: ------------------
[06:50:10]: --- Step: sigh ---
[06:50:10]: ------------------
[06:50:11]: Starting login with user 'x@x.x'
[06:50:12]: Successfully logged in
[06:50:12]: Fetching profiles...
[06:50:15]: No existing profiles, creating a new one for you
[06:50:16]: The name 'x.x.x AppStore' is already taken, using another one.
[06:50:16]: Creating new provisioning profile for 'x.x.x' with name 'x.x.x AppStore 1442497816'
[06:50:16]: Downloading provisioning profile...
[06:50:18]: Successfully downloaded provisioning profile...
[06:50:18]: Installing provisioning profile...
./AppStore_x.x.x.mobileprovision
Build log
[06:50:21]: -----------------
[06:50:21]: --- Step: gym ---
[06:50:21]: -----------------
[06:50:21]: Installing provisioning profile...
[06:50:22]: xcrun xcodebuild -list -workspace './X.xcworkspace'
[06:50:23]: xcrun xcodebuild -showBuildSettings -workspace './X.xcworkspace' -scheme 'X'
+------------+-----------------------------+
| Building Application 🚀 |
+------------+-----------------------------+
| Workspace | ./X.xcworkspace |
| Scheme | X |
| Platform | iOS |
| Xcode Path | /Applications/Xcode-6.4.app |
+------------+-----------------------------+
[06:50:24]: set -o pipefail && xcodebuild -workspace './X.xcworkspace' -scheme 'X' -destination 'generic/platform=iOS' -archivePath '/Users/distiller/Library/Developer/Xcode/Archives/2015-09-17/X 2015-09-17 06.50.24.xcarchive' clean archive | xcpretty
-----
-----
▸ Cleaning Pods/Runes [Debug]
▸ Cleaning Pods/Box [Debug]
▸ Cleaning Pods/Dodo [Debug]
▸ Cleaning Pods/Argo [Debug]
▸ Cleaning Pods/KeychainAccess [Debug]
▸ Cleaning Pods/RMActionController [Debug]
▸ Cleaning Pods/Realm [Debug]
▸ Cleaning Pods/RMDateSelectionViewController [Debug]
▸ Cleaning Pods/RealmSwift [Debug]
▸ Cleaning Pods/Pods-X [Debug]
▸ Cleaning X/X [Debug]
▸ Building Pods/Box [Release]
⌦ Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found.
⌦ CodeSign error: code signing is required for product type 'Framework' in SDK 'iOS 8.4'
▸ Building Pods/Runes [Release]
⌦ Code Sign error: No code signing identities found: No valid signing identities (i.e. certificate and private key pair) matching the team ID “(null)” were found.
⌦ CodeSign error: code signing is required for product type 'Framework' in SDK 'iOS 8.4'
** ARCHIVE FAILED **
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 40 (12 by maintainers)
@KrauseFx @ricardopereira I Managed to workaround this issue by also installing development certificates and profiles. After that the build succeeded flawlessly