iOS app fails to run with Xcode 16 & less than iOS17.0 no issue with Xocde 15

When I build and rum my iOS app with xocde 16.0 or higher version with my 16.0 iOS, 17.0 iOS, if fails to run with error. (Library not loaded: /System/Library/Frameworks/SwiftUICore.framework/SwiftUICore)

I found this error after update my macOS and xcode (Ventura -> Sequoia, Xcode 15.2 -> 16.2). I try to setting '-weak_framework SwiftUI' for solve this error with this post (https://forums.developer.apple.com/forums/thread/126506). But when applied, an error occurred in modify on all swiftUI. If a project is built with a simulator over 18 versions, it runs smoothly.

*issue project is with tac or tuist. There are two projects in question, and each configuration is (1.17.0 tca + 4.37.0) / (tuist 3.4.0).

Does anyone have any pointers as where I even start to debug this issue and narrow down on what's going on with Xcode 16?

Answered by DTS Engineer in 818526022

*issue project is with tac or tuist

Are these tools generating your Xcode project? And if they are, if you remove these tools from your build process and just rely on an Xcode project created from File > New in Xcode, does this still reproduce?

— Ed Ford,  DTS Engineer

Accepted Answer

*issue project is with tac or tuist

Are these tools generating your Xcode project? And if they are, if you remove these tools from your build process and just rely on an Xcode project created from File > New in Xcode, does this still reproduce?

— Ed Ford,  DTS Engineer

I’m experiencing the same issue — my apps stop working on iOS 16 and 17 when built with Xcode 16 (currently using 16.3).

The error message is the same: Library not loaded: /System/Library/Frameworks/SwiftUICore.framework/SwiftUICore

I managed to work around the issue in one of my apps by marking the framework as optional using the linker flag -weak_framework SwiftUICore under the App Target > Linking > Other Linker Flags.

It would be great to get more information from Apple regarding this. Why are iOS 16 and 17 attempting to load a framework that’s only available in iOS 18? Am I missing something?

I have found a solution for my app, I have posted it here: https://developer.apple.com/forums/thread/772479?answerId=834841022#834841022

iOS app fails to run with Xcode 16 & less than iOS17.0 no issue with Xocde 15
 
 
Q