Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Submit apps to App Store review #164

Merged
merged 43 commits into from
Nov 26, 2021
Merged

Conversation

priitlatt
Copy link
Contributor

@priitlatt priitlatt commented Nov 10, 2021

Add support to automatically submit published iOS application packages (*.ipa) to App Store App review.

New actions:

  • app-store-connect app-store-versions create
  • app-store-connect app-store-versions delete
  • app-store-connect app-store-versions modify
  • app-store-connect builds app-store-version
  • app-store-connect builds submit-to-app-store

Updated actions:

  • app-store-connect apps builds - add capabilities to filter builds.
  • app-store-connect publish - add options to automatically submit uploaded ipa to App Store review.

All changes to the actions are backwards compatible.

Notable bugfixes, improvements and new features:

  • Optional action arguments can now be separated into named argument groups in both CLI --help messages and documentation.
  • It is now possible to filter by multiple values for one parameter in App Store Connect API read and list queries.
  • New App Store Connect API client methods to:
    • create an App Store version,
    • read the build information of an App Store version,
    • read the App Store version submission information of an App Store version,
    • modify an App Store version,
    • delete an App Store version,
  • Isolate setting up CLI app arguments from CliApp source code.
  • Add new argument type for reading ISO 8601 formatted timestamps from CLI arguments into datetime objects.
  • Move app-store-connect app-store-version-submissions create and app-store-connect app-store-version-submissions delete action definitions from main AppStoreConnect class to a dedicated action group implementation.
  • Collect similar arguments into collections and reuse them without rewriting.

Check example usage from this comment.

Copy link
Contributor

@remarkov remarkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a few minor nitpicks, otherwise LGTM

@priitlatt priitlatt marked this pull request as ready for review November 23, 2021 10:01
@priitlatt
Copy link
Contributor Author

priitlatt commented Nov 23, 2021

TODO: add proper description to PR.
Edit: Done

@priitlatt
Copy link
Contributor Author

Example usage of app-store-connect publish with App Store review submission enabled:

17:11:13 priit@groundhog build app-store-connect publish \
    --app-store \
    --copyright '2021 Codemagic' \
    --release-type 'SCHEDULED' \
    --earliest-release-date '2021-11-26T14:00:00+00:00'


Searching for files matching /Users/priit/build/**/*.ipa
Searching for files matching /Users/priit/build/**/*.pkg

Publish "banaan_1_0_208_234.ipa" to App Store Connect
App name: Banaan
Bundle identifier: io.codemagic.banaan
Certificate expires: 2022-11-01T06:04:55.000+0000
Distribution type: App Store
Min os version: 10.1
Provisioned devices: N/A
Provisions all devices: No
Supported platforms: iPhoneOS
Version code: 1.0.208.234
Version: 1.0.208

Validate "banaan_1_0_208_234.ipa" for App Store Connect
{
    "tool-version": "4.050.1210",
    "tool-path": "/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework",
    "success-message": "No errors validating archive at 'banaan_1_0_208_234.ipa'.",
    "os-version": "11.2.3"
}
No errors validating archive at 'banaan_1_0_208_234.ipa'.

Upload "banaan_1_0_208_234.ipa" to App Store Connect
{
    "tool-version": "4.050.1210",
    "tool-path": "/Applications/Xcode.app/Contents/SharedFrameworks/ContentDeliveryServices.framework/Versions/A/Frameworks/AppStoreService.framework",
    "success-message": "No errors uploading 'banaan_1_0_208_234.ipa'",
    "os-version": "11.2.3"
}
No errors uploading 'banaan_1_0_208_234.ipa'

Find application entry from App Store Connect for uploaded binary
Found 1 App matching specified filters: bundleId=io.codemagic.banaan.
-- App --
Id: 1481211155
Type: apps
Bundle id: io.codemagic.banaan
Name: Banaan Codemagic
Primary locale: en-GB
Sku: banaanike
Available in new territories: True
Content rights declaration: DOES_NOT_USE_THIRD_PARTY_CONTENT
Is or ever was made for kids: False

Find uploaded build
Build has finished uploading but is processing on App Store Connect side. Could not find the build matching the uploaded version yet. Waiting 30 seconds to try again, 20 attempts remaining.
...
Build has finished uploading but is processing on App Store Connect side. Could not find the build matching the uploaded version yet. Waiting 30 seconds to try again, 15 attempts remaining.

Uploaded build is
-- Build --
Id: e688fd8e-3ea3-4db7-aa08-522c62affe05
Type: builds
Expired: False
Icon asset token:
	Template url: https://is5-ssl.mzstatic.com/image/thumb/Purple126/v4/bf/3b/97/bf3b97f4-48bc-57ae-ce0d-48570350ef1e/Icon-83.5@2x.png.png/{w}x{h}bb.{f}
	Height: 167
	Width: 167
Min os version: 10.1
Processing state: PROCESSING
Version: 1.0.208.234
Uses non exempt encryption: False
Uploaded date: 2021-11-25 07:16:11-08:00
Expiration date: 2022-02-23 07:16:11-08:00

Processing of builds by Apple can take a while, the timeout for waiting the processing to finish for build e688fd8e-3ea3-4db7-aa08-522c62affe05 is set to 20 minutes.
Build e688fd8e-3ea3-4db7-aa08-522c62affe05 is still being processed on App Store Connect side, waiting 30 seconds and checking again
...
Build e688fd8e-3ea3-4db7-aa08-522c62affe05 is still being processed on App Store Connect side, waiting 30 seconds and checking again
Processing build e688fd8e-3ea3-4db7-aa08-522c62affe05 is completed


Submit build 'e688fd8e-3ea3-4db7-aa08-522c62affe05' to App Store review

Using version 1.0.208 for App Store submission

Found existing App Store Version 409ebefb-ebd1-4f1a-903d-6ba16e013ebf in state "DEVELOPER_REJECTED".
Use it for current submission by updating it with build: e688fd8e-3ea3-4db7-aa08-522c62affe05, copyright: '2021 Codemagic', earliest release date: 2021-11-26T14:00:00.000+0000, release type: scheduled, version string: 1.0.208.
Modify App Store Version 409ebefb-ebd1-4f1a-903d-6ba16e013ebf
Successfully modified App Store Version 409ebefb-ebd1-4f1a-903d-6ba16e013ebf
-- App Store Version --
Id: 409ebefb-ebd1-4f1a-903d-6ba16e013ebf
Type: appStoreVersions
Platform: IOS
App store state: PREPARE_FOR_SUBMISSION
Copyright: 2021 Codemagic
Earliest release date: 2021-11-26 06:00:00-08:00
Release type: SCHEDULED
Version string: 1.0.208
Created date: 2019-09-24 06:02:48-07:00
Downloadable: True

Creating new App Store Version Submission: app store version: 409ebefb-ebd1-4f1a-903d-6ba16e013ebf
-- App Store Version Submission (Created) --
Id: 409ebefb-ebd1-4f1a-903d-6ba16e013ebf
Type: appStoreVersionSubmissions
Created App Store Version Submission 409ebefb-ebd1-4f1a-903d-6ba16e013ebf

Check App Store submission details from
https://appstoreconnect.apple.com/apps/1481211155/appstore/ios/version/inflight

@priitlatt priitlatt self-assigned this Nov 25, 2021
@priitlatt priitlatt added the enhancement New feature or request label Nov 25, 2021
@priitlatt priitlatt merged commit eb59b65 into master Nov 26, 2021
@priitlatt priitlatt deleted the feature/app-store-review branch November 26, 2021 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants