Proper dependency injection when unit testing in iOS
===

I have finally started to test my code while developing iOS applications. However, I am curious to hear more about how others are creating testable code, especially when it comes to injection of fake objects into the class under test. So far this is how I do it:

// 1) Init CUT with fakes (constructor injection)
A *a = [[A alloc] initWithB:C:D:.....];

// 2) Expose dependencies as properties (property injection)
a.B = myB;

I prefer 1) since I don't like to expose any internal data as properties unless I really need to.

My questions is: Are there any alternatives/better/more efficient ways to do property injection when dealing with objective-c and iOS test frameworks?