Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running XCTests written for framework on device

Tags:

ios

ios7

xctest

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!

like image 985
Amit Avatar asked Oct 18 '22 14:10

Amit


1 Answers

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

like image 180
Jon Reid Avatar answered Nov 15 '22 04:11

Jon Reid