14

Say you upload build 1192...

After waiting for some time, you get the email....

enter image description here

Only then you then finally see the following, on the itunesconnect.apple.com web site...

enter image description here

You can then at last click "Add groups to this build", and ultimately click "submit for review".

My question: is there a way to automate the waiting - to know when it is available to submit?

Thus,

  1. Is there any way - other than watching for the email - to automate "knowing it has completed processing"? Example, does Apple send out the info on the API version, or something? Or is the email in fact the one and only way to know?

  2. If no, are there any existing systems which either hijack your email or perhaps poll the server / an API / whatever, to know when "processing is completed"?

Once again, the specific questions here are...

  1. Is there any way to know (api? message? other communication?) that it has completed processing?

  2. If no, if there perhaps an existing system that watches email / polls to know?

shim
  • 9,289
  • 12
  • 69
  • 108
Fattie
  • 27,874
  • 70
  • 431
  • 719
  • hi @krunal - right; just to be clear, I'm asking here about the many popular CI/CD/etc tools ("jenkins" "fastlane" etc etc) ..... is there something in that milieu to automate this. BTW that answer was simply about how long one has to wait for the various stages at TFA. Note that, apart from anything else, I believe there's actually an API for TestFlight/appstore (I know nothing about it) - it could well be that someone expert in that will instantly know the answer here! Whether using Apple stuff (ie, the API) or one of the CI things................ – Fattie Jan 04 '18 at 15:13
  • Yes, agree with your concern. you're absolutely right. I'm also looking for an answer to this question. – Krunal Jan 04 '18 at 15:18
  • Right. Thanks to you I tried to clarify the question. For anyone googling here, **questions "1" and "2"** are the heart of the matter! Cheers @krunal – Fattie Jan 04 '18 at 15:19
  • If there's no such system .. I'll make one :) – Fattie Jan 04 '18 at 15:20
  • 1
    If you'd make one @Fattie feel free to contact us at https://www.bitrise.io - would be happy to work on an integration ;) – Viktor Benei Jan 05 '18 at 10:59
  • I would surely do that, @ViktorBenei ! BTW that looks like a fantastic system, good to know about it, thanks .. – Fattie Jan 05 '18 at 11:00
  • Thanks @Fattie ! Feel free to ping us any time, we're always happy to help ;) – Viktor Benei Jan 05 '18 at 11:02
  • Just when I thought "maybe Bitrise has some integration for this", @ViktorBenei is on the spot :) If there IS such feature in bitrise.io, could you provide a link please? – AzaFromKaza Oct 31 '19 at 02:37
  • And Apple have now complicated things further with their "Transporter" app (which doesn't help with much :/ ) – Fattie Oct 31 '19 at 12:15
  • @AzaFromKaza the https://app.bitrise.io/integrations/steps/deploy-to-itunesconnect-deliver step should be able to wait - it has an option for that https://github.com/bitrise-steplib/steps-deploy-to-itunesconnect-deliver/blob/c106316966d10479cab68b9d37b7bd9e54d8de6e/step.yml#L120 – Viktor Benei Nov 01 '19 at 18:57

2 Answers2

5

Sounds like Fastlane's pilot action is what you need:

The best way to manage your TestFlight testers and builds from your terminal

Based on the docs this would probably do what you need: generate the ipa you want to submit, then on the directory the iap is in run:

 fastlane pilot upload

It uploads the ipa in the current directory, waits the validation and distributes it to testers. There is also other commands to add or remove testers, and parameters to set the descriptions and stuff. You can check all the options with fastlane action pilot


Fastlane can take care of everything so if you want you can setup a lane that builds and submits the app to TestFlight with a Fastfile like this (you'll very have to tweak this to your project's specific needs):

  default_platform :ios

  platform :ios do

  desc "Submit a new Beta Build to Apple TestFlight"
  lane :beta do    
    #increment_build_number
    gym(scheme: "Your Scheme”) # Build your app - more options are available


    pilot # upload your app to TestFlight

    # You can do much more run `fastlane actions` to see all the actions
  end

Whenever you want a new build you can just run: fastlane beta.


Edit: How They Wait For It?

Using Spaceship to poll iTunes Connect (not nice API, they do web scraping on the pages) and check - in a loop every X seconds - if the processing is done.

Fastlane has a simpler action called watchbuild that its only job is to notify when processing is done. Check the source code for an example on how to use Spacechip: https://github.com/fastlane/watchbuild/blob/master/lib/watchbuild/runner.rb

Felipe Cypriano
  • 2,727
  • 22
  • 32
  • thanks Filipe - the thing is, "waits the validation" ... how the heck does it do that? (Do you know?) Does it monitor your email or ? – Fattie Jan 12 '18 at 12:47
  • 1
    Using [Spaceship](https://spaceship.airforce) to poll iTunes Connect and check in loop every X seconds if the processing is done. Check this other action that just watches if the processing is done source code : https://github.com/fastlane/watchbuild/blob/master/lib/watchbuild/runner.rb – Felipe Cypriano Jan 12 '18 at 17:23
  • magnificent information, Felipe ! so "spaceship" is the thing, and the answer is it polls ITC (rather than perhaps using email monitoring, or some other solution) – Fattie Jan 12 '18 at 17:47
3
  1. use fastlane tools to build & upload to ITC https://fastlane.tools

    • you have to invest a bit of time to learn docs and play with examples - but then it pays back!
    • fastlane pilot action is waiting for ITC validation by default
    • fastlane pilot action has an option to distribute_external - which also will make this TestFlight build available for external testers, if you need that
    • fastlane latest_testflight_build_number action can help you to automate build number increments for TestFlight builds.
  2. you can use fastlane with your CI, as all you need is to run a bash script launching fastlane lane

  3. you can also use this tool to make zillion of screenshots - if we talk about automation
Oleg Shanyuk
  • 1,296
  • 2
  • 15
  • 26