Xcode 15 beta 6: ld: warning: building for 'macCatalyst', but linking in dylib built

In Xcode 15 beta 6, building any Mac Catalyst project will encounter the following Linker warning.

ld: warning: building for 'macCatalyst', but linking in dylib (/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa.tbd) built for 'macOS'

Post not yet marked as solved Up vote post of Gong Down vote post of Gong
4k views

Replies

Getting the same issue building an xcframework. Tests pass, including on macCatalyst. I'm unclear as to whether or not this should block a release.

I'm having this issue with 2 apps since Xcode 15 beta 6 until now — just tested with Xcode 15.2. One app is 5 yo, 2 years building for the Mac with Catalyst without an issue. The other app is brand new, built with SwiftUI but also using Catalyst for the Mac.

Both give this issue. At first, I thought it was an issue with the codebase and the dependencies (Cocoapods) but it doesn't seem to be the issue as the second codebase is brand new with no non-native dependencies.

I've been able to test via TestFlight my apps but only on machines that have Xcode/Developer tools installed.

The review never go through because the reviewer have a crash at launch with this kind of crash log:

Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace DYLD, Code 4 Symbol missing
Symbol not found: _$s5UIKit17UITraitDefinitionPAAE10_isPrivateSbvgZ
Referenced from: <1AFDB3EC-33D7-322A-8388-BA4301718B7F> /Applications/XYZ.app/Contents/MacOS/XYZ
Expected in:     <0E3D0288-F872-37B4-84E4-2E16E902C2A9> /System/iOSSupport/System/Library/Frameworks/UIKit.framework/Versions/A/UIKit
(terminated at launch; ignore backtrace)

I've been monitoring this thread for a while now thinking it would get fixed after several reports but it's been months.

I can open tickets, share code, whatever. If someone from the Apple team, ping  @eskimo, can give us feedback here it would be cool!

Thanks,

Kevin

The original poster in this thread is having an issue at build time, not at runtime. In your case, you’re seeing a runtime crash because the _$s5UIKit17UITraitDefinitionPAAE10_isPrivateSbvgZ symbol is missing. Demangling that I see this:

% swift demangle
_$s5UIKit17UITraitDefinitionPAAE10_isPrivateSbvgZ
static (extension in UIKit):UIKit.UITraitDefinition._isPrivate.getter : Swift.Bool
^C

It’s not clear why that’s happening but it’s clearly a very different issue. I recommend that you start a new thread for it. Please:

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

It seems that it happens when choosing "Mac Catalyst" but not when choosing "Mac (Design for iPad)". That may be a workaround.

  • I guess this makes sense since Mac (Design for iPad) uses Cocoa but it is not a workaround for macCatalyst. I get this warning too, on Xcode 15.2 but the Mac app runs fine.

Add a Comment

I guess this thing will never get resolved??? I still have the problem in 2024. See you in 2025.

Have the same problem. App can build and app can run, but warning is always there

Just another report of same issue, Version 15.2 (15C500b) MacOS 13.6.3, Intel 16" Macbook Pro:

ld: warning: building for 'macCatalyst', but linking in dylib (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa.tbd) built for 'macOS'
ld: warning: building for 'macCatalyst', but linking in dylib (/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL.tbd) built for 'macOS'