app crashes updating to Xcode 11.2 from 11.1

This thread has been locked by a moderator; it no longer accepts new replies.

My app ran without any crashes while using Xcode 11.1. After updating to XCode 11.2, my app experienced a crash:


*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UITextLayoutView because no class named _UITextLayoutView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)'


This crash seems to occur during a perpare for seque, before any of my views appear on the screen.


Any idea on the cause or solution?


Thanks.

Answered by DTS Engineer in 392605022

This is addressed in the GM Seed of Xcode 11.2.1. If you are writing a Mac Catalyst app, please also see the release notes for Xcode 11.2.1.


For any other issues you encounter while using Xcode, please file bug reports.

Boost

I runned in to the same problem with Xcode 11.2.

I runs OK on device iPhone X with iOS 13.2

it crashes for example with Xcode simulator iPhone 6s (10.3.1)


2019-11-01 17:43:51.460 Midi file player[2664:68570] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UITextLayoutView'

Same issue here, we're extremely lucky in that this was caught by TF beta users, we would have shipped one big broken update otherwise.


First the release is 4 days late, then it breaks apps, can somebody go to the intern that is working on Xcode right now and take their bong away, please.

We have exactly the same issue, so it seems that new Xcode 11.2.1 is on the way to fix this bug.

On iphone with iOS 13.1.3, it will crash. With iOS 13.2, it is fine.

But with xcode 11.1, all devices work fine.

Verified the crash on iOS 12.4.1. You can temporarily work around the crash by dynamically adding the missing _UITextLayoutView class to the runtime on older versions, but who knows how UITextView will behave after that. Please don't actually ship this "fix".


I've filed feedback report FB7422472 and encourage everyone in this thread to do the same.

Facing the same problem since I've upgraded to XCode 11.2 (11B52) today, with target iOS 13.0 on iPad Air 2 with version 13.1.3


*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UITextLayoutView because no class named _UITextLayoutView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)'

libc++abi.dylib: terminating with uncaught exception of type NSException

We found a workaround. Setting DEAD_CODE_STRIPPING = NO in our app’s target fixes the crash. For additional context: https://bugs.swift.org/plugins/servlet/mobile#issue/SR-11564

We are aware of this issue. It specifically affects apps with a UITextView in an Interface Builder file when building with Xcode 11.2 and running on earlier iOS versions.


To continue your app's development, you can do one of two things:

having the same issue

Recompiled under Xcode 11.1 as I managed to have my Xcode 11.2 compiled app sumitted and approved just a day ago. Now the new build that I sent to AppStore connect is not even showing under the Activity>iOS Builds, even 10 minutes later.

Are Xcode 11.1 builds accepted? Status in Xcode 11.1 for this build is "Uploaded".

Xcode 11.2 crashes for me too but not for anything storyboard or UIKit related. Finding many are having bad access crashes on Xcode 11.2, including pure Swift Packages. See here for further details and temporary workaround: https://github.com/onevcat/Kingfisher/issues/1330 Xcode 11.2 needs a hot fix! Why would you ship this if this was in beta too?!!?!

same here, it's a bug. Try to init in code rather than storyboard.

Xcode will only ever show 'Uploaded' as the final state of a submission. Just revisit itunesconnect and the binary should eventually show up. It's not instant. Sometimes it takes 15 minutes; other times over an hour or even longer.

It's been two hours now, still no sign on my uploaded binaries in App Store Connect Activity > iOS Builds. Will try with other apps.

Rolled back to 11.1 and got key value coding-compliant error on iOS 12.x that isn't real. Going to roll back to 11.0 and try that.

Look at this solution on StackOverflow for this issue. It's working:

https://stackoverflow.com/a/58660634/5623035

I have UITextView’s in Storyboard and it’s not crashing for me using Xcode 11.2 on an iOS 12.4 device! I’ve had a build approved and not sure whether to release it or not 🏼♂

I wonder if there is any chance Apple is able to fix the UITextview unarchiving issue when "recompiling" the app from the bitcode. Processing of the builds is taking enourmous time right now. My UITextviews were crashing and I recompiled with 11.1. Waited for 5 hours for the "processing" on the App Store Connect side. I added a review note on why I'm submitting a new version just a day later. It took Apple 5! minutes to take to app into Review and 5! minutes to review it. So this is my story to help you decide 🙂.

Rolling back to 11.0 or 11.1 doesn't help if submitting macOS apps using Catalyst, the _UITextLayoutView crash still occurs.

I have a similar but different issue? Works well on iOS and macOS when run from xcode. However, when I try to submit my macOS to appstore, the reviewer give me this crash log


Could not instantiate class named _UITextLayoutView because no class named _UITextLayoutView was found

Same for us! Creating controls in code is no solution/workaround for us. We need a fix in XCode for this.

Before attempting to change the app to work around this bug, can we know when a planned fix will be added and an update to xcode will be available?

Sure we all need, more or less desperately.


Hope that comes with 11.3.

It turns out that although it didn’t crash during my tests, I see crash reports from the App Store. I’ve just downloaded Xcode 11.1 to resubmit.

For those who don't want to downgrade Xcdoe I found a good workaround on Stack Overflow:


https://stackoverflow.com/a/58699326/3437712


Shoutout to aftab muhammed khan!

app crashes updating to Xcode 11.2 from 11.1
 
 
Q