3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

React Native + Expo + Amplify アプリを EAS でデプロイ

Last updated at Posted at 2022-12-22

更新:2022年12月23日
(本記事は、次の記事の続きです「Amplify + React Native + EXPO で Authenticator」)
React Native + Expo アプリを EAS (Expo Application Services) でデプロイしてみます。

Getting started

ドキュメントに沿って、試しにやってみます。

% npm install --global eas-cli
% npm create-expo-app my-app
% cd my-app
% npx expo start

iOS simulator 上でアプリ実行できました。

さらにドキュメントに沿って進めてみます。
image.png

eas.json に channel プロパティを追加します。

eas.json
{
  "build": {
    "preview": {
      "channel": "preview"
      // ...
    },
    "production": {
      "channel": "production"
      // ...
    }
  }
}
eas update --branch preview --message "Updating the app"

ExpoのページでQRコード表示させて、iPhoneで読み込ませると、iPhone実機でもExpo Go上でアプリ実行できました。
image.png

認証アプリを EAS でデプロイ

以前作った React Native + Expo + Amplify で作成した認証アプリを同じ手順で EAS にデプロイしてみます。

% npx expo start

iOS simulator 上で実行できています。

% npx expo install expo-updates
% eas update:configure
% eas build:configure

eas.json に channel プロパティを追加します。

eas.json
{
  "build": {
    "preview": {
      "channel": "preview"
      // ...
    },
    "production": {
      "channel": "production"
      // ...
    }
  }
}

デプロイします

eas update --branch preview --message "Updating the app"

Expo のホームページでQRコードを表示します。
image.png

iPhoneでQRコードを読み取ると、iPhone実機のExpo Go上でアプリ実行できました。

以上です。

3
1
0

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?