jailani
jailani

Reputation: 2270

Header files are not found while archiving the build in xcode

I have a sub project that has been developed as dynamic lib and included that sub project into my main project and been set as target dependency.

When I run my main project, .a file for my sub project has been created successfully and the corresponding header files are created in the build directory such as (build/release-iphoneos/include). I have mentioned path using MACRO

In my main project, I mentioned header search path as the same that i mentioned above using MACRO.

But when I try to archive the build it throws the run time error file not found in the import statement

#import <subproject/myfile.h>

But it is getting build and run successfully even though it displays the file not found error in the xcode editor in compile time.

My question is

Is this because of the build directory will be empty while archieving?

Upvotes: 1

Views: 1580

Answers (1)

jailani
jailani

Reputation: 2270

I solved the problem as below

1. The header files were private so changed them as public so they are exposed to main project. (To build & run successfully)

2. I copied the header files and created a directory and add them into my main project and set the header search path to point that directory (To archive successfully)

Upvotes: 1

Related Questions