LoginSignup
6
6

More than 5 years have passed since last update.

expoのコマンドラインからpublishする。

Posted at

WebIDE(XDE)経由じゃなくてcommand lineからpublishする方法。standaloneアプリではない。
詳しくはこちらを見ればいい。

ログイン

まずはログインする(その前に必要ならExpoの登録をする)。

expo login
? You are already logged in as hogehoge. Log in as new user? Yes
? Username/Email Address: hogehoge@hoge.com
? Password: [hidden]

Success. You are now logged in as hogehoge.

publish

パブリッシュする

結論から言えば、app.jsonを正しく設定していないと怒られる。先に、下記のapp.jsの項目を見て対応しておいてもよい。
怒られたい人はそのままどうぞ。

expo publish


[15:22:34] Publishing to channel 'default'...
[15:22:35] Must specify a bundle identifier in order to build this experience for iOS.Please specify one in app.json at "expo.ios.bundleIdentifier"

expo publish
[15:24:56] Publishing to channel 'default'...
[15:24:56] Must specify a java package in order to build this experience for Android.Please specify one in app.json at "expo.android.package"

expo publish
[15:25:55] Publishing to channel 'default'...
[15:25:56] We noticed you did not build a standalone app with this SDK version and release channel before. Remeber that OTA updates will not work with the app built with different SDK version and/or release channel. Read more: https://docs.expo.io/versions/latest/guides/publishing.html#limitations
[15:25:58] Building iOS bundle
[15:26:27] Building Android bundle
[15:26:54] Analyzing assets
[15:26:58] Uploading assets
[15:26:59] No assets changed, skipped.
[15:26:59] Processing asset bundle patterns:
[15:26:59] - /Users/hogehoge/myapp/**/*
[15:26:59] Uploading JavaScript bundles
[15:27:03] Published
[15:27:03] Your URL is

https://exp.host/@hogehoge/myapp

app.json

先にいじったほうがいい。iosのbundleIdentifierとandroidのpackageは必須で追加しないと上記の用になる。
あとは公開したくない場合は、privacyを"unlisted"とかにすればいい(これはWeb画面からもできるみたい)。

app.js
{
  "expo": {
    "name": "rnclient01",
    "description": "This project is really great.",
    "slug": "rnclient01",
+   "privacy": "public",
    "sdkVersion": "31.0.0",
    "platforms": ["ios", "android"],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
+     "bundleIdentifier": "jp.youardomain.myapp"
    },
    "android": {
+     "package": "jp.yourdomain.myapp"
    }
  }
}

後はWebでQRコード表示してExpoアプリで読み込めばよい。
企画やプロト段階での確認用配布などには十分かなと。

簡単ですが以上です。

6
6
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
6
6