4
votes

Xcode still cause apps using UITextView to crash even after installing "Xcode Version 11.2.1 (11B500)" from app store.

Actually I faced this issue when I run the app on device after installing "Xcode 11.2.1 (11B500)". I got below error response.

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)'

1
This thread might be helpful to you - forums.developer.apple.com/thread/125287 - Niki
@Niki yes, you are correct, Xcode 11.2.1 has fixes for above problem. But that issue will come again in Xcode 11.2.1 as well if we don't clean derived data and clean build folder as I mentioned in below answer. - Natarajan

1 Answers

5
votes

To fix the above problem:

  1. I had to clear the derived data folder, go to path: ~/Library/Developer/Xcode/DerivedData.
  2. And I did clean build folder using menu: Product -> Clean Build Folder(Shift + Command + K).

Now the app won't be crashed due to UITextView issue.