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'

FB12900696

It looks like your app is trying to link with the Cocoa framework, which is worrying because that framework is not available to Mac Catalyst [1].

Is this a project that you created? If so, how did you create it? If not, where did you get it from?

Share and Enjoy

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

[1] Cocoa is an umbrella framework that includes, amongst other things, AppKit. AppKit is not available to Mac Catalyst and thus neither is Cocoa.

@eskimo Hi :)

I can reproduce the warning by creating a new iOS project. Then enable Mac Catalyst and build.

Screen recording: https://youtu.be/kJ3ayFV-Pns

I can reproduce the warning by creating a new iOS project.

OK, well that’s definitely bugworthy.

Please post your bug number, just for the record.

Share and Enjoy

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

Still seems to be an issue in the release candidate. Here are 2 more bug reports: FB13006620, FB12808549.

I just got this warning too, in Xcode 15.0 (15A240d) on macOS Sonoma 14.0 (23A344):

ld: warning: building for 'macCatalyst', but linking in dylib (/Applications/Xcode-15.0.0.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-15.0.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL.tbd) built for 'macOS'

Still getting this, on Xcode 15.1 beta (15C5028h) and macOS Sonoma 14.0 (23A344).

I am also experiencing this also in Xcode 15.0 (15A240d) on macOS Sonoma 14.0 (23A344) Running on M1Pro

This a showstopper as I can no longer compile the app!

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'

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'

This a showstopper as I can no longer compile the app!

I recommend that you, or one of the other folks hitting this problem, open a DTS tech support incident so that one of my colleagues can look into this in more detail.

Share and Enjoy

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

Wondering if there is any progress on this? Is there a DTS Tech support Incident? - It seems to be a pretty critical issue - I am experiencing the same problem.

@gaTim: I've filed a a DTS. The engineer believes it is a bug. ("We believe this issue is a bug.") There was an option to continue the DTS by asking them to find a workaround. I did this as I have low confidence in a fix arriving anytime soon in Xcode (the newest 15.1 beta 2 still has this problem). I will post the workaround when/if I receive one.

I'm getting the warnings too, but I was able to build with the warnings and I've submitted the binary to App Store Connect. There were also some other gotchas that I had to resolve. The Mac build was linking to my watch app where it never did so before. I had to go into the build settings and click off the Mac dependency.

I have the same problem with a MacCatalyst app that has been running for two years I can no longer run the app, does any one have a update?

Im getting the same error.

I am getting the error also on XCode Version 15.0.1 (15A507)

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'

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

As a workaround use the "old" linker, with the -ld_classic linker flag. For more info see the man page of ld or this thread. You will get slower link times for example though.

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