【iOS開發(fā)】synx的安裝與使用

一. GitHub地址

synx iOS項目工程虛擬文件夾變真實文件夾github.com/venmo/synx

二. 安裝synx

// 1. gem sources --remove https://rubygems.org/

// 2.等有反應(yīng)之后再敲入以下命令(添加國內(nèi)的源,原先是 http://ruby.taobao.org/ ,現(xiàn)在淘寶上的ruby鏡像換成https了)

$ gem sources -a https://ruby.taobao.org/

// 3.驗證是否替換成功

$ gem sources -l

// 4.直接通過命令行開始安裝:

$ gem install synx

如果你權(quán)限不夠的話需要sudo:

$ sudo gem install synx

三. 安裝出現(xiàn)的問題

(1). 問題一

  • ERROR: SSL verification error at depth 1: unable to get local issuer certificate (20)

  • ERROR: You must add /C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Certification Authority to your local trusted store

  • ERROR: SSL verification error at depth 2: self signed certificate in certificate chain (19)

  • ERROR: Root certificate is not trusted (/C=US/O=GeoTrust Inc./CN=GeoTrust Global CA)

出現(xiàn)這個問題的原因主要是Ruby環(huán)境需要2.2版本以上,所以要更新Ruby環(huán)境

1.安裝rvm $ curl -L get.rvm.io | bash -s stable

2.裝載rvm $ source ~/.rvm/scripts/rvm

3.安裝2.3.0版本ruby $ rvm install 2.3.0

4.將2.3.0設(shè)為默認(rèn) $ rvm use 2.3.0 --default

(1). 問題二

  • You don‘t have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
輸入  sudo gem install -n /usr/local/bin cocoapods

四. synx 的命令

(1).常用操作

$ synx “你的功能路徑”

//如synx /Users/wld/lois_work/WeiLingDi/WeiLingDi.xcodeproj

//注意:如果使用了cocoapods,要使用.xcodeproj而不能用.xcworkspace其他操作命令

(2).其他操作

--prune, -p                  //同步的時候刪除工程中沒有使用到的圖片資源和文件。

--no-color                    //刪除所有顏色輸出

--no-default-exclusions      //不適用默認(rèn),除了 /Libraries, /Frameworks, and /Products

--quiet, -q                  //silence all output

--exclusion, -e EXCLUSION    //忽略當(dāng)前文件夾進(jìn)行同步
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容