fastlane vs iTC
DISCLAMER: this is a living post. It will be updated frequently to add and update the code below as soon as fastlane/deliver will update. The list of changes is here
As all you iOS developers already know, recently Apple rolls out a new version of iTunes Connect.
That means that Apple broke all the fastlane things1 out there! How dare you, Apple!?
Keep calm and fix all the things
Felix, the (main) author of fastlane is working around the clock since days to make deliver working again. He decide (and I cannot disagree with him) to “abandon” the current version of deliver (0.13) and push faster on the new upcoming version that use spaceship, a new tool that greatly improved all iTunes Connect operations by NOT simulating user interaction on the website.
That said, here are the changes I made in our fastlane/deliver script to start publish again our iOS apps. It still not perfect and it not always works, but at least it runs.
EDIT 1: An official migration guide has been prepared on github. Please check it out.
Update Fastfile
fastlane has a deliver action to run deliver. This is broken now, so what you can do is run deliver as a shell script, this way
EDIT 2: With the new release of fastlane
(1.30.1) you can rollback to use again the deliver action. We aware that you still need to pass force
to the action because of a bug in deliver
.
Update Deliverfile
Here changes are more important. Since some releases of deliver, it has introduced a file based configuration for metadata.
But we still working with a single Deliverfile
and a .env
in our iOS app worker.
-
default_language
is not supported anymore. Some property needs to be an hash map with the language (en-US
for example) as key. -
apple_id
has been replaced byapp
EDIT 1: This is correct but you don’t need to use apple_id
or app
. app_identifier
is enough.
- We need to provide the app bundle id now. Not sure why this is not coming from the ipa directly
EDIT 1: In the next version of deliver, app_identifier
is optional if you provide the ipa file. However using app_identifier
will let you update metadata without the ipa itself.
title
has been replaced byname
(plus it requires the language)
- Subtle change on
keywords
: now requires a simple string, not an array anymore (plus the language)
changelog
has been replaced byrelease_notes
(and the language)
privacy_url
andsupport_url
requires the language
ratings_config_path
has been replaced byapp_rating_config_path
and the content of the file is completly different. From this
to this
submit_further_information
has been replaced bysubmission_information
but the content is structured differently.
Before is was like this
Now is like ... I don't know. It's not clear right now how we should pass these information to deliver. For sure, it will be an hash map like this
That said, this example is basically useless because it rappresents the default values. You can basically skip the declaration of submission_information if you don’t have any value to set true
.
Screenshots
Because deliver does not accept a “default language” anymore for all metadata, screenshots needs to be inside a folder with the name of the language.
That means, if the folder that contains your screenshots is called screens
and your language is en-US
, you have to create a en-US
folder inside screens
and move all pngs inside of it.
For example, if an image was in screens/iphone4_4_821308711567.png
but it should be in screens/en-US/iphone4_4_821308711567.png
.
I wrote this small workaround to move screenshots automagically and do not edit my worker code. Of course, it all depends on your setup
To sum up
Changes are quite important now, so take now the decision to migrate to a metadata files based configuration to be more future proof (probably). We will, at Spreaker, migrate our Deliverfile-.evn setup soon but for now, these changes helps us to start publishing app again.
All of this is possible just because fastlane exist, and makes our developer life much more easy! So keep coding Felix, and thanks for all the fishes!
Alessandro
Post Changelog
Edit 1, Sept 29th, 2015:
After the release of the official Migration guide, some of the suggested changes are not usefull anymore.
Edit 2, Sept 30th, 2015:
fastlane
1.30.1 fixed deliver action so the workaround can be removed.
-
As Felix pointed out, not all the things are broken, just
deliver
,pilot
andspaceship
. Howeverdeliver
is the most important tool of all (at least to me). ↩