App works fine on iPhone/ iPod but crashes on iPad (even simulator)
#5 0x0298261c in _objc_terminate
#6 0x9532515a in __cxxabiv1::__terminate
#7 0x9532519a in std::terminate
#8 0x95325298 in __cxa_throw
#9 0x029823d8 in objc_exception_throw
#10 0x028677e1 in -[NSException raise]
#11 0x0005e0e0 in _NSSetUsingKeyValueSetter
#12 0x0005df1e in -[NSObject(NSKeyValueCoding) setValue:forKey:]
#13 0x0031e1e1 in -[UIView(CALayerDelegate) setValue:forKey:]
#14 0x004fc09f in -[UIRuntimeOutletConnection connect]
#15 0x027eac75 in -[NSArray makeObjectsPerformSelector:]
#16 0x004faae4 in -[UINib instantiateWithOptions:owner:loadingResourcesFromBundle:]
#17 0x004fcad9 in -[NSBundle(NSBundleAdditions) loadNibNamed:owner:options:]
#18 0x002f3272 in -[UIApplication _loadMainNibFile]
#19 0x002f4754 in -[UIApplication _runWithURL:payload:launchOrientation:]
#20 0x002fad3e in -[UIApplication handleEvent:withNewEvent:]
#21 0x002f64f7 in -[UIApplication sendEvent:]
#22 0x002fe1d8 in _UIApplicationHandleEvent
#23 0x030fb17c in PurpleEventCallback
#24 0x027b789c in CFRunLoopRunSpecific
#25 0x027b68a8 in CFRunLoopRunInMode
#26 0x002f4221 in -[UIApplication _run]
#27 0x002fc372 in UIApplicationMain
In the App, the Main Window is a Navigation controller and it works fine on iPod/iPhone. Its even live on the iTu开发者_如何学编程nes store. But when i launch the app as an iPad simulator, it crashes with SIGABRT even before it can launch the view.
It seems like a problem with my xib files and I verified the parameters but could not find the cause.
SDK: 4.1 iPad Simulator: 3.2
Loading an iOS 4 specific item from a Nib, an iAd banner for example, would give this type of error.
You can upgrade to the latest version of Xcode with the iPad simulator running iOS 4.2. Then your final application would have to require iOS 4 or later.
Alternatively, you can make an iOS 3.2 compatible Nib, and load that version when running on less than iOS 4. You'll have to write some code to check at runtime and then choose the appropriate Nib.
精彩评论