Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
AppList crashes on iOS 13 (in ctor, not inside settings) when finding icons
Post Flair (click to view more posts with a particular flair)
Post Body

I have the latest AppList version, 1.5.15, which is the one that supports iOS 13. This is the call I make to get the icon:

[[ALApplicationList sharedApplicationList] iconOfSize:ALApplicationIconSizeSmall forDisplayIdentifier:identifier];

I call it in 2 locations, on device launch and inside a preference controller.

iOS 12 iOS 13
Device launch works fails
Preferences works works

So it fails on iOS 13 when the device launches. Here is my launch.

I wait for a notification like this:

%ctor {
    //
    // I Both of these works on iOS 12
    //
    // CFNotificationCenterAddObserver(
    //     CFNotificationCenterGetDarwinNotifyCenter(), 
    //     NULL, 
    //     &initializeTweak, 
    //     CFSTR("SBSpringBoardDidLaunchNotification"), 
    //     NULL, 
    //     CFNotificationSuspensionBehaviorDeliverImmediately);

    CFNotificationCenterAddObserver(
        CFNotificationCenterGetLocalCenter(), 
        NULL, 
        (CFNotificationCallback)initializeTweak, 
        (CFStringRef)UIApplicationDidFinishLaunchingNotification, 
        NULL, 
        CFNotificationSuspensionBehaviorCoalesce
    );

And this is the `initializeTweak` method

static inline void initializeTweak(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef userInfo) {
    UIImage *i = [[ALApplicationList sharedApplicationList] iconOfSize:ALApplicationIconSizeSmall forDisplayIdentifier:@"com.apple.mobiletimer"];
}

And finally, here is the crash:

SpringBoard 21:02:28.368624  0700   -[SBClockApplicationIcon smallIcon]: unrecognized selector sent to instance 0x28397baa0
SpringBoard 21:02:28.817292  0700   *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SBClockApplicationIcon smallIcon]: unrecognized selector sent to instance 0x28397baa0'
*** First throw call stack:
(0x18932d80c 0x189055fa4 0x18923136c 0x189331c88 0x189333a6c 0x104a49b90 0x104a47f80 0x1067e5100 0x18928904c 0x189289094 0x1892883f4 0x1892880ac 0x18920436c 0x1892879fc 0x1895e4168 0x18d38e610 0x18d39452c 0x18cb62c7c 0x18d39063c 0x18d390994 0x18d396740 0x1bfa5fdf4 0x189130360)

Since that class was kinda specific to the clock, here's another one with a random app:

SpringBoard 21:05:04.134453  0700   -[SBApplicationIcon smallIcon]: unrecognized selector sent to instance 0x2819ddc70
SpringBoard 21:05:04.823954  0700   *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SBApplicationIcon smallIcon]: unrecognized selector sent to instance 0x2819ddc70'
*** First throw call stack:
(0x18932d80c 0x189055fa4 0x18923136c 0x189331c88 0x189333a6c 0x1033cdb90 0x1033cbf80 0x105175100 0x18928904c 0x189289094 0x1892883f4 0x1892880ac 0x18920436c 0x1892879fc 0x1895e4168 0x18d38e610 0x18d39452c 0x18cb62c7c 0x18d39063c 0x18d390994 0x18d396740 0x1bfa5fdf4 0x189130360)

So since the code actually works on iOS 13, I am guessing I would need to do this somewhere else? I would like to do it as soon as possible though.

Ideas?

Author
Account Strength
100%
Account Age
13 years
Verified Email
Yes
Verified Flair
No
Total Karma
74,701
Link Karma
8,619
Comment Karma
65,516
Profile updated: 4 days ago
Posts updated: 8 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago