官網說的挺詳細了
這里記錄下個人使用Cocoapods安裝mapbox時遇到的一個問題:
在官網中title為Configure your secret token部分
image.png
配置.netrc時遇到了一些問題,嘗試了多次才解決
you will need to store it in a .netrc file in your home directory (not your project folder). 根據該描述,就是需要將.netrc文件創建在mac賬戶的根目錄下
- 打開終端
使用touch命令創建.netrc
touch .netrc
- 打開.netrc文件
使用命令open
open .netrc
- 編輯.netrc
依據installation操作獲取到secret api token替換掉占位文字
image.png
保存.netrc內容
項目podfile中添加 pod 'Mapbox-iOS-SDK'
執行pod install
效果圖:
image.png