0

Q1: My project build failed when I add an upload script.

JSON_FILE=${PROJECT_DIR}/Blued-i-a3bc95921663.json
GOOGLE_APP_ID=1:XXXXXXXXXX:ios:XXXXXXXXXXX
defaults write com.google.SymbolUpload version -integer 1
JSON=$(cat "${JSON_FILE}")
/usr/bin/plutil -replace "app_${GOOGLE_APP_ID//:/_}" -json "${JSON}"      "$HOME/Library/Preferences/com.google.SymbolUpload.plist"
"${PODS_ROOT}"/FirebaseCrash/upload-sym

failed log:

...
warning: dump_syms: /Users/xiejing/Library/Developer/Xcode/DerivedData/Blued2015-c/Users/xiejing/Library/Preferences/com.google.SymbolUploadToken.plist: Could not modify plist, error: Failed to parse value  with type -json

kgekafhlpbizzczluukmcxwihwk/Build/Products/Debug-iphoneos/Blued2015.app.dSYM/Contents/Resources/DWARF/Blued2015: in compilation unit '/Users/xiejing/workspace/Blued2015/Blued-International-iOS/Blued/Blued/Blued2015/ThirdPart/libs/zxing/source/oned/Code128Reader.cpp' (offset 0x58c5ec):

....

warning: dump_syms: /Users/xiejing/Library/Developer/Xcode/DerivedData/Blued2015-ckgekafhlpbizzczluukmcxwihwk/Build/Products/Debug-iphoneos/Blued2015.app.dSYM/Contents/Resources/DWARF/Blued2015: in compilation unit '/Users/xiejing/workspace/Blued2015/Blued-International-iOS/Blued/Blued/Blued2015/ThirdPart/libs/zxing/source/common/BitArray.cpp' (offset 0x99deed):
warning: dump_syms:        /Users/xiejing/Library/Developer/Xcode/DerivedData/Blued2015-ckgekafhlpbizzczluukmcxwihwk/Build/Products/Debug-iphoneos/Blued2015.app.dSYM/Contents/Resources/DWARF/Blued2015: in compilation unit 'Blued2015/ThirdPart/libs/zxing/source/ResultPoint.cpp' (offset 0x9a6c2e):
Command /bin/sh failed with exit code 1

Q2: Also failed when I upload manually.

$/Pods/FirebaseCrash/batch-upload BF574806-B49C-3B5B-A17F-558534AF82FC
>/Users/xiejing/Library/Preferences/com.google.SymbolUploadToken.plist: Could not modify plist, error: Failed to parse value  with type -json
4

1 回答 1

0

我建议尝试一些事情:

  1. 吹走上传脚本使用的缓存文件:

    rm $HOME/Library/Preferences/com.google.SymbolUpload*
    
  2. 创建一个新的服务帐户并确保它具有编辑者权限。请参阅https://firebase.google.com/docs/crash/ios上的(更新的)说明 。下载对应的key

  3. 确保您拥有最新的 Firebase Crash pod(撰写本文时为 1.0.7)。

  4. 将您的脚本更新为以下内容(在上面的文档链接中也提到过)

    # Replace this with the GOOGLE_APP_ID from your GoogleService-Info.plist file
    GOOGLE_APP_ID=1:my:app:id
    
    # Replace the /Path/To/ServiceAccount.json with the path to the key you ust downloaded
    "${PODS_ROOT}"/FirebaseCrash/upload-sym" /Path/To/ServiceAccount.json"        
    

希望这会有所帮助

于 2016-08-22T20:32:35.653 回答