Unit testing an iPhone static library with XCode 3

Unit testing an iPhone static library with XCode 3

I am writing a number of static libraries for the iPhone and wish also to have suites of unit tests. XCode 3 provides templates for both static libraries and unit tests but I am wondering how they should fit together in a static library project?

In my static library project I have created a target for unit testing but expect to also create an executable to kick off the unit tests than run against the classes in the static library.

What is the procedure for doing this?

Disable iphone home button in app, is it possible?


refreshing mkannotation properties and refreshing the annotation
Note that some classes of tests (like anything that would rely on the system calls such as [UIApplication sharedApplication] working require a separate target, while pure logic tests do not..
swipe to delete when already in edit mode
Create a new project with Unit Test and see what is added - basically you can do the same thing easily, create a new target and select "Unit Test Bundle" as the target type..
Embedding WebView in UIView

Problem sending Apple Push Notification using Java and REST

Given a view, how do I get its viewController?


asp.net controls for iPhone development
you have to add all your .m related files in the unit test target.

Generating Random Numbers in Objective C for iPhone SDK
(Just drag and drop!).


In case people still have problems with using static libraries:. I've created an article that explains how to create static libraries and how to use them within projects:. Xcode: The complete explanation on how to use static libraries: http://www.sodeso.nl/?p=822. And for the unit testing part of static libraries, i don't have an explanation on how to set it up but i do have created a static library template that uses Google Toolkit for Map unit testing framework which you can download and add to your Xcode installation:. Xcode: Static library template with Google Toolkit for Mac Testing framework: http://www.sodeso.nl/?p=982.

98 out of 100 based on 88 user ratings 638 reviews