yesterday, I downloaded the Sparrow mail app, which is crashing instant after startup.
Following crash log is generated:
Incident Identifier: [TODO]
CrashReporter Key: [TODO]
Hardware Model: iPhone4,1
Process: Sparrow [64701]
Path: /var/mobile/Applications/2D0B2A21-4BE0-4A1E-9119-B16FAA3A1572/Sparrow.app/Sparrow
Identifier: com.sparrowmailapp.iphoneapp
Version: 507.54
Code Type: ARM
Parent Process: launchd [1]
Date/Time: 2013-01-14 23:57:46 +0000
OS Version: iPhone OS 5.0.1 (9A406)
Report Version: 104
Exception Type: SIGABRT
Exception Codes: #0 at 0x305e132c
Crashed Thread: 0
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[UINavigationBar setShadowImage:]: unrecognized selector sent to instance 0x9b1e70'
The problem is the property "shadowImage" in UINavigationBar, which doesn't exist on iOS 5.
Now i´m trying to build a mobile substrate addon to avoid the crash, adding the missing property to UINavigationBar with overwrite and following code:
#import <Foundation/Foundation.h>
@interface UINavigationBar(MyNavigationBar)
@property(nonatomic,retain) UIImage *shadowImage NS_AVAILABLE_IOS(6_0) UI_APPEARANCE_SELECTOR;
@end
%hook UINavigationBar
- (void)setShadowImage:(UIImage *)shadowImage forToolbarPosition:(id)topOrBottom {
%log;
//%orig;
}
- (void)setShadowImage:(UIImage *)shadowImage {
%log;
//%orig;
}
%end;
I have no idea, to set the shadowImage or UI_APPEARANCE_SELECTOR correctly.
Any ideas? Thanks
Oh god, these methods should be normal setter/getter of the shadowImage.
Problem resolved.