How does one unit test a framework linked to the CoreLocation Framework?

When unit testing a framework linked to CoreLocation, Xcode reports an error:


Test target <Target> encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart
will be attempted)


The `import CoreLocation` directive is sufficient to reproduce the error.


import Foundation
import CoreLocation

public class Foo {
     public let name: String = "bar"
     public init() {}
}


In the test code:

func testFoo() {
     let foo = Foo()
     XCTAssertEqual("bar", foo.name)
}

Can confirm this is still an issue in Xcode 7 beta 3. Does anyone have a workaround?

I was having the same problem and, oddly enough, importing CoreLocation into one of my test files resolved the issue.


I attempted to isolate and reproduce the issue by removing the `import CoreLocation` statement, but, once it started working correctly, I haven't seen the error again.


Hope that helps.


*Edited to fix formatting

I too am having the same problem. I'm on XCode Version 7.0 beta 6 (7A192o).


I had a similar problem on another project but was able to import the test dependencies similar to forgot's comment. But this other project has me stumped. The error message is so sparse that I can't track down the next step.


Just wanted to confirm that as of beta 6 the unclear error messages isn't helping track down the problem.


I also wanted to confirm that this is not a CoreLocation problem specifically. My project isn't using these libraries.

I managed to fix it by adding a file and just including imports


import CoreLocation

How does one unit test a framework linked to the CoreLocation Framework?
 
 
Q