fix link error when launching SSK tests

pull/1/head
Michael Kirk 7 years ago
parent 59d3699e1b
commit 8472801c4b

@ -4,6 +4,10 @@
import XCTest
/////
// Swift Test vs. Cocoapods issue #1
/////
//
// Cocoapods-generated test targets (like this one)
// fail to link if:
//
@ -14,3 +18,23 @@ import XCTest
// to our test target.
//
// See: https://github.com/CocoaPods/CocoaPods/issues/7170
/////
// Swift Test vs. Cocoapods issue #2
/////
//
// XCode's test runner doesn't copy swift framework's required by dependencies into
// the running test bundle.
// It sounds similar to this issue: https://github.com/CocoaPods/CocoaPods/issues/7985
//
// The error output looks like this:
// The bundle SignalServiceKit-Unit-Tests couldnt be loaded because it is damaged or missing necessary resources. Try reinstalling the bundle.
// [...]/SignalServiceKit-Unit-Tests.xctest/SignalServiceKit-Unit-Tests): Library not loaded: @rpath/libswiftAVFoundation.dylib
// Referenced from: /Users/[...]/Build/Products/Debug-iphonesimulator/SignalServiceKit/SignalServiceKit.framework/SignalServiceKit
// Reason: image not found)
// Program ended with exit code: 82
//
// A work around is to redundantly import any swift frameworks used by the dependencies of the test suite into this test file.
// The error message provides a hint, i.e. "Library not loaded: @rpath/libswiftAVFoundation.dylib" is fixed with `import AVFoundation`
import AVFoundation
import CloudKit

Loading…
Cancel
Save