我的应用中集成了firebase崩溃报告。根据Firebase文档,我应该在Xcode构建阶段添加自定义shell脚本,如下所示:
JSONF="${PODS_ROOT}/../AppName/Resources/Other/name-firebase-crashreporting-xfgzl-92c3174357.json"
GOOGLE_APP_ID=1:xxxxxxxxxxxx:ios:xxxxxxxxxxxxxxxx
defaults write com.google.SymbolUpload version -integer 1
JSON=$(cat "${JSONF}")
/usr/bin/plutil -replace "app_${GOOGLE_APP_ID//:/_}" -json "${JSON}" "$HOME/Library/Preferences/com.google.SymbolUpload.plist"
"${PODS_ROOT}"/FirebaseCrash/upload-sym -vv "${JSONF}"
如果我使用Xcode存档(UI)进行存档,我将获得以下日志:
因为你可以看到令牌是无效的,新的请求将被用来获得一个新的请求,到目前为止是如此的好,相反如果我要求fastlane
来构建项目我得到以下内容:
/Users/xxx/Desktop/s3/njm/name-ios/Pods/FirebaseCrash/upload-sym-util.bash:148: note: access_token not found in
/Users/xxx/Library/Preferences/com.google.SymbolUploadToken.plist. Token invalid.
/Users/xxx/Desktop/s3/njm/name-ios/Pods/FirebaseCrash/upload-sym-util.bash:229: note: Token cannot be used. Requesting OAuth2 token using installed credentials.
/Users/xxx/Desktop/s3/njm/name-ios/Pods/FirebaseCrash/upload-sym-util.bash:235: note: Certificate information appears valid.
* Trying 216.58.204.109...
* Connected to accounts.google.com (216.58.204.109) port 443 (#0)
* SSL: certificate verification failed (result: 5)
* Closing connection 0
Command /bin/sh failed with exit code 1
所以问题发生在curl
certificate verification failed
我错过了什么吗?
答案 0 :(得分:0)
通过以下步骤,我可以完成它并且一切正常:
1 - 我从curl
安装了Homebrew
:brew install curl --with-openssl
2 - 将curl
路径指向新安装的路径:brew link --force curl
3 - 运行此:curl --remote-name --time-cond cacert.pem https://curl.haxx.se/ca/cacert.pem