The bundle “MyProjectUITests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle
the bundle co. entrepreneurship
the bundle co affiliate
the bundle magazine
the bundle for racial justice and equality
the bundle hair
humble bundle free
bundle stars
I'm willing to add unit and UI tests to my app.
I first configured unit tests with success, I tried to do the same with UI tests. Here is my Podfile, after adding a new UI Testing Bundle target :
platform :ios, '8.0' use_frameworks! inhibit_all_warnings! def shared_pods pod 'Bolts' pod 'Branch' pod 'FBSDKCoreKit' pod 'FBSDKLoginKit' pod 'FBSDKShareKit' pod 'GoogleAnalytics' pod 'GooglePlaces' pod 'Parse' pod 'Toast-Swift' end target 'MyTarget' do shared_pods end target 'MyTargetUITests' do shared_pods end target 'MyTargetUnitTests' do shared_pods end
However, when I try to run the automatically created MyProjectUITests
test case, which only contains the basic setup and without even a @testable import MyProject
:
import XCTest class MyProjectUITests: XCTestCase { override func setUp() { continueAfterFailure = false XCUIApplication().launch() } }
I'm getting this error:
Running tests... The bundle "MyProjectUITests" couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
(dlopen_preflight(/var/containers/Bundle/Application/5A1FE39F-E675-4A47-9BF4-FBCDB96F5821/MyProjectUITests-Runner.app/PlugIns/MyProjectUITests.xctest/MyProjectUITests): Library not loaded: @rpath/libswiftSwiftOnoneSupport.dylib
Referenced from: /private/var/containers/Bundle/Application/5A1FE39F-E675-4A47-9BF4-FBCDB96F5821/MyProjectUITests-Runner.app/PlugIns/MyProjectUITests.xctest/Frameworks/Toast_Swift.framework/Toast_Swift
Reason: image not found)
What is wrong? Thanks for your help.
EDIT : for information, it works fine when I remove that Toast_swift
pod from my UI test target and let it only in my app and unit test targets.
Check out this issue on the cocoapods github issue tracker.
I'm still a little confused as to why this became a problem but the setting the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES
to YES
using this script fixed the issue for me.
post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| # This works around a unit test issue introduced in Xcode 10. # We only apply it to the Debug configuration to avoid bloating the app size if config.name == "Debug" && defined?(target.product_type) && target.product_type == "com.apple.product-type.framework" config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = "YES" end end end end
The Bundle Co. – Official Page, Purchasing a comprehensive online course can feel like a pretty pricey investment. But what if all the courses you ever wanted came together in a magical Welcome to The Bundle Co.’s website, a solution to help you be your best self by bringing you ready-made bundles of some of the best online courses and ebooks on the Internet!
Try adding inherit! :search_paths
and also changing ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES in post_install
use_frameworks! def shared_pods pod 'SomePod' end target 'App_name' do shared_pods end target 'App_nameTests' do inherit! :search_paths shared_pods end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'YES' end end end
About Us – The Bundle Co., The Bundle Co. No DMs for the time being please. If you are a customer and have any questions about your order email us at hello@thebundleco.com Welcome to The Bundle. We’re a student-run multimedia magazine supported by the department of journalism, public relations and new media at Baylor University.
I too faced this issue and none of the other suggestions worked.
After a while I found out that specifically using print()
anywhere in your code will somehow force libswiftSwiftOnoneSupport.dylib to be loaded and the issue will go away.
I'm using Xcode 10.1, Swift 4.2 and the pod that was giving me this issue was Nimble.
Hope this helps!
The Bundle Co. (@thebundleco.co) • Instagram photos and videos, Humble Bundle sells games, books, software, and more. Our mission is to support charity while providing awesome content to customers at great prices. A bundle literally is the saying “collaboration over competition” come to life. By joining forces, we are able to offer something of such a high value that nobody can say no to, and everybody wins.
The Bundle Magazine, At Bundle, we create custom board games full of your own memories & inside jokes! Perfect gift for family vacations, bachelorette parties, and more. At Bundle, we create custom board games full of your own memories & inside jokes! Perfect gift for family vacations, bachelorette parties, and more.
Humble Bundle, This week, I am SO excited to be part of a health and wellness bundle. It offers you 30 (yes, 30!) of the best health & wellness courses there are Vaya. La oferta de este bundle ya ha terminado y no volverá más. Pero puedes dejarnos tu email para que te avisemos cuando salga otro.
Bundle | Custom Board Games for Family & Friends, By the Bundle: Turn Precuts into Patchwork with 12 Fat Quarter-Friendly Quilts [Emma Jean Jansen] on Amazon.com. *FREE* shipping on qualifying offers. Bring 10 Bundles of Akiris Reed to Privateer Bloads in Booty Bay. A level 38 Stranglethorn Vale Quest. +100 reputation with Booty Bay --500 reputation with Bloodsail Buccaneers
Comments
- CMD + Shift + K
- I've already tried this, with no success. (see the edit in my post)
- Are you using xCode 10?
- @JonVogel Yes exactly, version 10.0.
- I also read the issue and tried this, but I keep getting this error. It only happens in UI tests, not even in unit ones. So I ended up pasting the framework code into my UI test target, but it's really not convenient..