Xcode代碼提示聯想功能失效,按command鍵點不進去類庫,提示“?”
找到本地DerivedData,路徑是/Users/xxx[電腦名]/Library/Developer/Xcode/DerivedData
將對應的和項目相應的文件夾的內容全部刪除。
修改項目名稱報錯
ld: library not found for -lPods-testapp
clang: error: linker command failed with exit code 1 (use -v to see invocation)
1
重新下載pod
2
command + k 清理工程 ,找到DerivedData文件夾,路徑是~/Library/Developer/Xcode/DerivedData,刪除.重新編譯。
3
如果還是報找不到頭文件,檢查下頭文件設置
一些標識符:$(SRCROOT) (這代表工程根目錄)、$(PODS_ROOT) (這代表pods文件夾)、$(inherited) (這個是target在設置自己路徑的時候如果加了這個,那么就是繼承project里設置的路徑)
Xcode在編譯時, Library Search Paths 和 Header Search Paths是一定會去搜索的。而User Header Search Paths只有在Always Search User Paths為Yes時才會被搜索。
在項目的Target的里設置一下,添加cocoapods頭文件目錄:目錄路徑直接寫:$(PODS_ROOT) (這代表pods文件夾目錄) ,后邊選擇recursive(意思是遞歸查找子目錄) 。就可以了。
4
查看project->info->Configurations下,bug和release中,工程所對應pod配置是否為none
1526554364850.jpg