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.
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)
Replacing #import "Headerfile.h"
with #import <Framework/Headerfile.h>
worked for me.
When you Drag & Drop the required framework to your Frameworks folder, Tick on "Destination: Copy items if needed"
Then you would be able to reference it properly now.
Just ran into this with Xcode 7 and I ended up having to copy the 3rd party Framework (and bundle) file into my project's main directory before dragging it into the Xcode project. This allowed it to add the correct Framework search path and no longer gave me any problems.
Just hit this problem myself after making a new test target in Objective-C.
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.
target 'MyApp' do
pod 'ObjectiveSugar', '~> 0.5'
target "MyAppTests" do
inherit! :search_paths
pod 'OCMock', '~> 2.0.1'
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
puts "#{target.name}"
end
end
In my case, using CocoaPods, Xcode was building fine, but a command line build couldn't locate the framework headers.
The solution was to build the workspace, not the project!
Cleaning the project and restarting XCode sometimes helps
来源:https://stackoverflow.com/questions/30762492/xcode-7-cant-find-header-files-from-framework