I am adding the paid-functionality in my lite-version of the app....and need some help.
I had incorporated iAds in the lite version - so the NIB file for the root VC has the banner view and such that go along w/ iAds. For the paid version, I have conditionally compiled out the iAd code with #ifdefs. Both versions of the app compile fine; but only the lite version runs in the Simulator.
When I run the paid version, i get crash w/ the following stack trace.
Code:
2011-05-26 08:33:44.453 GoalBuggerFull[78022:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<SPAppViewController 0x63393c0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key ivPatAppText.'
*** Call stack at first throw:
(
0 CoreFoundation 0x00e8fbe9 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x00fe45c2 objc_exception_throw + 47
2 CoreFoundation 0x00e8fb21 -[NSException raise] + 17
3 Foundation 0x0004d6cf _NSSetUsingKeyValueSetter + 135
4 Foundation 0x0004d63d -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
5 UIKit 0x004cc8d6 -[UIRuntimeOutletConnection connect] + 112
6 CoreFoundation 0x00e062cf -[NSArray makeObjectsPerformSelector:] + 239
7 UIKit 0x004cb2ed -[UINib instantiateWithOwner:options:] + 1041
8 UIKit 0x004cd081 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
9 UIKit 0x00385a94 -[UIViewController _loadViewFromNibNamed:bundle:] + 70
10 UIKit 0x00383709 -[UIViewController loadView] + 120
11 UIKit 0x003835e3 -[UIViewController view] + 56
12 GoalBuggerFull 0x00002a52 -[SPAppAppDelegate application:didFinishLaunchingWithOptions:] + 572
13 UIKit 0x002d61fa -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1163
14 UIKit 0x002d855e -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 439
15 UIKit 0x002e2db2 -[UIApplication handleEvent:withNewEvent:] + 1533
16 UIKit 0x002db202 -[UIApplication sendEvent:] + 71
17 UIKit 0x002e0732 _UIApplicationHandleEvent + 7576
18 GraphicsServices 0x01732a36 PurpleEventCallback + 1550
19 CoreFoundation 0x00e71064 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
20 CoreFoundation 0x00dd16f7 __CFRunLoopDoSource1 + 215
21 CoreFoundation 0x00dce983 __CFRunLoopRun + 979
22 CoreFoundation 0x00dce240 CFRunLoopRunSpecific + 208
23 CoreFoundation 0x00dce161 CFRunLoopRunInMode + 97
24 UIKit 0x002d7fa8 -[UIApplication _run] + 636
25 UIKit 0x002e442e UIApplicationMain + 1160
26 GoalBuggerFull 0x0000ad96 main + 102
27 GoalBuggerFull 0x0000280d start + 53
28 ??? 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
I think it is because of the fact that the NIB file still refers to the outlets for the iAd (because I don't have two versions of the NIB file).....
Now comes my question:
Is there a way to specify an alternate NIB file for the root view controller? If not, how can I get around the problem?
BTW, for the other NIB files, I am planning to have alternate versions - and since the code refer to them explicitly, I can put them in #ifdefs. I just don't know how to deal w/ the root VC's NIB file.
__________________
Regards,
=S=
******************
Currently in AppStore:
******************
iNotate - Annotate pictures, re-edit the text, upload them to FB or email them
MultiSnaps - Shoot pictures and send multiple pictures from the app to custom distribution list
TimeSnaps - Schedule a shoot, shoot pictures and send multiple pictures from the app to custom distribution list
GoalBugger -
Free app to set and track goals that you want to achieve
******************