Debug a framework while developing

403 views Asked by At

I am creating a statistical calculator app. It has various functions. I am creating the functions in a cocoapod framework. How can we test or debug a library framework while we develop it? That means every time without copying it to the demo/test project.

1

There are 1 answers

0
kelin On

In your framework project, in Xcode add a target for testing. Press File > New > Target... > iOS Unit Testing Bundle.

iOS Unit Testing Bundle

This will create a test target for you. You can run this target at any time. Also, a swift file with a subclass of XCTestCase. This class has all functions necessary for testing, such as setUp(), testExample() or testPerformanceExample(). You can read how to use this in the XCTest framework reference.