iOS 17 Update Causes App to Crash on Some Devices

When a user updates their device to iOS 17 (any version) on a device with MDM, our app crashes but only on some device, not all. The same app runs fine on iOS 16. We cannot recreate the issue in-house and even our customers cannot reliably recreate the crash as it only happens on some devices and not others.

The crash we get is: SIGABRT: UICollectionView internal inconsistency: missing final attributes for cell

Once the device gets this crash, the only way to fix it is to delete and reinstall the app and then everything works fine.

Anyone having a similar issue with iOS 17 and MDM?

Hi, Adding a crash report might help, but in addition to that, it would be helpful have some idea of what operations were being performed on the collection view before the crash. Could you try enabling some debug logging available in UICollectionView, and then asking your users to trigger a sysdiagnose immediately after they run into the crash.

The logs can be enabled by setting some defaults like so:

int main(int argc, char * argv[]) {
    NSString *className = nil;
    NSString *delegateClassName = nil;
    @autoreleasepool {
        NSUserDefaults *uikitDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"com.apple.UIKit"];
        [uikitDefaults registerDefaults:@{@"LogUICollectionView": @YES, @"LogUICollectionLayout": @YES}];
        delegateClassName = NSStringFromClass([<YOUR_APP_DELEGATE_CLASS>  class]);
        className = NSStringFromClass([UIApplication class]);
    }
    return UIApplicationMain(argc, argv, className, delegateClassName);
}

Please see https://forums.developer.apple.com/forums/thread/739560 for more information about sysdiagnoses.

Thank you for the reply, we will work on getting a sysdiagnose from one of our customers.

Regarding the last operations being performed, the crash is pointing to code that returns the height of the collectionview, specifically, it is calling layoutIfNeeded() We also tried to remove that call but it did not prevent the crashes.

Here is the crash report:

Thanks for your help!

iOS 17 Update Causes App to Crash on Some Devices
 
 
Q