The “update_fastlane” command doesn’t work in UCB:
2036: -----------------------------
2037: --- Step: update_fastlane ---
2038: -----------------------------
2039: Looking for updates for fastlane...
2040: Updating fastlane from 2.142.0 to 2.164.0...
2041: (eval):117: warning: character class has ']' without escape
2042: Finished updating fastlane
2043: Cleaning up old versions...
2044: fastlane.tools successfully updated! I will now restart myself...
2045: sh: -c: line 0: syntax error near unexpected token `('
My problem is that i’d like the “pilot” command to use the App Store Connect API Key to upload my build.
→ Did someone manage to update Fastlane in UCB? → Or did someone manage to upload a build to App Store Connect using “pilot” command in Fastlane in a secure way? (e.g. with an Apple ID with 2 factor auth enabled)
I upload to Apple with 2FA but not with Fastlane, just with Xcode tools. I believe I did it using an app specific password, so didn’t need to do anything particularly difficult to get it to work
post_build.sh
#!/bin/bash
echo "Uploading IPA to Appstore Connect..."
path="$WORKSPACE/.build/last/$BUILD_TYPE/build.ipa"
if xcrun altool --upload-app -f $path -u $ITUNES_USERNAME -p $ITUNES_PASSWORD ; then
echo "Upload IPA to Appstore Connect finished with success"
else
echo "Upload IPA to Appstore Connect failed"
fi
Just need to set BUILD_TYPE, ITUNES_USERNAME and ITUNES_PASSWORD in your environment variables for your configuration.
the Build Type is what ever your config is called, so for example, my apple submission configuration is called production-ios, so that is what the BUILD_TYPE variable is.
I push that file into git, and then it needs a reference in cloud ->Advanced Options-> Post-Build Scripts to {your path}/post_build.sh.
Know its not fastlane, but works if you’re just bothered about getting your build straight to itunes
I tried with fastlane for a while, but couldn’t get it working. It is supposed to be faster with Fastlane and obviously you can do a bit more with it like doing your store set up bits as well which would be nice.
If you do find a way in fastlane, please do update in here, as I’d definitely be interesting and trying it out.
using username + pass (not secure enough though) => fails because of 2FA
using app specific pass only => doesn’t work, keep asking me my username when i try to upload the build… Maybe because fastlane version is too old in UCB?
No, now i’m using the post shell script method to upload the build on testflight and it works great with email + app specific password.
Fastlane version is still 2.142.0 (tested today) and i didn’t find a way to connect to appstore connect with app specific password.
Maybe with xcode 12 support (mid december i think), UCB team will upgrade fastlane?