iT邦幫忙

2024 iThome 鐵人賽

DAY 19
0

Day 18 以為只要用 eas init 就能產出專案的 eas.json 檔案。

實際上是要用 eas build:configure 來生成 eas.json。

> eas build:configure
💡 The following process will configure your iOS and/or Android project to be compatible with EAS Build. These changes only apply to your local project files and you can safely revert them at any time.

✔ Which platforms would you like to configure for EAS Build? › All

✔ Generated eas.json. Learn more

🎉 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

再回到根目錄查看,eas.json 檔案總算出現了。

  1. 使用 eas credentials 來上傳 Google Service Account 金鑰的 json 檔案。
  2. 選擇 Android
> eas credentials
? Select platform › - Use arrow-keys. Return to submit.
❯   Android
    iOS
  1. 選擇要為哪個構建版本設定
  2. 選擇 production
> eas credentials
✔ Select platform › Android
? Which build profile do you want to configure? › - Use arrow-keys. Return to submit.
    development
    preview
❯   production
  1. 選擇要做什麼事
  2. 選擇 Google Service Account
✔ Using build profile: production
Specified value for "android.package" in app.json is ignored because an android directory was detected in the project.
EAS Build will use the value found in the native code.
Android Credentials
Project                 notificationprocess
Application Identifier  com.jim.notification
No credentials set up yet!

? What do you want to do? › - Use arrow-keys. Return to submit.
    Keystore: Manage everything needed to build your project
❯   Google Service Account
    Push Notifications (Legacy): Manage your FCM (Legacy) API Key
    credentials.json: Upload/Download credentials between EAS servers and your local json
    Go back
    Exit
  1. 選擇 Upload a Google Service Account Key
✔ What do you want to do? › Google Service Account
Android Credentials
Project                 notificationprocess
Application Identifier  com.jim.notification
No credentials set up yet!

? What do you want to do? › - Use arrow-keys. Return to submit.
    Manage your Google Service Account Key for Play Store Submissions
    Manage your Google Service Account Key for Push Notifications (FCM V1)
❯   Upload a Google Service Account Key
    Delete a Google Service Account Key
    Go back
  1. 指定 Google Service Account 金鑰的 json 檔案路徑
✔ What do you want to do? › Upload a Google Service Account Key
Oops! Looks like you uploaded a google-services.json instead of your service account key. Learn more
A Google Service Account JSON key is required for uploading your app to Google Play Store, and for sending Android Notifications via FCM V1..
If you're not sure what this is or how to create one, learn more
? Path to Google Service Account file: › api-0000000000000000000-111111-aaaaaabbbbbb.json

上一篇
[Day 18] 設置 EAS CLI
下一篇
[Day 20] 上傳 Google Service Account 金鑰
系列文
跨平台協同:在 React Native 和 Kotlin 應用中實現無縫交互 -以 Notification 為例30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言