Skip to content

Unable to use XCFit without copy swift lib #20

@APshenkin

Description

@APshenkin

Hi!

So after installation using cocoapods I was unable to launch tests.

Here is my Podfile

target 'MyAppBDDTests' do
    use_frameworks!
    
    pod 'XCFit'
end

Tests fails with this error:

2018-12-10 17:59:18.534828+0300 MyAppBDDTests-Runner[81743:15183477] Running tests...
2018-12-10 17:59:18.627137+0300 MyAppBDDTests-Runner[81743:15183477] The bundle “MyAppBDDTests” couldn’t be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
2018-12-10 17:59:18.627333+0300 MyAppBDDTests-Runner[81743:15183477] (dlopen_preflight(/Users/a.pshenkin/Library/Developer/Xcode/DerivedData/MyApp-cqxbjzcsntzyqcdyggzdpcacqdjn/Build/Products/Debug-iphonesimulator/MyAppBDDTests-Runner.app/PlugIns/MyAppBDDTests.xctest/MyAppBDDTests): Library not loaded: @rpath/libswiftSwiftOnoneSupport.dylib
  Referenced from: /Users/a.pshenkin/Library/Developer/Xcode/DerivedData/MyApp-cqxbjzcsntzyqcdyggzdpcacqdjn/Build/Products/Debug-iphonesimulator/MyAppBDDTests-Runner.app/PlugIns/MyAppBDDTests.xctest/Frameworks/XCFit.framework/XCFit
  Reason: image not found)

TO fix this I found only one way. Add Copy Files in Build Phases, choose destination Frameworks, add file: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftSwiftOnoneSupport.dylib

Is there more elegant way to fix this?

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions