iOS app crashed with error UISearchDisplayControllerNoLongerSupported

375 views Asked by At

I have uploaded an iOS app on the app store. The development build is working perfectly fine and there was no error while debugging the same app in Xcode. But when the app is live on the app store and the user installs the app from AppStore then the app crashes on tap on the search button.

Below is a screenshot of the crash log:

Launch Time:         2020-04-25 21:51:43.9128 +0530
OS Version:          iPhone OS 13.3.1 (17D50)
Release Type:        User
Baseband Version:    1.04.06
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0

Last Exception Backtrace:
0   CoreFoundation                  0x1aa46896c __exceptionPreprocess + 224
1   libobjc.A.dylib                 0x1aa181028 objc_exception_throw + 59
2   CoreFoundation                  0x1aa35814c +[NSException raise:format:] + 111
3   UIKitCore                       0x1aded63f4 UISearchDisplayControllerNoLongerSupported + 215
4   UIKitCore                       0x1aded66dc -[UISearchDisplayController initWithCoder:] + 87
5   UIFoundation                    0x1adab024c UINibDecoderDecodeObjectForValue + 731
6   UIFoundation                    0x1adab0480 UINibDecoderDecodeObjectForValue + 1295
7   UIFoundation                    0x1ada4b00c -[UINibDecoder decodeObjectForKey:] + 319
8   UIKitCore                       0x1adf1f73c -[UIViewController initWithCoder:] + 1039
9   Rmag.eu                         0x102a1b420 0x102954000 + 816160
10  Rmag.eu                         0x102a14eb0 0x102954000 + 790192
11  Rmag.eu                         0x1029d8908 0x102954000 + 542984
12  Rmag.eu                         0x1029d8638 0x102954000 + 542264
13  UIKitCore                       0x1ae1f1818 -[UIClassSwapper initWithCoder:] + 2363
14  UIFoundation                    0x1adab024c UINibDecoderDecodeObjectForValue + 731
15  UIFoundation                    0x1ada4b00c -[UINibDecoder decodeObjectForKey:] + 319
16  UIKitCore                       0x1ae1f59c4 -[UIRuntimeConnection initWithCoder:] + 131
17  UIFoundation                    0x1adab024c UINibDecoderDecodeObjectForValue + 731
18  UIFoundation                    0x1adab0480 UINibDecoderDecodeObjectForValue + 1295
19  UIFoundation                    0x1ada4b00c -[UINibDecoder decodeObjectForKey:] + 319
20  UIKitCore                       0x1ae1f08f0 -[NSCoder+ 7121136 (UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 491
21  UIKitCore                       0x1ae1f3528 -[UINib instantiateWithOwner:options:] + 1115
22  UIKitCore                       0x1ae6c5cb0 -[UIStoryboard __reallyInstantiateViewControllerWithIdentifier:creator:storyboardSegueTemplate:sender:] + 291
23  Rmag.eu                         0x102a1a320 0x102954000 + 811808
24  Rmag.eu                         0x102a13d2c 0x102954000 + 785708
25  libobjc.A.dylib                 0x1aa17ccc8 -[NSObject performSelector:withObject:withObject:] + 75
26  UIKitCore                       0x1ae56a918 -[UIApplication sendAction:to:from:forEvent:] + 99
27  UIKitCore                       0x1adf79380 -[UIControl sendAction:to:forEvent:] + 207
28  UIKitCore                       0x1adf796f4 -[UIControl _sendActionsForEvents:withEvent:] + 411
29  UIKitCore                       0x1adf78704 -[UIControl touchesEnded:withEvent:] + 523
30  UIKitCore                       0x1ae5a578c -[UIWindow _sendTouchesForEvent:] + 2083
31  UIKitCore                       0x1ae5a6a7c -[UIWindow sendEvent:] + 3335
32  UIKitCore                       0x1ae582600 -[UIApplication sendEvent:] + 347
33  UIKitCore                       0x1ae5fca58 __dispatchPreprocessedEventFromEventQueue + 5711
34  UIKitCore                       0x1ae5ff010 __handleEventQueueInternal + 4927
35  UIKitCore                       0x1ae5f8194 __handleHIDEventFetcherDrain + 111
36  CoreFoundation                  0x1aa3e4108 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 27
37  CoreFoundation                  0x1aa3e405c __CFRunLoopDoSource0 + 83
38  CoreFoundation                  0x1aa3e37c8 __CFRunLoopDoSources0 + 183
39  CoreFoundation                  0x1aa3de694 __CFRunLoopRun + 1067
40  CoreFoundation                  0x1aa3ddf40 CFRunLoopRunSpecific + 479
41  GraphicsServices                0x1b466e534 GSEventRunModal + 107
42  UIKitCore                       0x1ae569580 UIApplicationMain + 1939
43  Rmag.eu                         0x102972a9c 0x102954000 + 125596
44  libdyld.dylib                   0x1aa25ce18 start + 3


Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib          0x00000001aa252efc __pthread_kill + 8
1   libsystem_pthread.dylib         0x00000001aa1728b8 pthread_kill + 228
2   libsystem_c.dylib               0x00000001aa102af4 __abort + 116
3   libsystem_c.dylib               0x00000001aa102a80 __abort + 0
4   libc++abi.dylib                 0x00000001aa21a3c8 __cxa_bad_cast + 0
5   libc++abi.dylib                 0x00000001aa21a5c0 demangling_unexpected_handler+ 5568 () + 0
6   libobjc.A.dylib                 0x00000001aa181308 _objc_terminate+ 25352 () + 124
7   Rmag.eu                         0x0000000102e95040 0x102954000 + 5509184
8   libc++abi.dylib                 0x00000001aa227634 std::__terminate(void (*)+ 58932 ()) + 20
9   libc++abi.dylib                 0x00000001aa2271ec __cxa_rethrow + 148
10  libobjc.A.dylib                 0x00000001aa1811ec objc_exception_rethrow + 44
11  CoreFoundation                  0x00000001aa3ddfb0 CFRunLoopRunSpecific + 592
12  GraphicsServices                0x00000001b466e534 GSEventRunModal + 108
13  UIKitCore                       0x00000001ae569580 UIApplicationMain + 1940
14  Rmag.eu                         0x0000000102972a9c 0x102954000 + 125596
15  libdyld.dylib                   0x00000001aa25ce18 start + 4

According to me the app crashed because of error "UISearchDisplayControllerNoLongerSupported". But I am not using "UISearchDisplayController" anywhere in my app.

Below is a screenshot of the code

class SearchBarViewController: BaseViewController, UISearchBarDelegate{

    var customTabBarView: CustomTabBar?

    @IBOutlet weak var searchBar: UISearchBar!
    var navController: UINavigationController?

Please help me to resolve the issue or how can I find the error in the code of the app.

1

There are 1 answers

0
Akash Sharma On

Creating a new SearchBarViewController resolved the issue. We have to remove the older SearchVar UIViewController from code.