Skip to content
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

"Library Not Found" error with just KIF & Xcode 7.3 #822

Closed
Nomad00 opened this issue Mar 28, 2016 · 11 comments
Closed

"Library Not Found" error with just KIF & Xcode 7.3 #822

Nomad00 opened this issue Mar 28, 2016 · 11 comments

Comments

@Nomad00
Copy link

Nomad00 commented Mar 28, 2016

Report

What did you do?

Upgraded to Xcode 7.3.
Created empty new empty project.
Ran pod init (Using CocoaPods 1.0.0-beta 5)
Added KIF to podfile for LibraryNotFoundDemoTests target.
NOTE: OCMock also exhibits the issue.
Executed pod install
Executed test target on device.

What did you expected to happen?

Test target execute on device.

What happened instead?

Test target failed to execute.

Failed to load test bundle from file:///private/var/containers/Bundle/Application/.../LibraryNotFoundDemo.app/PlugIns/LibraryNotFoundDemoTests.xctest: Error Domain=NSCocoaErrorDomain Code=3587 "dlopen_preflight(/var/containers/Bundle/Application.../LibraryNotFoundDemo.app/PlugIns/LibraryNotFoundDemoTests.xctest/LibraryNotFoundDemoTests): Library not loaded: @rpath/KIF.framework/KIF

Podfile

# Uncomment this line to define a global platform for your project
platform :ios, '8.0'
# Uncomment this line if you're using Swift
use_frameworks!

target 'LibraryNotFoundDemo' do

end

target 'LibraryNotFoundDemoTests' do
# Issue occurs with either of these Pods.
  pod 'KIF', '~> 3.3.0'
#  pod 'OCMock','~> 3.2.2'
end

# Uncomment this if using `KIF`
 post_install do |installer|
   installer.pods_project.targets.each do |target|
     target.build_configurations.each do |config|
       config.build_settings['ENABLE_BITCODE'] = 'NO'
     end
   end
 end

Sample Project

@phatmann
Copy link
Contributor

Are you running unit tests or UI tests?

@Nomad00
Copy link
Author

Nomad00 commented Mar 28, 2016

Unit tests.

@vasarhelyia
Copy link

Hi, same here with UI tests, and version 3.4.1. Here's the project that breaks, hope it helps.

@Nomad00
Copy link
Author

Nomad00 commented Mar 28, 2016

For the symptoms I am seeing, I am leaning towards this being a CocoaPods issue in general - and have an issue there.

@vasarhelyia
Copy link

@Nomad00 thanks, I've added the framework to the main target and now it finds KIF when building the test target. Just a note: I'm using Carthage, and the issue was the same, so it doesn't seem to be exclusively CocoaPods related. Not sure what is it then, maybe Xcode, but it might worth a check if others have similar issues.

@phatmann
Copy link
Contributor

Good sleuthing. Can we close this issue since it is a CocoaPods issue?

@Nomad00
Copy link
Author

Nomad00 commented Mar 29, 2016

@vasarhelyia: That is really interesting and unexpected...Will test that out on my side too. One thing of note, I would suggest removing KIF from your main target before shipping to Apple as I am pretty sure it uses private APIs.

@phatmann: I would say yes - closing, thank you!

@Nomad00 Nomad00 closed this as completed Mar 29, 2016
@Manoj412
Copy link

Hi,

I am also facing same issue . In Xcode 7.2 its worked fine. but in Xcode 7.3 I am facing this issue.
So How you solve this? Please help its almost wasted 3 days .

@Manoj412
Copy link

Now i added directly into my project with same build settings in test target but still same issue.

@phatmann
Copy link
Contributor

@Manoj412: please open a new issue, since this issue is CocoaPods related. Thanks.

@Manoj412
Copy link

Manoj412 commented Apr 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants