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