CocoaPods 導入第三方庫頭文件自動補齊

使用了一段時間CocoaPods來管理Objective-c的類庫,方便了不少。但是有一個小問題,當我在xcode輸入import關鍵字的時候,沒有自動聯想補齊代碼的功能,需要手工敲全了文件名,難以適應。

在stackoverflow上找到了解決辦法:

Go to the Target > ”Build Settings” tab and find the ”User Header Search Paths” setting.

Set this to ”$(BUILT_PRODUCTS_DIR)” and check the ”Recursive” check box.

Now the built target will search the workspace’s shared build directory to locate the linkable header files.

簡單說就是這么幾步:

選擇Target -> Build Settings 菜單,找到User Header Search Paths設置項

新增一個值"${SRCROOT}",并且選擇Recursive,這樣xcode就會在項目目錄中遞歸搜索文件

自動補齊功能馬上就好使了。

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容