App crashes from Xcode 11

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


*** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _UIScrollerImpContainerView because no class named _UIScrollerImpContainerView 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 before any of my views appear on the screen.


Similar problem has been see on apple developper forum : https://forums.developer.apple.com/thread/125287


Any idea on the cause or solution?


Thanks.

Test with XCode 12.2.1

Xcode 12.2.1 doesn't not exist yet.

You meant Xcode 11.2.1? I already tested with it like I said in my post

Yes I meant 11.2 ! Hope we don't have to wait 12.2 for a solution.


Is it 11.2.1 GM Seed, available yesterday (Build 11B53, not 11B52)

When does it occur ? Which conditions ? Simulator or device ?


Have you checked the file where it occurs is in the correct targets ?

Yes I tried with 11.2.1 GM Seed but no success ... 😟


It occurs when I build my framework and I deploy on simulator OR device, no matter.

(xcodebuild -quiet -project MyApp.xcodeproj/ -scheme MyAppFramework-library -sdk iphoneos$VERSION_NUMBER -configuration Distribution build -UseModernBuildSystem=NO)


But if I deploy the code in a classic way (Build & Run with Xcode) on a simulator or device, I have no problem.


It occurs only when I create my framework. Moreover, Crash occur only with some view (common point is maybe they were created with .xib). Otherwise I can start application and use some features (very few).

The targets are corrects (everything works with Xcode 10.3).

The crash produced inside "required init?(coder aDecoder: NSCoder)" at 2 differents places (I didn't check the rest of the application because I crash before...)


I hope I was clear.

Thanks for helping

I am having the same issue. Framework built using the ternimal command gives the exact same error. Tried all versions of XCode 11, still same issue. Have you found any workaround for it? Thanks.

For what it's worth, I just saw the very same exception in a Mac Catalyst app when running it on an iPad (Xcode 11.3.1). After a clean rebuild, the problem was gone.

This is EXACTLY what I am seeing too. Same scenario.

I'm getting same issue with Xcode 11.4 for UICollectionView and UITableView components in a macCatalyst hybrid app that uses UIScene multi window management. Tested the older code (before enabling macCatalyst support and the new scene management) and works fine in Xcode 11.4. Cleaning/rebuilding sometimes helps but most of the times it doesn't. What makes it worse ( in terms of frequency) is building for MacCatalyst and then for iPad/iPhone.


Somehow seems to be related to having in the storyboards the Mac trait active. Just tried rebuilding several times with iPhone or iPad trait as default in those storyboards and each time it worked. I ll keep observing it over next days.

I had the same issue using Xcode 11.5. I was initially developping an iOS app with Catalyst enabled. I started then to add a watchOS app Extension. Xcode automatically linked the Watch.app for iOS and macOS.


It looks like embedding framework can cause issue with Catalyst. To resolve the issue, I had to go to my iOS target > General > Frameworks, Libraries, and Embedded Content and select iOS for Watch.app only and not macOS + iOS.

App crashes from Xcode 11
 
 
Q