ios - Strange Crash on iPhone 3G/iPod 2G -


i banging head on strange issue. users of app reported app not start, crashes after showing startup screen 2 sec. occurs on older ipod 2g/iphone 3g. after getting hands on device occurs tried track down.

the crash not occur debug code, release build. not of code executed @ until crash occurs. uiviewcontrollers initialized in appdelegate, , whatever sequence choose here, first of them fails after running through initwithnibname, same controllers , handles loading of correct xib universal app:

- (id)initwithnibname:(nsstring *)nibnameornil bundle:(nsbundle *)nibbundleornil {   if (ui_user_interface_idiom() == uiuserinterfaceidiompad) {     nsstring *ipadxib = [nsstring stringwithformat:@"%@-ipad", [[self class] description]];     return [super initwithnibname:ipadxib bundle:nibbundleornil];   } else {     return [super initwithnibname:nibnameornil bundle:nibbundleornil];   } } 

this code runs through well, when returning here, end sigbus error somewhere in uikit (not code). suspect above coding, because when don't override initwithnibname (which ok iphone version), complete code runs through. if call [super ...] here works, suspect compiler optimize away then, having same effect not overriding @ all. since interfaceidiom not ipad, identical super-function used w/o changed parameters, should no-brainer. works on other devices else. no analyzer errors, no leaks whatsover. happens nothing of code except above called @ when crash occurs. , happens whatever controller put first in sequence of 4 controllers.

any ideas? stuck...

just wondering ios running? uiuserinterfaceidiompad available in ios 3.2 , later.

if that's case should check thread how 1 ui_user_interface_idiom() work iphone os sdk < 3.2


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -