Installed App from TestFlight crashes due to alleged UISearchDisplayController
Asked Answered
T

3

61

I implemented Dark Mode with the current beta version of Xcode in a relatively old app. I uploaded these to TestFlight for my testers. However, this crashes immediately for anyone who has the public beta of iOS 13.

I've integrated Crashlytics into the app, and the cause of these crashes is as follows:

UISearchDisplayController is no longer supported when using this version of iOS. Please migrate your application to UISearchController.

All UISearchDisplayController instances have already been replaced by the UISearchController. The app doesn't use the UISearchDisplayController anymore. There is no longer any links to the UISearchDisplayController. Nevertheless, these crashes continue to occur, but only from the installations of TestFlight.

If the app is installed directly with Xcode as a "Debug" or "Release" on an iPhone with the public beta, the crash does not occur.

Does anyone have a solution for this problem?

Turgor answered 6/9, 2019 at 9:19 Comment(5)
You need to check this : developer.apple.com/documentation/uikit/…Persuasive
search the libraries you are usingCatechist
@sulthan I did a search across all libraries and none of them use the UISearchDisplayController or its delegate.Turgor
Cant really do anything else, just makes sure you don't have any lingering UISearchDisplayControllerDelegate or it's instance remainingMinuscule
@Minuscule Did you search specifically for UISearchDisplayController, or only the delegate? Also try to run grep over your project folder. There could be a reference in xibs.Catechist
P
90

After receiving the same error and finding no references to UISearchDisplayController across our app, we realized we needed to search for and replace searchDisplayController from within one of our storyboards. That corrected the issue after resubmitting a beta to TestFlight.

Phelan answered 6/9, 2019 at 19:52 Comment(9)
Thanks a lot, searching for searchDisplayController directly in the sourcecode of the storyboard was the solution.Turgor
With what did you replace <searchDisplayController> ? Replacing it with <searchController> gives an error.Forcefeed
@Forcefeed UISearchDisplayController is deprecated. So you have to replace everything related to it in code and storyboard. You could use UISearchController instead.Phaeton
@Forcefeed Did you find out what to replace searchDisplayController with?Prototype
I couldn’t find an alternative and just commented them out. I didn’t encounter an error yet, so it should be ok I guess.Forcefeed
For me, removing all instances of searchDisplayController tag and removing them worked.Foetus
A good migration guide to switch from UISearchDisplayController to UISearchController is written by Keith Harrison: useyourloaf.com/blog/updating-to-the-ios-8-search-controllerPenetrating
We just got rejected during App Store review by this issue. The problem was that in two places the searchDisplayController outlet was still connected in IB, even though the relevant view controllers had long since been modified. We didn't catch this in testing because apparently it doesn't crash when run in the simulator.Nils
Btw, an easy way to search for it is opening Terminal in your project home folder and run: grep -r searchDisplayController *Vaporizer
R
40

It was working on simulator but all beta tester claimed it crashed. The problem was in story board. Search for these in your views. enter image description here enter image description here

Rustie answered 23/9, 2019 at 23:44 Comment(1)
You can delete these from IB and any IBOutlet to these. I will be easier to add search in code rather than IBRustie
P
2

*** Terminating app due to uncaught exception 'NSGenericException', reason: 'UISearchDisplayController is no longer supported when linking against this version of iOS. Please migrate your application to UISearchController.'

Successfully Runs locally, but crashed on testFlight app.

Fix:

I found UISearchDisplayController which stuck in one of the storyboard and wasn't used anymore. Search for the searchDisplayController directly into sourcecode of the storyboard and just removed it.

Pernik answered 14/7, 2021 at 18:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.