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
test runtime error: Failed to load test bundle … Library not loaded: @rpath/libswiftSwiftOnoneSupport.dylib #8318
Comments
Can you add a swift file ot your tests target? |
There already is: https://github.com/js/cocoapods-sample-dynamic-linker-xctest/blob/master/Podtest3Tests/Podtest3Tests.swift adding another changes nothing |
I've had another user file this issue directly with our repo: pointfreeco/swift-snapshot-testing#151 Given a brand new iOS Single View app with a unit test target I've had fine luck with the following Podfile: target 'MyAppTests' do
pod 'SnapshotTesting', '~> 1.1'
end But this Podfile breaks in the same manner described here: target 'MyApp' do
use_frameworks!
target 'MyAppTests' do
inherit! :search_paths
pod 'SnapshotTesting', '~> 1.1'
end
end Something with the nesting, Are we missing something in our Podspec? https://github.com/pointfreeco/swift-snapshot-testing/blob/21567920d976099106e5a8eb7ccedf8edea398f6/SnapshotTesting.podspec |
This reverts commit 7c350f6. SnapshotTesting appears to not be compatible with this style of Podfile: CocoaPods/CocoaPods#8318 Let's go back to the old description for now.
This reverts commit 7c350f6. SnapshotTesting appears to not be compatible with this style of Podfile: CocoaPods/CocoaPods#8318 Let's go back to the old description for now.
I find with a similar project that if I un-nest the project target and test target and only apply "use_frameworks!" to the project and not the tests, the tests will build and run. For example (a new project built with pod lib create, modified thus):
|
Thats normal because it builds dependencies as static libraries instead of dynamic frameworks. I was able to reproduce the issue but I am unable to understand why Right now I am leaning this is not a CocoaPods issue as CocoaPods only deals with I do not want to close as I do not know 100% yet. |
See this old issue http://www.openradar.appspot.com/34254691 |
Came up to this https://openradar.appspot.com/43701006 |
@js the only time I got it to compile is by setting |
@js I think this is as far as I can go. Setting I honestly think this is an Xcode bug. |
See also: #8172 Yes it appears to be an Xcode bug, and there was a PR to add this workaround to CocoaPods but I was hesitant to merge it since it may be fixed in a future release of Xcode |
Cool nice! |
Alright good news this appears fixed in Xcode 10.2 Beta! Probably an Xcode bug exacerbated by CocoaPods integration. @js can you give it a try? |
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍 |
This reverts commit 7c350f6680cff5180a78a04ab30ac1c5cb565f1b. SnapshotTesting appears to not be compatible with this style of Podfile: CocoaPods/CocoaPods#8318 Let's go back to the old description for now.
Report
Dynamic linker errors during runtime of XCTest bundle
What did you do?
pod init
What did you expect to happen?
unit tests continues to run successfully even after adding a test target dependency with cocoapods
What happened instead?
dynamic linker errors at runtime with no other changes than adding the pod
CocoaPods Environment
Please note that this is reproducible on both
1.5.3
, andmaster@8d244a7c
Stack
Installation Source
Plugins
Podfile
Project that demonstrates the issue
https://github.com/js/cocoapods-sample-dynamic-linker-xctest
The text was updated successfully, but these errors were encountered: