Publish
- Expo發佈
- React Raw發佈
發佈前準備
- 打開app.json,修改內容
{
"expo":{
"name":"food",
"slug":"food",
"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},
"assetBundlePattern":["**/*"],
"ios":{
"supportsTablet":true,
"bundleIdentifier":"app.it101.food",
"buildNumber":"1.0.0"
},
"android":{
"package":"app.it101.food",
"versionCode":1
}
}
}
生成Android App Bundle
- App bundles are recommended, but you have to make sure the Google Play App Signing is enabled for your project.
eas buld -p android
//this will generate apk file only
//to upload to play store
expo build:android -t app-bundle
//生成之後,記得要取得keystore,存放在安全的地方
expo fetch:android:keystore
Adhoc Disctribution(100台內的Device上使用)
//如果Certificate過期
eas credentials
選擇 Generate a new Apple Distribution Certificate.... yes
//會順便產生一組新的Profile,只要上developer.apple.com上去修改成簡短的名稱即可
//從developer.apple.com下載該app的provisioning profile到D:槽根目錄
npm install -g eas-cli
eas login
eas build:configure
eas build --platform ios
//Provisioning profile (id: 9xxxxxxxx) does not exist in Apple Developer Portal
//✔ Fetched Apple provisioning profiles
//√ Generate a new Apple Provisioning Profile? ... 選擇 no 並指定路徑
Path to .mobileprovision file: D:\myapp.mobileprovision
//請上expo.io網站,登入後可看到你的App生成的ipa及apk檔
//下載ipa檔之後,用Mac上打開apple configurator 2,將iphone/iPad連接上Mac,就可以將ipa檔上傳到Device上的App資料夾中
eas build時如果遇到問題
npx expo-doctor@latest
//它會幫忙檢查有哪些dependency沒有安裝好並給建議
生成Distribution IPA
expo build:ios
上傳到ios App Store
1. 在project資料夾下用expo build:ios
2. 到expo.io下載ipa檔
3. 使用Mac上的Transporter程式上傳ipa檔
4. 到appstoreconnect.apple.com
填寫app基本資料,描述,定價,地區設定,隱私權,相關網站,上傳App截圖畫面
5. 提交審查
Expo Over The Air Update
- Expo OTA updates allow you to publish a new version of your app JavaScript and assets without building a new version of your standalone app and re-submitting to app stores
- 到app.json修改buildNumber
expo publish