Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 7 can't find header files from framework

I'm trying to add PassSlot into my project, but it says it can't find the .h file. I'm following everything correctly from here: https://github.com/passslot/passslot-ios-sdk

Is this an Xcode 7 problem? It was working fine and now that I opened the project in Xcode 7, it is giving me this problem. I reopened it on Xcode 6 and it starts showing the problem as well.

like image 928
somepers Avatar asked Jun 10 '15 16:06

somepers


People also ask

How do I make the framework headers available in Xcode?

In the MyFrameworkName.h top-level file, import each header file you want to make available: e.g. #import <MyFrameworkName/MyPublicHeader.h> Show activity on this post. In my case, using CocoaPods, Xcode was building fine, but a command line build couldn't locate the framework headers.

Why can't I add a bridging header to my release build?

It all has to do with how a bridging header is added to a project and is probably an Xcode bug. If you examine your project.pbxproj file you may find that the bridging header is not set for the release build-- the build archiving uses. I was able to just copy the line from the debug build for the bridging header into the release build clause.

How to search for an include file in a header?

"these quotes" are for user header files. There is probably an option to use the header search path for all include files. The usual method to get this working is to start with something that works and modify it until you get what you want.

Why can't my podfile Find my Pod header files?

One thing to remember is that under some circumstances, each test target must be listed in the Podfile with pod dependencies. If the Podfile only associates the project with the pods, it may not find the pod header files. Here's an example of a more complex Podfile from the cocoapods docs. Show activity on this post.


2 Answers

I think Dinesy is right. This solves the problem for me.

I've noticed that Xcode7 doesn't automatically fill in the required Framework search paths when you import a 3rd party one (I believe Xcode6 did do this). Check if yours are empty by going to Project -> Build Settings -> Search Paths -> Framework Search Paths. Fill it in with wherever your Frameworks live. If it's under your project you can use $(PROJECT_DIR)

like image 80
Spriter Avatar answered Oct 14 '22 22:10

Spriter


Replacing #import "Headerfile.h" with #import <Framework/Headerfile.h> worked for me.

like image 24
BLC Avatar answered Oct 14 '22 21:10

BLC