New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KIF/KIF.h file not found #765
Comments
This error can be solved adding -framework IOKit to linker flags |
Ah, okay, that is correct, thanks. However, I did this is my own project already, but the errors I listed above are still there. |
Can you post the contents of your bridging header here please? |
Well, for now it is a copy of the bridging header from Testable Swift project, i.e. it only contains the line |
Take a look at the header search paths in your build settings. Somehow KIF.h is not in the search path. |
Having the exact same issue. None of the proposed workarounds is helping. |
I have the same issue in an Objective-C project. I followed the Readme instructions for the Github installation. |
Fixed it by adding |
@janapejic, @miguelcampiao: does the suggestion from @melvynhills fix your issue? |
Nope. It did not fix it. I ended up creating a project from scratch, adding KIF as a pod, and it worked. |
Additional info: make sure to choose |
I'm having this same issue with XCode 7.2 except I'm installing by way of CocoaPods. My project is written in Swift, and was making successful use of a Bridging Header to use another framework written in Obj-C just fine prior to trying to install KIF. None of the proposed workarounds solve the problem. For the other folks in this thread that have this problem, are you also on XCode 7.2 like @janapejic and I? Has anyone tried to use a 7.3 beta to see if this makes a difference? Maintainers: what other information can I give you to help diagnose the problem? |
I'm having a similar issue. Question to others: Are you trying to import/use KIFUITestActor anywhere? |
I had a bit of a eureka moment looking at #809. I realized that I had followed the docs to the letter and that was my problem. Some of the KIF instructions are not entirely clear for usage with Swift. Namely, there is one section about installing via CocoaPods, and another for 'Using Swift', but neither section really covers the case of 'Using CocoaPods with Swift' very clearly. I had been building KIF as a framework (
If KIF is built as a Framework via CocoaPods then it shouldn't be included in the Bridging Header (there are some circumstances where this might be false, but largely the advice in this article seems reasonable). When I removed KIF from the Bridging Header, I tried to build the test target again and I received the same error as in #809. I solved the public vs. private issue the same way as @mtitolo did while waiting on PR #810 since this is/was a huge blocker for me, and now everything seems golden. I hope that helps folks using CocoaPods stuck on this! |
Is this issue resolved ? Am still facing the issue with Xcode's new iOS UI Bundle & iOS Unit Test bundle (Objective-C). I am not using cocoa pods but installed through git submodule mechanism. @mtitolo Yes I am using KIFUITestActor to create category of it and add
|
Only works with Unit test targets. Not UI test target. Could that be the issue?
|
@mikelupo No I tried installing KIF in Unit test targets too by creating new target. But I ended up facing the same issue. |
I'm having the same issue, ObjC by importing the framework without cocoapods |
@timendez: did you try any of the fixes in the comments above? |
@phatmann Yes, they didn't work. I ended up solving my issue by simply re-adding the KIF.framework to Link Binary With Libraries in Build Phases. I could drill down command-clicking on the |
I need to access the camera to scan photos and so I need to run on the device. I have already tested on the iPhoneSimulator with this project, just fine, so I think I'm linking correctly. I added arm64 in the Info.plist file under UIRequiredDeviceCapabilities, either way, still won't build right. Ideas? Ld build/Intermediates/MyApp.build/Debug-iphoneos/MyAppTests.build/Objects-normal/arm64/MyAppTests normal arm64 ld: warning: ignoring file ./MyApp/MyAppTests/IOKit.framework/IOKit, missing required architecture arm64 in file ./MyApp/MyAppTests/IOKit.framework/IOKit (2 slices) |
@erustique Since this is a different issue, can you please file a new ticket? Thanks. |
Closing, since it is inactive and workarounds have been found. |
@janapejic |
if you use cocoaPod set up KIF, you should go to project settings -> Header Search Paths, add "${PODS_ROOT}/KIF/Classes. Then in your test file #import "KIF.h" |
With CocoaPods, you should be able to just use |
I am trying to integrate KIF into my AppleTV project. I'm using Xcode 7.2, programming in Swift and integrating KIF as download from GitHub. I followed all the steps in README, including the "Use with Swift" part, importing KIF in my bridging header and setting the path to this bridging header in Build Settings of my testing target. However when I try to run the tests with ⌘U (I did not really write any yet even, using the default implementation) I get the following two errors:
I assume that the second error will disappear once the first one is solved, but I do not know how to solve it. Any ideas?
The text was updated successfully, but these errors were encountered: