"dyld: Symbol not found" crash when I run my app using Xcode 14 because can't find CGRect.divided(...)

I'm getting a crash when I try to run my app using Xcode 14. From the console:

dyld[21862]: Symbol not found: _$sSo6CGRectV12CoreGraphicsE9__divided5slice9remainder10atDistance4fromySpyABG_AiC7CGFloatVSo0A4EdgeVtF

  Referenced from: **path to my framework**

  Expected in: /usr/lib/swift/libswiftCoreGraphics.dylib

The code that causes crash is:

keyLabel.frame = bounds.divided(atDistance: labelHeight, from: .maxYEdge).slice

It seems it can't find that CGRect function.

Additional info: I'm on macOS 12.4 and was running my app in mac-catalyst mode. The crash doesn't happen when I run it inside an iPad simulator. But crashes when I run it on my iPad Pro (with iPadOS 15.5). Everything works fine on Xcode 13.4.

  • I have a similar problem. With another symbol from CoreGraphics library. I'm building an iOS app and it crashes in iOS 15.5 Simulator when built with Xcode 14. Working fine on iOS 16 Simulator or when built with Xcode 13.4.1.

Add a Comment

Accepted Reply

Thanks for reporting. We're tracking this bug. It's an issue with deploying to previous OS versions. In the meantime, testing your app on macOS Ventura or iOS 16 should not crash.

Replies

Thanks for reporting. We're tracking this bug. It's an issue with deploying to previous OS versions. In the meantime, testing your app on macOS Ventura or iOS 16 should not crash.

This appears to be fixed in Xcode 14.0 beta 2. I had to clean my build folder for it to start working though.