I’ve been using CocoaPods to manage objective-C libraries for a while now. However, there is a small problem. When I input import keyword in Xcode, there is no automatic association to complete the code function, so I need to manually type the file name, which is difficult to adapt to.

Found a solution on 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.

In brief, this is the steps:

Go to the Target -> Build Settings menu and find the User Header Search Paths setting item

Add a value of “${SRCROOT}” and select Recursive so that Xcode will recursively search for files in the project directory

The autocomplete function will be ready soon.