3/1 起,Firebase 不提供網頁介面上傳 dYSM (debug symbol)
改用命令列方式上傳
(其實到 www.fabric.io 後台 仍舊可以 Web 介面上傳)
Fabric SDK 必需 1.10 以上
更新方式:
pod update Fabric Crashlytics
哪裡找到 dSYM 檔案:
#1從 tunesconnect 後台下載 appDsyms.zip 檔案
解開後放在 ~/Downloads/appDsyms
#2
在 ~/Library/Developer/Xcode/Archives 裡頭也可找到
例如 ~/Library/Developer/Xcode/Archives/2020-03-10/myapp 2020-3-01, 12.11.xcarchive/dSYMs/
上傳 dSYM 檔案的命令 (兩方式):
方法一如果你使用的是 Firebase Crashlytics SDK,請執行下列指令碼:
~/MYAPP/Pods/FirebaseCrashlytics/upload-symbols \ -gsp ~/MYAPP/myapp/GoogleService-Info.plist \ -p ios ~/Downloads/appDsyms.zip
方法二
已連結 Fabric 應用程式時,要以 Fabric API 金鑰上傳 (而非上面的 GoogleService-info.plist)
~/MYAPP/Pods/Fabric/upload-symbols \ -a 83cb6216f1769a04f64e339f0e175exxxxxxxxxx \ -p ios ~/Downloads/appDsyms** Fabric API Key 可在 https://www.fabric.io/settings/organizations 查詢
(Fabric.io 在
(因肺炎疫情,google 宣佈延後到 2020/5/4 才關閉 Fabric)
上傳過程像這樣:
...
Successfully submitted symbols for architecture armv7 with UUID 039dd280b15837e9872ce3e3399e32f7 in dSYM: /Users/xxx/Downloads/appDsyms/039dd280-b158-37e9-872c-e3e3399e32f7.dSYM
Successfully submitted symbols for architecture armv7 with UUID 3c50c6a90cc43515b791a7f063cb8ea4 in dSYM: /Users/xxx/Downloads/appDsyms/3c50c6a9-0cc4-3515-b791-a7f063cb8ea4.dSYM
Successfully uploaded Crashlytics symbols
=====
查詢 UUID 的方法
找出自己目錄下 所有 *.dSYM 檔案
$ mdfind -name .dSYM | while read -r line; do dwarfdump -u "$line"; done UUID: 9304072A-2EEE-30E8-B544-71B8EDEC183E (arm64) /Users/XXX/Downloads/appDsyms/9304072a-2eee-30e8-b544-71b8edec183e.dSYM/Contents/Resources/DWARF/Protobuf UUID: 3128637D-659D-31DA-B9BD-A6CE6728E48F (armv7) /Users/XXX/Downloads/appDsyms/3128637d-659d-31da-b9bd-a6ce6728e48f.dSYM/Contents/Resources/DWARF/KeychainAccess UUID: 981011B9-67AF-3C51-A253-A24967DC0662 (arm64) /Users/XXX/Downloads/appDsyms/981011b9-67af-3c51-a253-a24967dc0662.dSYM/Contents/Resources/DWARF/FBSDKLoginKit UUID: 593479AA-52BA-3BDE-85F4-7E0A6E57771B (arm64) /Users/XXX/Downloads/appDsyms/593479aa-52ba-3bde-85f4-7e0a6e57771b.dSYM/Contents/Resources/DWARF/SKPhotoBrowser :: ::
另 也可
$ mdfind F01C2ACB-A3C9-33BD-A583-E84E329440B1 /Users/XXX/Downloads/appDsyms.zip /Users/XXX/Downloads/appDsyms/f01c2acb-a3c9-33bd-a583-e84e329440b1.dSYM
針對特定 dSYM 目錄 查詢 UUID
$ dwarfdump -u diary.app.dSYM/ **目錄 UUID: 9E5D3403-7446-3DD4-9A86-5FE4D8FB4423 (armv7) diary.app.dSYM/Contents/Resources/DWARF/diary 或這樣也可以 $ ls -l diary.app.dSYM/Contents/Resources/ total 8 drwxrwxr-x@ 3 mini staff 96 3 9 21:36 DWARF -rw-rw-r--@ 1 mini staff 273 3 9 21:36 9E5D3403-7446-3DD4-9A86-5FE4D8FB4423.plist