LoginSignup
3
1

More than 1 year has passed since last update.

expo + react native アプリリリース

Last updated at Posted at 2022-03-02

前準備

環境:mac
とりあえずexpo + react native でアプリ作成

EAS CLI 入れる

eas-cliをinstall
expoの設定を色々やってくれる

$npm install -g eas-cli
*Pathを通したりはいる

$npm root -g
/Users/****/.nvm/versions/node/v15.5.1/lib/node_modules

$ls /Users/****/.nvm/versions/node/v15.5.1/lib/node_modules
eas-cli expo-cli ...

$echo 'export PATH=$HOME/.nvm/versions/node/v15.5.1/lib/node_modules/eas-cli/bin:$PATH' >> ~/.bash_profile

$source ~/.bash_profile

$eas -v
eas-cli/0.46.0 darwin-x64 node-v15.5.1

OK

EAS CLI 準備

ログイン

$eas login
? Email or username > [expoで作成したアカウント名]
? Passwod > [パスワード]
Logged in

設定ファイル作成 試しにiOSだけ

$cd [projectのフォルダ]
$eas build:configure
? Which platforms would you like to configure for EAS Build? › - Use arrow-keys. Return to submit.
    All
❯   iOS
    Android


✔ Generated eas.json

🎉 Your project is ready to build.

- Run eas build when you are ready to create your first build.
- Once the build is completed, run eas submit to upload the app to app stores.
- Learn more about other capabilities of EAS Build: https://docs.expo.dev/build/introduction

環境変数を設定していく

$eas secret:create
★ eas-cli@0.47.0 is now available, please upgrade.
Proceeding with outdated version

✔ Linked to project @*****/***** (​https://expo.dev/accounts/******/projects/******​)
✔ Secret name: …[環境変数]
✔ Secret value: … [.envの値]

これを必要分だけ

$eas secret:listで登録結果を確認できる。

これしとかないと審査時にクラッシュでリジェクトされた(1敗)

build 

yesでどんどん進めてく

eas build --platform ios
✔ Linked to project @****/****
✔ Using remote iOS credentials (Expo server)

If you provide your Apple account credentials we will be able to generate all necessary build credentials and fully validate them.
This is optional, but without Apple account access you will need to provide all the values manually and we can only run minimal validation on them.
? Do you want to log in to your Apple account? › (Y/n)

› The password is only used to authenticate with Apple and never stored on EAS servers
  Learn more: https://bit.ly/2VtGWhU
? Password (for ********): › 

› Saving Apple ID password to the local Keychain
  Learn more: https://docs.expo.dev/distribution/security#keychain
✔ Logged in, verify your Apple account to continue
Two-factor Authentication (6 digit code) is enabled for *********. Learn more: https://support.apple.com/en-us/HT204915

? How do you want to validate your account? › device / sms
? Please enter the 6 digit code › ****

✔ Logged in Local session
✔ Bundle identifier registered ****
✔ Synced capabilities: Enabled: Push Notifications
✔ Synced capability identifiers: No updates
✔ Fetched Apple distribution certificates
? Generate a new Apple Distribution Certificate? … yes
✔ Created Apple distribution certificate
✔ Created distribution certificate
✔ Generate a new Apple Provisioning Profile? … yes
? Created Apple provisioning profile
✔ Created provisioning profile

Project Credentials Configuration

Project                   *****
Bundle Identifier         *****
                          
App Store Configuration   
                          
Distribution Certificate  
Serial Number             ****
Expiration Date           Mon, 16 Jan 2023 21:28:19 GMT+0900
Apple Team                *****
Updated                   11 seconds ago
                          
Provisioning Profile      
Developer Portal ID       ****
Status                    active
Expiration                Mon, 16 Jan 2023 21:28:19 GMT+0900
Apple Team                ****
Updated                   3 seconds ago
                          
All credentials are ready to build ****

? Would you like to set up Push Notifications for your project? › (Y/n)

? Generate a new Apple Push Notifications service key? … yes

✔ Created Apple push key
✔ Created push key
✔ Push Key assigned to ****
✔ Uploaded to EAS 6s Learn more: https://expo.fyi/eas-build-archive

Build details: https://expo.dev/accounts/****/builds/******

Waiting for build to complete. You can press Ctrl+C to exit.
⠙ Build in progress...

ここまで来ると順番待ちが発生するみたい 30分くらいかかる?

✖ Build failed

🍎 iOS build failed:
Unknown error. Please see logs.

と思ったらエラーが・・・ログを見ろとのこと

✔ Build finished

🍎 iOS app:
https://expo.dev/artifacts/eas/*******.ipa

ログ見て修正して再度ビルドで通ったらipaファイルってのができた

APP STORE CONNECT 準備

次にhttps://appstoreconnect.apple.com/に接続し

マイAppから+ボタンで新規App でモーダルが開くので以下を入力していく

・プラットフォーム iOS

・名前 (他で使われてたら怒られる)

・プライマリ言語 日本語

・バンドルID さっきのビルドで一緒に作られたIDが選択できる

・SKU アプリを識別できる名前を自分で決定する

・ユーザーアクセス 制限 なし

登録するとアプリの詳細設定画面?が開く

TRANS PORTER

先にMACのapp storeを開き、TransPoterというアプリをインストールする

アプリを開いてIPAファイルをドラッグすると読み込まれてデリバリボタンが表示されるのでクリックする

終わったらデリバリ済みとなった。

再度 APP STORE CONNECT

やったこと

リジェクトをくらいまくる

申請後、いろいろな理由で差し戻しされた。

  • モーダルの言語が統一されてないよ
    • 日本語設定なのに英語のモーダルがでてくる→日本語に統一
    • 広告を許可してもらうモーダルの設定でめちゃレスバした
{
  "expo": {
    ...
    "ios": {
      ...
      "infoPlist": {
        "NSUserTrackingUsageDescription": "アプリのバグ修正および体験向上のため、ユーザー行動データを利用します。"
      }
  }
}

この設定だけで実機では日本語オンリーでいけてたけど、レビュー者からは日本語と英語が混じってると返信。
どのようにテストしたか聞くも、返信はいつも同じで帰ってこず。
仕方なく、info.plistを追加した。(結果は一緒のはずだが)

<key>NSUserTrackingUsageDescription</key>
<string>アプリのバグ修正および体験向上のため、ユーザー行動データを利用します。</string>

これで通った。
あとは、

  • スクリーンショットに広告が入っとる→広告なしのスクリーンショットに差し替え
  • 最新OSのiPadで起動するとクラッシュした
    • こっちで試したけど問題なかった → そのことを英語で返信 → なぜか通った

参考にさせていただいたサイト

3
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1