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

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