I’ve an app that hundreds a xib with a segmented management. If I construct it with Xcode 15 beta 3 and launch on a iPad with iPadOS 17 (or on iOS 17 simulator), it crashes with an error:
Terminating app because of uncaught exception ‘NSInvalidUnarchiveOperationException’, cause: ‘Couldn’t instantiate class named _UIRecessedMaterialView as a result of no class named _UIRecessedMaterialView was discovered; the category must be outlined in supply code or linked in from a library (guarantee the category is a part of the right goal)’
First throw name 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 0x0000000108c04a9f -[UIView initWithCoder:] + 1327
7 UIKitCore 0x0000000107c32c81 -[UIControl initWithCoder:] + 65
8 UIKitCore 0x0000000107c5a7b3 -[UISegmentedControl initWithCoder:] + 65
9 UIFoundation 0x00007ff804a1ecb4 UINibDecoderDecodeObjectForValue + 711
10 UIFoundation 0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257
11 UIKitCore 0x000000010801c7cd -[UIRuntimeConnection initWithCoder:] + 125
12 UIKitCore 0x000000010801cbef -[UIRuntimeEventConnection initWithCoder:] + 59
13 UIFoundation 0x00007ff804a1ecb4 UINibDecoderDecodeObjectForValue + 711
14 UIFoundation 0x00007ff804a1eebe UINibDecoderDecodeObjectForValue + 1233
15 UIFoundation 0x00007ff804a1e9e2 -[UINibDecoder decodeObjectForKey:] + 257
16 UIKitCore 0x0000000108015a79 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 447
17 UIKitCore 0x000000010801877e -[UINib instantiateWithOwner:options:] + 1118
18 UIKitCore 0x000000010801a112 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 139
19 CustomSearchBarBug 0x000000010671830e $s18CustomSearchBarBug11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0m6LaunchL3KeyaypGSgtF + 462
20 CustomSearchBarBug 0x0000000106718687 $s18CustomSearchBarBug11AppDelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0m6LaunchL3KeyaypGSgtFTo + 183
21 UIKitCore 0x000000010857a092 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 297
22 UIKitCore 0x000000010857be6b -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 4253
23 UIKitCore 0x000000010858196b -[UIApplication _runWithMainScene:transitionContext:completion:] + 1241
24 UIKitCore 0x00000001078e6780 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 181
25 UIKitCore 0x000000010857e1dc -[UIApplication _compellApplicationLaunchToCompleteUnconditionally] + 59
26 UIKitCore 0x000000010857e591 -[UIApplication _run] + 936
27 UIKitCore 0x000000010858301a UIApplicationMain + 123
28 UIKitCore 0x000000010764e103 __swift_destroy_boxed_opaque_existential_1Tm + 10851
29 CustomSearchBarBug 0x0000000106718b1b $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 123
30 CustomSearchBarBug 0x0000000106718a97 $s18CustomSearchBarBug11AppDelegateC5$mainyyFZ + 39
31 CustomSearchBarBug 0x0000000106718b88 major + 24
32 dyld 0x00000001068a23ee start_sim + 10
33 ??? 0x000000010dfd041f 0x0 + 4529652767
)
libc++abi: terminating because of uncaught exception of kind NSException
The only xib to breed the crash is:
<?xml model="1.0" encoding="UTF-8"?>
<doc kind="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" model="3.0" toolsVersion="22138.1" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<machine id="ipad7_9" orientation="portrait" structure="fullscreen" look="gentle"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" model="22113"/>
<functionality title="paperwork saved within the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Proprietor"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clipsSubviews="YES" contentMode="scaleToFill" id="63">
<rect key="body" x="0.0" y="0.0" width="744" peak="1133"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
<subviews>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="prime" segmentControlStyle="bar" selectedSegmentIndex="0" id="10">
<rect key="body" x="218.5" y="5.5" width="331" peak="33"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<segments>
<section title="Merchandise"/>
<section title="Model"/>
</segments>
<connections>
<motion selector="segmentedControlChanged:" vacation spot="-1" eventType="valueChanged" id="25"/>
</connections>
</segmentedControl>
</subviews>
<nil key="simulatedStatusBarMetrics"/>
<level key="canvasLocation" x="467.96875" y="146.484375"/>
</view>
</objects>
</doc>
The xib is loaded like this:
let nibs = Bundle.major.loadNibNamed("SegmentedControl", proprietor: nil, choices: nil)
No crash happens on iOS 16.3.1.
Is there any repair?