After upgrading to Xcode 11.2 from Xcode 11.1 my app crashes:
*** 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)'
Why is this happening? How can I prevent this crash?
Open your app from the home screen of your test device or simulator. In your app, press the "Test Crash" button that you added using the code above. After your app crashes, run it again from Xcode so that your app can send the crash report to Firebase.
All you need to do is sign into Xcode with your Apple ID. When you upload your app you should include symbols so that you get server-side symbolication of your crash logs. And open up the Organizer window to the Crashes tab to start viewing those crashes.
This bug is fixed in Xcode 11.2.1. So you can download and use it from here.
Storyboards containing a UITextView will no longer cause the app to crash on operating system versions earlier than iOS 13.2, tvOS 13.2, or macOS 10.15.2. (56808566, 56873523)
if you ever try to submit your app that build with Xcode 11.2 to the AppStore, you will be rejected:
App Store Connect Operation Warning
WARNING ITMS-90703: "Deprecated Xcode Build. Due to resolved app archives issues, we have deprecated Xcode 11.2 on November 5, 2019. Download Xcode 11.2.1 or newer, rebuild your app and resubmit."
So all workarounds done with the Xcode 11.2 is useless
Roll back to previous Xcode release version from: Rollback is not an option anymore and AppStore will reject any build with Xcode below 11.2.1 take a look at this
https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_11.1/Xcode_11.1.xip
Note that you should use Safari to download it and you must first login to Apple developer portal.
You can find all other Xcode versions and other resources link (including release and beta versions) here at https://developer.apple.com/download/more
This is very hard but working workaround. Replace all UITextView
s in storyboards and Xibs with the pure code version.
Note that this bug is found and fixed by Apple
Also earlier, the bug was confirmed by Apple Staff edford
UITextView
UITextView
objectsHead to the @aftab muhammed khan answer for Objective-C and @MikRo answer for Swift adapted version
Even if these last two swizzling workarounds are not using Apple private API, they will be rejected in AppStore because Apple will not accept builds with Xcode versions under 11.2.1!
And once again:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With