天天看點

IOS執行Archive打包IPA報錯:The data couldn’t be read because it isn’t in the correct format

本機報錯Log提示:ruby2.6.0找不到sqlite3。

解決曆程如下(省流直接最後一步即可):

1、但是本機在用的ruby已經是3.0.0版本,也有sqlite3,可能是不比對。

2、詳細看Log中ruby2.6.0的路徑,發現是MacOS系統路徑,不是使用者路徑。

3、Google查找解決方案,的确是由于xcode沒有檢測到使用者路徑下的ruby造成的。

4、打開​​

​~/.zshrc​

​檔案,檔案末尾添加以下内容

export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

[[ "$APP" = *"/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/"* ]] && {
  echo Xcode detected
  rvm use system
}