0

我的应用程序中集成了 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我错过了什么吗?

4

1 回答 1

0

按照以下步骤,我可以完成它并且一切正常:

1 - 我curl从以下位置安装Homebrewbrew install curl --with-openssl

2 - 将curlPATH 指向新安装的路径: brew link --force curl

3 - 运行这个:curl --remote-name --time-cond cacert.pem https://curl.haxx.se/ca/cacert.pem

于 2016-11-28T09:51:35.883 回答