iT邦幫忙

2024 iThome 鐵人賽

DAY 20
0

Day 19 卡在指定 Google Service Account 金鑰檔案(.json)的路徑。

> eas credentials
✔ Select platform › Android
✔ Which build profile do you want to configure? › 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? › Google Service Account
Android Credentials
Project                 notificationprocess
Application Identifier  com.jim.notification
No credentials set up yet!

✔ 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 has been found at
  /Users/minjing/development/jim/NotificationProgress/
  (Google Service Account 金鑰檔名).json
? Would you like to use this file? › (Y/n)

看了文章介紹,將金鑰檔案拖移至 React Expo 專案根目錄內,
EAS CLI 就辨識到這個金鑰檔了。

選擇 Y,以使用此金鑰檔。

資料來源:Medium - Expo Notification 教學

✔ 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 has been found at
  /Users/minjing/development/jim/NotificationProgress/(Google Service Account 金鑰檔名).json
✔ Would you like to use this file? … yes

✔ Uploaded Google Service Account Key.
Press any key to continue...

這個金鑰檔是敏感資料,須再留意不要將此檔案加入版控系統 / repository。


上一篇
[Day 19] eas.json 不見了怎麼辦?
下一篇
[Day 21] 重新構建 React Expo 專案
系列文
跨平台協同:在 React Native 和 Kotlin 應用中實現無縫交互 -以 Notification 為例30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言