Sinu Varghese
Sinu Varghese

Reputation: 800

#import not finding .h file in Xcode (Version 6.3)

I am unable import the .h file. The file is shown in the Project Navigator in Xcode.

Actually for adding the Localytics SDK, I dragged the SDK folder to the project navigator & 'Add to Target' checkbox selected.

enter image description here

Is it required to add the library to the 'Header Search Path' in the 'Build Settings' ? Presently below values are there in my 'Header Search Path'.

"$(TARGET_BUILD_DIR)/usr/local/lib/include"
"$(OBJROOT)/UninstalledProducts/include"
"$(BUILT_PRODUCTS_DIR)"

Upvotes: 2

Views: 1687

Answers (2)

Phillip Mills
Phillip Mills

Reputation: 31016

Double-click on the Header Search Paths value to open the window that lets you add a new path. Open a Finder window and navigate so that you can see the folder that contains Localytics.h. Drag the folder into the search path window. Change your import to #import "Localytics.h".

Upvotes: 4

aBilal17
aBilal17

Reputation: 3132

For all who have not found issue:

Go to Build settings and search for "Framework Search Paths", then remove everything and put ./ and make it recursive (by double-clicking on it)

IMPORTANT - Don't download Parse framework on Windows and then copy to Mac! inside framework there are some links and while copying they get corrupted. Download the framework directly from Mac and when added to xcode make sure it has "Headers" folder under it in XCode frameworks.

I hope it helps some people.

Upvotes: 2

Related Questions