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