Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

On iOS 13 beta 8 app crashes when installed from testflight (UISearchDisplayController) #15559

Closed
@OlKir

Description

@OlKir

App crashes due to usage of UISearchDisplayController which is fully deprecated on iOS 13. I searched through my project using
grep -r -i 'UISearchDisplayController' *
and found only one entry which points to mapbox:
Binary file Pods/Mapbox-iOS-SDK/dynamic/Mapbox.framework.dSYM/Contents/Resources/DWARF/Mapbox matches
I've not found any mentioning of UISearchDisplayController in open codes of SDK so I can't fix it myself.

Steps to reproduce

  1. Include Mapbox-iOS-SDK to the project
  2. Create testflight version using Xcode 11 beta 7
  3. Try to install the app from testflight on iOS 13 beta 8 or iOS 13.1 beta

Expected behavior

App works

Actual behavior

App crashes with output to console:
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.'

Configuration

Mapbox SDK versions: 5.2.0
iOS/macOS versions: iOS 13 beta 8
Device/simulator models: iPhones XS 64Gb
Xcode version: Xcode 11 beta 7

Activity

self-assigned this
on Sep 4, 2019
1ec5

1ec5 commented on Sep 4, 2019

@1ec5
Contributor

What version of CocoaPods are you using?

friedbunny

friedbunny commented on Sep 4, 2019

@friedbunny
Contributor

While it is true that our dSYM includes mentions of UISearchDisplayController, it’s because we link against UIKit and the iOS 12.4 SDK. Using dwarfdump, you can find generic entries like this one:

0x0003e5df:       DW_TAG_structure_type
                    DW_AT_name	("UISearchDisplayController")
                    DW_AT_byte_size	(0x04)
                    DW_AT_decl_file	("/Applications/Xcode-10.3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.4.sdk/System/Library/Frameworks/UIKit.framework/Headers/UISearchDisplayController.h")
                    DW_AT_decl_line	(22)
                    DW_AT_APPLE_runtime_class	(DW_LANG_ObjC))

... but these symbols aren't included our actual binary — nm Mapbox.framework/Mapbox | grep -i UISearchDisplayController returns no results — and we don’t implement that functionality anywhere in the Maps SDK (or its constituent parts). The dSYM is not functional code — it’s debugging metadata that’s been stripped from the framework binary.

Reproduction attempts

  • We ship a variety of apps to TestFlight and App Store and haven’t seen this issue to date.
  • I wasn’t able to provoke this by setting the minimum deployment target to iOS 13 and running locally.

Questions

OlKir

OlKir commented on Sep 5, 2019

@OlKir
Author

Thank you very much for you explanation, and I'm sorry that I took your time. It was not mapbox issue.
During further investigation I found UISearchDisplayController which stuck in one of the storyboards and wasn't used anymore. In XML structure of storyboard it was called searchDisplayController - it's why my search didn't find it.

andoma93

andoma93 commented on Sep 19, 2019

@andoma93

@OlKir Thanks, it was called searchDisplayController for me too.

jbarros35

jbarros35 commented on Sep 23, 2019

@jbarros35

how did you make it? I have the same issue.

andoma93

andoma93 commented on Sep 24, 2019

@andoma93

@jbarros35 search for "searchDisplayController" string usages in your project.

newacct

newacct commented on Sep 25, 2019

@newacct

Using UISearchDisplayController in Interface Builder / storyboard won't crash if you set your deployment target lower than iOS 13.

steveeri

steveeri commented on Sep 27, 2019

@steveeri

Thanks for posting this issue. I got the same. App crashes when loading a build from Test Flight, but rans without errors if installing/debugging same code from Xcode. Odd. So for me my pre-flight publishing tests looked OK... but failed once I pulled down from Test Flight.

In your case the searchDisplayController wasn't used anymore - so the fix I guess was just to remove references to it. Any suggestions on how to go about updating if you do need the search functionality?

biznitz95

biznitz95 commented on Oct 10, 2019

@biznitz95

@steveeri I believe you just need to rename it and modify some methods to make it work like before
https://forums.developer.apple.com/thread/118297

marshadshaheen

marshadshaheen commented on Oct 13, 2019

@marshadshaheen

Hi
I am facing same issue

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.'
*** First throw call stack:
(0x18252498c 0x18224d0a4 0x18241a054 0x185ed90f8 0x185ed93fc 0x185acd838 0x185acdc40 0x185a69ec8 0x185f206a4 0x1861dbc2c 0x185acd838 0x185a69ec8 0x1861dfc50 0x185acd838 0x185acda6c 0x185a69ec8 0x1861dacc8 0x1861dd8b8 0x1866837d8 0x102558e00 0x1861ddda8 0x1866837d8 0x18668366c 0x18653167c 0x186531c70 0x1865303c4 0x185d0c810 0x18619d3ec 0x185d0d2f8 0x185d0cd50 0x185d0d124 0x185d0c9e0 0x185d10efc 0x1860d0028 0x1861b65ac 0x185d10c34 0x1861b64a8 0x185d10aa0 0x185b85efc 0x185b84a64 0x185b85c34 0x18652e840 0x1860f0a0c 0x1875bd994 0x1875e2960 0x1875c80f8 0x1875e261c 0x1821f2184 0x1821cc44c 0x187607540 0x18760720c 0x187607734 0x1824a27e0 0x1824a2738 0x1824a1ed0 0x18249d01c 0x18249c8bc 0x18c308328 0x1865326d4 0x1025b71a0 0x182327460)
libc++abi.dylib: terminating with uncaught exception of type NSException

I tried to run the app with release config on mobile device from Xcode
configuration:
Mobile device: iPhone x
Version : OS 13.1.2

however same projects works fine if I run it with debug configuration and configuration files are same

larryricker

larryricker commented on Oct 14, 2019

@larryricker

I experienced the exact same issue. The app runs fine on IOS12 and IOS13 devices but crashes when I run it in Test Flight on an IOS 13 device on launch. I made a complete backup of my project using the Duplicate feature on the parent directory. I had to click on this button in xCode.
Screen Shot 2019-10-14 at 12 53 23 PM
Then search for 'searchDisplay'
I deleted the complete block from to in the raw XML.
Screen Shot 2019-10-14 at 12 56 35 PM
The search functionality still worked because the swift and Objective-C code contained no references to the UISearchDisplayController. That code was rewritten a few years ago.
signal-2019-10-14-130441

marshadshaheen

marshadshaheen commented on Oct 14, 2019

@marshadshaheen
larryricker

larryricker commented on Oct 14, 2019

@larryricker
auro-krishna

auro-krishna commented on Apr 16, 2020

@auro-krishna

I got it (partially!). Actually "release" implementation of UI_USER_INTERFACE_IDIOM() in swift project crashes the app.

However, still I have no clue why our app store app (objective c language based) does NOT crash.

My only guess is that it's a glitch in UI_USER_INTERFACE_IDIOM() API implementation with some language specific coding (swift vs objective c) by Apple.

Anyways, I would replace all UI_USER_INTERFACE_IDIOM() with UIDevice(). userInterfaceIdiom. I hope this helps someone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @newacct@friedbunny@1ec5@andoma93@larryricker

      Issue actions

        On iOS 13 beta 8 app crashes when installed from testflight (UISearchDisplayController) · Issue #15559 · mapbox/mapbox-gl-native