-
Notifications
You must be signed in to change notification settings - Fork 610
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 OCMock & Xcode 7.3 #291
Comments
Given that this problem occurs with other frameworks, too, wouldn't it be more likely be an issue with Cocoapods? I also note that you are using a beta version of Cocoapods. In either case, I looked at the demo project. It seems like Cocoapods tries to use a dynamic framework for OCMock (and not an older-style static library). The binary that contains the tests is located in
and the OCMock binary ends up in Debug-iphoneos/OCMock/OCMock.framework/OCMock To be honest, I don't know why Cocoapods puts the OCMock framework into this location, but given that OCMock is built as a a run-path dependent library (see https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html) it is definitely possible for this work. If Cocoapods sets up a runpath, e.g. I'll leave this issue open for a while, in the hope that someone with more Cocoapods experience has a suggestions. It is definitely not a bug in OCMock, though. |
Upon some further experimentation, it does appear this issue is with CocoaPods. It is occurring whenever a Pod is within a Test target and not in the main target. Opened an issue there. Thank you for your comment & leaving this open for a bit - may be helpful if other users are experiencing the same issue. What is specifically interesting about this issue is if I include |
Closing this as it is apparent it is either a CocoaPods issue or potentially Xcode. |
I'am experienced this issue without CocoaPods, so it is unrelated. With OCMock.framework added to "UnitTests" target I got this errors:
I'am resolve this by adding static library instead of "iOS Framework" from ocmock-3.3.dmg. |
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
OCMock
topodfile
forLibraryNotFoundDemoTests
target.NOTE: KIF 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.
Podfile
Sample Project
The text was updated successfully, but these errors were encountered: