Try   HackMD

cocoapods 安裝 (M1處理器)

避免自己忘記的產物

  1. 開啟Terminal
  2. sudo gem install cocoapods
  3. 輸入密碼後按enter
  4. pod setup --verbose (verbose 可省略)

安裝一次後之後就不用執行以上步驟

  1. 打開Xcode
  2. 在桌面創建一個新的project
  3. cd Desktop/專案名稱/
  4. pod init
  5. open Podfile

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

  1. #Pods for 專案名稱改成pod '預匯入library名稱(ex:SideMenu)'
  2. cmd+s 關閉Podfile

12. sudo arch -x86_64 gem install ffi

(之後在執行pod install時可省略步驟12)

13. arch -x86_64 pod install

成功畫面大約長這樣

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

  1. open 專案名稱.xcworkspace

若專案資料夾無法展開重開應該就可以了

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

Reference

https://cocoapods.org/pods/SideMenuSwift
https://www.youtube.com/watch?v=e8OtfA3YvSM&t=146s

tags: Cocapods Mac M1處理器