Honestly, I see this as a moot point. Your second initialization method does not make sense when receiving the nil argument (plus you have a logical problem in your conditional check if the input is zero). In this case, I would like to provide one initialization method and two factory class methods that operate in the usual way: Return the auto-implemented instances and in one of them specify your default value.
For example, declare a class method:
+ (awesome*)awesome; + (awesome*)awesomeWithAppId:(id)foo;
and in your implementation for +awesome , for example, write it like this:
+ (awesome*)awesome { return [[[awesome alloc] initWithAppId:@"a369x123"] autorelease]; }
And similarly, in your awesomeWithAppId: something like this:
+ (awesome*)awesomeWithAppId:(id)foo { return [[[awesome alloc] initWithAppId:foo] autorelease]; }
And again, it can only be me.
jer
source share