app crashes updating to Xcode 11.2 from 11.1

This thread has been locked by a moderator.

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.

Up vote post of shirefriendship
55k views

Accepted Reply

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.

Replies

Everyone experiencing this has filed bugs, right?

That was a beta ?


Did you try with 11.2 release version ?

same here - crashes on a device running 13.1 but works fine on a device running 13.2

You can work around it by making the TextView via code and not using IB. At least worked for me.


But it doesn't look like a nice solution and I would wait for new Xcode release

Does it occur with TextView or TextField or both ?

Creatign the UITextView in code helped me

Cant easily switch from storyboard/XIB to code, our storyboard has tons of view that use tons of UITextViews, would take many days to convert that.


Guess my only option will be to downgrade to XCode 11.1 which then of couse has the problem that we can't use our test devices that were already upgraded to 13.2. I was eagerly wating this XCode update since we had already a few devices auto-update to the latest and it took way to long for the XCode update to follow up.


Hope this fix by Apple does not take too long since every workaround screws us in some way.

Do file a bug. The more will report the problem, the higher chance to get it fixed faster.

We are seeing the same crash after upgrading to XCode 11.2.


The only solution we have found so far is to replace UITextViews with UIViews in XIBs, and add UITextViews into those UIViews at runtime in code.

Same here happening with UITextView declared in XIBs. Working perfectly on iOS 13.2 and crashing with the previous version. The only workaround I found was to create the UITextView in the viewDidLoad().

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.