简体   繁体   中英

#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.

在此处输入图片说明

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)"

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" .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM