Amit
Amit

Reputation: 1043

Running XCTests written for framework on device

I want to run XCTests on a device which is written for framework project. XCTests allows you to run on a device for an application, but if I also try it for a framework,it shows an error:

Logic Testing on iOS devices is not supported. You can run logic tests on the Simulator.

I saw other posts mentioning the same but they were related to application projects. With latest XCTests you can easily run your unit test cases written for a application on a device, but it's not allowed in a framework/library project.

Is there any way to make it run on a device? I am using some frameworks within project which are not available for simulator. Thanks!

Upvotes: 5

Views: 2039

Answers (1)

Jon Reid
Jon Reid

Reputation: 20980

Create a simple app that does nothing but link in your framework. Use it as your test host.

Upvotes: 3

Related Questions