4.fastlane−AppStore へのアップロード - ArtefactGitHub/I_T_iOSPractice GitHub Wiki

◆deliver(upload_to_app_store)

https://docs.fastlane.tools/actions/upload_to_app_store/
fastlane を用いて、アプリを iTunes Connect にアップロードするコマンド。

◆Fastfile サンプル

  # ==========================================
  #  Release
  # ==========================================
  desc 'Release to AppStore'
  lane :Release do |options|
    match(type: 'appstore')
    BuildForVisualStudio(build_configuration: "AppStore_Release")
    
    deliver(
        username: ENV['USER_NAME'],
        app_identifier: ENV['APP_IDENTIFIER'],
        force: true
    )
  end

◆fastlane 実行

$ bundle exec fastlane Release

◆エラー対応など

"force"オプションの指定

Verifying the upload via the HTML file can be disabled by either adding
`force true` to your Deliverfile or using `fastlane deliver --force`

と出るので"force:true"を指定して対応。

"username"オプションの指定

To not be asked about this value, you can specify it using 'username'
Your Apple ID Username:

とターミナル上で入力を促されてしまうので、"username:~~"を指定して対応。

App Icon の指定

Missing Info.plist value - A value for the Info.plist key 'CFBundleIconName' is missing in the bundle 'com.XXX.XXXX'. Apps built with iOS 11 or later SDK must supply app icons in an asset catalog and must also provide a value for this Info.plist key.

AppIcon が設定されていないと iTunes Connect への deliver アクションが通らない。
http://d.hatena.ne.jp/kazukingband/20171012/1507810556
↑を参考に、App Icon など10数種類のアイコンを指定して対応。

App Store Icon の透過を無くす修正

ERROR ITMS-90717: "Invalid App Store Icon. The App Store Icon in the asset catalog in 'PracticeOpenGL.app' can't be transparent nor contain an alpha channel."

App Store Icon(1024×1024)に透明部分(アルファチャンネル)が設定されていると起きるエラー。
https://qiita.com/H_Crane/items/10a1be7f4a2809c698cd
透過部分を無くして対応。