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 檔案總算出現了。
eas credentials
來上傳 Google Service Account 金鑰的 json 檔案。> eas credentials
? Select platform › - Use arrow-keys. Return to submit.
❯ Android
iOS
> eas credentials
✔ Select platform › Android
? Which build profile do you want to configure? › - Use arrow-keys. Return to submit.
development
preview
❯ production
✔ 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
✔ 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
✔ 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