Xcode 15 Beta - Could not instantiate class named _UIRecessedMaterialView because no class named _UIRecessedMaterialView was found

This is a very annoying error which is causing a crash in my app.

The error description is very vague and I'm guessing mostly related to oddities of Xcode 15 Beta.

Here is the full error stack:

*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UIRecessedMaterialView because no class named _UIRecessedMaterialView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007ff80048c88a __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007ff800057894 objc_exception_throw + 48
    2   CoreFoundation                      0x00007ff80048c768 -[NSException initWithCoder:] + 0
    3   UIFoundation                        0x00007ff804a1eb4d UINibDecoderDecodeObjectForValue + 352
    4   UIFoundation                        0x00007ff804a1eebe UINibDecoderDecodeObjectForValue + 1233
    5   UIFoundation                        0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257
    6   UIKitCore                           0x000000010e566a9f -[UIView initWithCoder:] + 1327
    7   UIKitCore                           0x000000010e4ed417 -[UIScrollView initWithCoder:] + 65
    8   UIKitCore                           0x000000010e34cbd5 -[UITextView initWithCoder:] + 65
    9   UIFoundation                        0x00007ff804a1ecb4 UINibDecoderDecodeObjectForValue + 711
    10  UIFoundation                        0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257
    11  UIKitCore                           0x000000010d97e7f0 -[UIRuntimeConnection initWithCoder:] + 160
    12  UIFoundation                        0x00007ff804a1ecb4 UINibDecoderDecodeObjectForValue + 711
    13  UIFoundation                        0x00007ff804a1eebe UINibDecoderDecodeObjectForValue + 1233
    14  UIFoundation                        0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257
    15  UIKitCore                           0x000000010d977a79 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 447
    16  UIKitCore                           0x000000010d97a77e -[UINib instantiateWithOwner:options:] + 1118
    17  UIKitCore                           0x000000010d532dab -[UIViewController loadView] + 643
    18  UIKitCore                           0x000000010d533128 -[UIViewController loadViewIfRequired] + 129
    19  UIKitCore                           0x000000010d533960 -[UIViewController view] + 27
....

Has anyone found the solution to this issue?

This is preventing us from fully validating our iPadOS 17 upgrade builds.

Thanks in advance.

I am getting the following error regarding UIRecessedMaterialView in my iPad app (iPadOS 17 and Xcode 15 beta 4) as well.

Thread 1: "Could not instantiate class named _UIRecessedMaterialView because no class named _UIRecessedMaterialView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)"

This error occurs frequently on screens that use segment controls, and my app stops crashing when I remove the segment controls from the screen. Also, if I archive and create an ipa file in Xcode14 even with segment controls and install it on an iPadOS17 device via AppleConfigurator, it no longer occurs.

The same crash happens for me if a xib with segmented control is loaded.

If I declare _UIRecessedMaterialView class in AppDelegate.m, the error disappears:

@interface _UIRecessedMaterialView: UIView

@end

@implementation _UIRecessedMaterialView

@end
Xcode 15 Beta - Could not instantiate class named _UIRecessedMaterialView because no class named _UIRecessedMaterialView was found
 
 
Q