Thomas Clayson
Thomas Clayson

Reputation: 29935

Testing changes in static library?

We have some static libraries and a main app. We do this so we can ship each bit separately if we need to.

I'm coming across a frustrating problem however. Everytime I make a change to the library and I want to test it/run it I have to compile it (+ lipo etc to make a Fat binary) then copy and paste into my other project (app) and then use the app to test it.

Is this the only way that I can test what I want to test? I know about unit tests, but we're using those for build server tests. All I want to do is test some new functionality I'm building in my static library.

How do you guys do it? Is it even possible or is the way I've described the best way?

Thanks

Upvotes: 0

Views: 105

Answers (1)

David Hoerl
David Hoerl

Reputation: 41642

Create a "test" app that uses the library, and include the library(s) project(s) in that. You will be able to change your library code, and then run the test app immediately.

I'm doing this exact thing now, as I'm developing a static library for my companies customers.

Or, even easier, just include the library projects in the apps. The only downside to this is that you won't have the EXACT same process as others you distribute to.

Upvotes: 1

Related Questions