iOS Certificate作成から ipaファイルをアップ app storeで公開 .xcarchiveでアップロードするとか

スマホアプリ開発

本ページは広告が含まれています。気になる広告をクリック頂けますと、サーバ運営費になります(^^

毎回迷うこの作業

iOS Certificateを作成する作業

とりあえず今回も迷いながらやってます。ipaファイルをアップロードする形式から.xcarchiveをXcodeアプリでアップロードする形式になって始めてなのですが、とりあえず作業の中の覚書をここに残します。

通常はMacも使っていないし、アプリをApple Developperにアップロードする事もないしで、年に1回か2回行う作業はいつも迷います。なので、覚書です。

今回お世話になったのはこちらのサイト。

Provisioning profile “XXXXXX” doesn’t include signing certificate YYYY って出る場合の対処法(2019/10/9版)

プロビショニングって?

いつも迷う理由として、何を行っているか分からないけど、とりあえず出てくる表示をググって何とかしているところにあると思います。

アップロードにはXcodeを利用する

証明書 Certificatesが必要

Provisioning Profile

プロビショニングプロファイル

扱いなれていない人にとって一番こいつが得たいの知れないものなのでは?

上記証明書 Certificatesと 登録に使用したMac DevicesとApp IDを合わせて作るものでiPhoneアプリの開発者・販売者を、提供元のアップルに証明してもらうためのもの。なのかな。アップロードの時にXcodeに指定する必要があります。

キーチェーン

Macで証明書や、パスワードを管理する仕組み

キーチェーンを利用する際にパスワードが求められたらそのマシンのパスワードを利用すればいい。この辺がややこしい。

Xcodeから、上記プロビショニングファイルを指定すると、アップロードする時にそのアップロードファイルに対してその証明書を使っていいのかそのマシンのパスワードを聞かれる

証明書の作成

アプリケーション

 ユーティリティ

キーチェーンアクセス

キーチェーンアクセスの環境設定

このように設定する

認証局に証明書を要求

メールアドレスを登録し証明書を要求する。

デスクトップに保存する

鍵サイズは、2048ビット

SafariでApple Developerにアクセスする

配布用として作成するためAdd Store Ad Hocを選択する

先程作成したcsrファイルを要求されます。

csrファイルを選択します

証明書の準備ができたと表示されるのでダウンロードします。

ios_distribution.cerをキーチェーンに登録します。ダブルクリックで登録できます。

Xcodeをインストールしておきます。

Application Loader を起動します。

appをデリバリにて、ipaファイルを選択します。

送信ボタンを押すとアップロードが完了します。ここでエラーが出る場合があります。組みこんであるアイコンファイルにサイズや、透過設定の規定があり、これを満たしていないとアップロードで失敗するか、アップロードはできても Apple Developperには反映されず、Issueをcorrectしなさいって感じのエラーメールが帰ってきます。

iTunes Connect: Your app “サンプルアプリ” (Apple ID: *********) has one or more issues

Dear developer,

We have discovered one or more issues with your recent delivery for “サンプルアプリ”. To process your delivery, the following issues must be corrected:

Invalid Image Path – No image found at the path referenced under key “CFBundleIconFiles”: Default-667h@2x.png

Invalid Image Path – No image found at the path referenced under key “CFBundleIconFiles”: Default-736h@3x.png

Once these issues have been corrected, you can then redeliver the corrected binary.

Regards,

The App Store team

所定の画像を修正しもう一度トライ!すると、次にはこんなメールが届きました。issueと書いてあったので、また問題なのか?と思ったけど、証明書としては「Push通知」できる事になっているが、アプリケーションにその機能が無いようだ。という意味の文章のようです。特に対処する必要はなく、これで次の段階に進めます。

Dear developer,

We have discovered one or more issues with your recent delivery for “サンプルアプリ”. Your delivery was successful, but you may wish to correct the following issues in your next delivery:

Missing Push Notification Entitlement – Your app appears to register with the Apple Push Notification service, but the app signature’s entitlements do not include the “aps-environment” entitlement. If your app uses the Apple Push Notification service, make sure your App ID is enabled for Push Notification in the Provisioning Portal, and resubmit after signing your app with a Distribution provisioning profile that includes the “aps-environment” entitlement. Xcode 8 does not automatically copy the aps-environment entitlement from provisioning profiles at build time. This behavior is intentional. To use this entitlement, either enable Push Notifications in the project editor’s Capabilities pane, or manually add the entitlement to your entitlements file. For more information, see https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/HandlingRemoteNotifications.html#//apple_ref/doc/uid/TP40008194-CH6-SW1.

After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.

Regards,

The App Store team

次はapple developperにアクセスします。

Screenshot of developer.apple.com

登録しているアカウントでログインします。

Account ⇒ App Store Connectにアクセスします。

マイAppをクリック

TestFlightで試験します。

iOSアプリの輸出コンプライアンスを提出します。細かい事は良く分からないので、こちらを参考にしました。

Screenshot of qiita.com

テストフライト、テスト飛行の事です。

配布する前に事前に自分の端末でテストする事ができます。iPhoneにTestFlightアプリをインストールし、iTunesConnect から、マイappで該当のアプリケーションを選択します。無事に動作する事を確認します。

その後

次に、バージョンまたはプラットフォームをクリックし、必要事項の記入、先ほどApplicationLoaderでアップロードしたアプリを選択して、審査へ提出します。

また、スクリーンショットなどサイズをしっかり合わせてアップしないと、アップする時に蹴られます。

スクリーンショットの仕様はこちらで確認できます。

Screenshot of help.apple.com

審査申請を出した後、3日くらいで審査が完了します。

リリース

審査を通過したら、そのアプリ画面の右端「このバージョンをリリース」にてリリースが始まります。

タイトルとURLをコピーしました