Posts

Post not yet marked as solved
0 Replies
4.8k Views
UISearchDisplayController was deprecated starting with iOS 8, and clients of this API should use UISearchController for managing the presentation and display of search results on all recent iOS versions. Starting with iOS 13 and iPad OS 13, UISearchDisplayController is unavailable to apps built with Xcode 11.If your app continues to use UISearchDisplayController even though it is no longer available, the system throws an exception. Some example backtraces from the crashes resulting from this exception:0 CoreFoundation 0x19938980c __exceptionPreprocess + 220 1 libobjc.A.dylib 0x1990b1fa4 objc_exception_throw + 55 2 CoreFoundation 0x19927ef84 +[NSException raise:format:] + 107 3 UIKitCore 0x19cd8cb80 UISearchDisplayControllerNoLongerSupported + 247 4 UIKitCore 0x19cd8ce84 -[UISearchDisplayController initWithCoder:] + 83 5 UIFoundation 0x19c97c44c UINibDecoderDecodeObjectForValue + 7270 CoreFoundation 0x00007fff23c4f02e __exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff50b97b20 objc_exception_throw + 48 2 CoreFoundation 0x00007fff23c4ee6c +[NSException raise:format:] + 188 3 UIKitCore 0x00007fff4717e2d2 -[UISearchDisplayController initWithCoder:] + 82 4 UIFoundation 0x00007fff46cfc886 UINibDecoderDecodeObjectForValue + 744The message associated with this exception is:UISearchDisplayController is no longer supported when linking against this version of iOS. Please migrate your application to UISearchController.If you receive one of these crashes but can't reproduce it locally, ensure that you are testing the deployed version of your app on iOS 13, either by using TestFlight, or by applying app thinning to your Xcode archive and testing the thinned variant of your app targeted at iOS 13 devices. By testing with the thinned variant, you will be able to reproduce this crash.To apply app thinning to your local Xcode archive, export the app from the Xcode Archive using either the Ad-Hoc or Development options, and select "All compatible device variants" for the App Thinning option. After the thinned versions are created, you can identify the specific variant targeted at iOS 13 by reading the App Thinning Size Report file that is part of the output, and then install and test that thinned .ipa file.To identify where your app references UISearchDisplayController, read further down the backtrace in the crash report to identify the code in your app that creates a UISearchDisplayController. If you see references to UINib and UIStoryboard as part of the backtrace, you should also look in the Storyboard and XIB files related to the code in the backtrace for any remaining references there.
Posted
by edford.
Last updated
.