2016-11-28 55 views
0

我的应用程序中集成了Firebase崩溃报告。据火力地堡的文档,我应该在Xcode的构建阶段添加自定义的shell脚本如下:fastlane运行自定义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),我会得到下面的日志做归档: enter image description here

你可以看到,如果令牌是无效的一个新的请求将被制成得到一个新的,到目前为止好,在相反的,如果我问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 

所以proble米是在curlcertificate verification failed我错过了什么?

回答

0

遵循下面的步骤,我可以把事情办成,一切工作正常:

1 - 我安装curlHomebrewbrew install curl --with-openssl

2 - 点curl PATH到新安装的一个: brew link --force curl

3 - 运行该操作:curl --remote-name --time-cond cacert.pem https://curl.haxx.se/ca/cacert.pem