Installed App from TestFlight crashes due to alleged UISearchDisplayController - ios

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?

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.

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

*** 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.

Related

App began to crash on iOS 9.1 Beta 2

The application began to crash when installing on iOS 9.1 Beta 2. Exactly same binary (downloaded from hudson link) behaves so:
It did not crash on iOS 9.0 and iOS 9.0.1
It did not crash on either iOS 8
I have extracted the crash log, crash happens inside the call to [[NSBundle mainBundle] loadNibNamed:#"NameOfView" owner:self options:nil];. The crash itself is NSUnknownKeyException:
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[< NameOfView: 0x1446a6ea0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key .'
So far i see weird key '.' which nib loading mechanism tries to set on my class, and obviously, such is not present in nib. And this looks extraweird even more, due to iOS 9.1 beta 2 is the only version with this behaviour. Moreover, building app with XCode 7 from on same git revision gives no success crashing app - it works as expected. Has anybody experienced such behaviour after trying your release versions on iOS 9.0.1 beta 2? Want to have some feedbacks of SO community before file a bug to radar. Appreciate your help, guys.
P.S. I'd like to emphasize that the issue reproduces only on that particular binary. Building it again from the same sources in XCode 7 doesn't produce a crash. So please, don't suggest how to debug such kind of problem, how to set exception breakpoint etc.
EDIT
Since 9.1 release, it's no more reproducible.
As stated in comment to original question, there's no solution and no response on bug yet.
The openradar link: http://openradar.appspot.com/radar?id=6294934587965440
I'll be posting an updates here after the 9.1 release.
There are some empiric ways to come up with solution:
Override KVC setter setValue:forKey: and forbid empty string
key.
Use always the latest stable SDK to build.
But again, no actual response from Apple neither.
EDIT Since 9.1 release, it's no more reproducible.

iOS app crashes immediately when debugging AppleWatch app on Simulator (not on device)

I've got an AppleWatch app that is working fine in Simulator and Device, but when I call openParentApplication, it appears that the parent app is crashing immediately because I see this in the console output:
The UIApplicationDelegate in the iPhone App never called reply()...
When I try to manually launch the parent iOS app in the Simulator it crashes there too immediately. I don't have time to attach the debugger (which is already attached to the AppleWatch app) to see what is crashing it. Note that the parent app runs fine when the AppleWatch is running and I'm using a real iPhone. I can also run the app fine on the Simulator when not debugging the AppleWatch app.
I've tried resetting the Simulator, but problem persists.
I'm just not sure how to debug this. Any help is appreciated.
Start an explicit background task in handleWatchKitRequest. Otherwise, your app gets killed before it reaches reply().
Refer to this post for a code example on how to create a background task.
In turns out that after commenting out all code in the parent app's didFinishLaunching and stripping almost all code out of the watch extension, the problem was indeed at a lower level.
The Simulator has a
Debug | Open System Log...
menu option that showed the crash logs, which contained:
Dyld Error Message: Library not loaded:
#rpath/MyCore.framework/MyCore Referenced from:
/Users/me/Library/Developer/CoreSimulator/Devices/A2061705-DDDF-477C-9AAA-E50GG43A6350/data/Containers/Bundle/Application/DEB7FB25-8233-4B9F-8DAB-9FF8AE42BF33/MyApp.app/MyApp
Reason: no suitable image found. Did find:
/Users/me/Library/Developer/CoreSimulator/Devices/A2061705-DDDF-477C-9AAA-E50FF43A6350/data/Containers/Bundle/Application/DEB7FB25-8553-4B9F-8DAB-9FF8AE95BF33/MyApp.app/Frameworks/MyCore.framework/MyCore:
mach-o, but wrong architecture
My Swift app has a few dependent Swift projects that are used by the app and extension. Getting the Swift frameworks to link has been a major pain. I've included the dependent frameworks (compiled in the same workspace) as embedded binaries. This works when running on the device, or on the Simulator, but not when running in this hybrid watch app + parent app Simulator context.
I changed the embedded binary references to point to the frameworks under ...DerivedData...Debug-iphonesimulator, as opposed to ...DerivedData...Debug-iphoneos, and the problem went away.
Still hoping the Swift framework story will improve.
Are you seeing an actual crash? That message has appeared for me plenty of times without the host app crashing.
99% of the time, that error appears because developers aren't opening a background task to complete their work in handleWatchKitRequest. Without the background task, the OS kills your app in the background before it has a chance to reply.

ionic app rejected from app store

I'm attempting to upload my first app to the appstore. It's built with ionic. Repo is here: https://github.com/irthos/rogo-app and is live here: https://irthos.github.io/rogo-app/
The email from apple said they tried it on a iPhone 4s:
May 17, 2015 at 4:06 PM From Apple
2.1 - Apps that crash will be rejected
2.1 Details
We were unable to review your app, as it crashed on launch on the
following device(s):
iPhone 5S running iOS 8.3
We have attached detailed crash logs to help troubleshoot this issue.
Finally, here's the ips log from Apple: http://a1837.phobos.apple.com/us/r30/Purple7/v4/30/c5/04/30c50456-c2c0-1148-8d60-f36fbb11ae26/temp..jwnucdaf.ips?downloadKey3=1432258092_57a71add8c408ca7ec7a907881e7a613
Thanks for any insight to this. I'll also post an issue on ionic's repo in case it's a bug.
Well, the crucial line is:
setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.'
Typically I would see this on a ViewController in a Storyboard where I changed the names of one of my IBOutlets in code but did not go and re-map the ViewController outlets on the storyboard.
Since I don't know what "ionic" is, I have no idea whether you are even using storyboards (or XIB's) or what tools you use but I would look at something UI related.
Just a guess though.

App crashes on iPad device but working on simulator

I just have device UDID & client reported that the app is crashing
on his device & he is not able to start application.
The client device iOS version is 7.1.2
Also i am not having any crash report.(Asked for Crash Report)
Now referring
(iAd works on simulator but crash on device(ipad)):
I am assuming the reason behind this might be the library,
So will making iAD.framwork optional & handling codes related to this do the trick?
**Update:
Unfortunately the cause of the crash was -[__NSCFString containsString:]: unrecognized selector sent which was iOS version fault & not device fault. I got it resolved. sorry to iAd for blaming or trying to blame. Long live iAd. Thanks**
First of all - you need crash details. Without it, nobody help you.
Integrate any crash reporter SDK: Crashlytics or anything like this.

iPad app closes after 2 seconds, memory issue?

I made a magazine iPad app so you can scroll through different slides to the left, right, down and up. It's all ready and accepted by the iTunes app store. Problem is, if someone downloads the app it closes directly after 1 seconds of loading.
Weird part is that i installed the app trough xCode and all works without any problems. My guess is that the app takes too much memory. I made a screenshot of the memory instrument:
But how can i release a Srollview if it must be loaded all the time?
Hope someone could push me in the right direction!
I have tested your app on my iPad2 with iOS 5.1.1, and it crash with the following message:
OxygenEvents[97151] <Error>: *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
*** First throw call stack:
(0x375c388f 0x31638259 0x375c3789 0x375c37ab 0x309de54d 0x309de6bb 0x309de423 0x3096f001 0x308dd3c7 0x307bac59 0x30730c17 0x10d5d5 0x30730c8b 0x109beb 0x30730c8b 0x3072f461 0x30721e87 0x307927d5 0x10960b 0x3072fcab 0x307297dd 0x306f7ac3 0x306f7567 0x306f6f3b 0x3771322b 0x37597523 0x375974c5 0x37596313 0x375194a5 0x3751936d 0x3072886b 0x30725cd5 0x10944f 0xf0050)
It is because you use "Autolayout" in your Interface Builder files (nib / xib files), which is an iOS 6.0 only feature.
To solve this, either disable Autolayout in all your xib files like this:
or simply make your app iOS 6.0 only by setting deployment target as iOS 6.0

Resources