Swift Compiler Crashes with Internal Error (NSInvalidArgumentException)

Hello,

I am a first-time app developer and I have not posted on forums before, so please bear with me if my question is basic or amateur.

I have created an app on Xcode with storyboard. I have not added any code yet except for the AppDelegate, Scene Delegate, and View Controller files which are automatically added when the project is created.

When I try to build, I get the following error:

Description: Internal error. Please file a bug at feedbackassistant.apple.com and attach "/var/folders/w5/32zs74y9287ddqdp_yjkkdbw0000gn/T/IB-agent-diagnostics_2023-07-09_09-58-08_842000"

I have filed a bug, but was wondering if any of you know of a workaround. Looking into Log.txt, I see the following error:

Failed to compile nib consisting of IBCLLocationButton (x1), IBMKMapView (x1), IBProxyObject (x4), IBUIButton (x3), IBUIContainerView (x2), IBUIView (x2), IBUIViewAutolayoutGuide (x1), and IBWKWebView (x1).

Exception name: NSInvalidArgumentException
Exception reason: UIImage instances should generally not be encoded in NIBs - attempting to encode '<UIImage:0x6000002b1830 anonymous {41, 41} renderingMode=automatic(original)>' for key 'UIImage' of <UIImageView: 0x7f7e45f32a60; frame = (0 0; 41 41); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0x60000311c8c0>>

My Main.storyboard file consists of a scrollview, with a table view inside. The table view has a custom prototype cell.

My Xcode version is 14.2, and my deployment target is ios 16.2. I am using MacOS Monterrey. I have seen similar errors being discussed on this forum and others, but none exactly pertaining to the specific platform I am using.

I have already tried cleaning the build folder and resetting my image views.

Any help would be appreciated. Thank you.

Accepted Reply

It seems like this is a bug of the CoreLocationButton. The error goes away when I remove it.

Replies

It seems like this is a bug of the CoreLocationButton. The error goes away when I remove it.