Post

Replies

Boosts

Views

Activity

Library not loaded: /System/Library/Frameworks/SwiftUICore.framework/SwiftUICore
Hello. I'm building an iOS application that builds a framework named Design.framework using Xcode 16.1. When I launch my application on iOS 17.X, i get the following runtime error dyld[47899]: Library not loaded: /System/Library/Frameworks/SwiftUICore.framework/SwiftUICore Referenced from: <E625A246-E36B-351A-B077-CC38BAB5E07B> /Users/v/Library/Developer/Xcode/DerivedData/iScribd-bexojbdreldwkvbpzioqueldnvng/Build/Products/Debug_AppStore-iphonesimulator/Design.framework/Design Reason: tried: '/Users/v/Library/Developer/Xcode/DerivedData/iScribd-bexojbdreldwkvbpzioqueldnvng/Build/Products/Debug_AppStore-watchsimulator/SwiftUICore.framework/SwiftUICore' (no such file), '/Users/v/Library/Developer/Xcode/DerivedData/iScribd-bexojbdreldwkvbpzioqueldnvng/Build/Products/Debug_AppStore-iphonesimulator/SwiftUICore.framework/SwiftUICore' (no such file), '/Users/v/Library/Developer/Xcode/DerivedData/iScribd-bexojbdreldwkvbpzioqueldnvng/Build/Products/Debug_AppStore-watchsimulator/PackageFrameworks/SwiftUICore.framework/SwiftUICore' (no such file), '/Users/v/Library/Developer/Xcode/DerivedData/iScribd-bexojbdreldwkvbpzioqueldnvng/Build/Products/Debug_AppStore-iphonesimulator/PackageFrameworks/SwiftUICore.framework/SwiftUICore' (no such file), '/Library/Developer/CoreSimulator/Volumes/iOS_21C62/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore' (no such file), '/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore' (no such file, not in dyld cache), '/Library/Developer/CoreSimulator/Volumes/iOS_21C62/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.2.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/SwiftUICore.framework/SwiftUICore' (no such file) This error does not happen on iOS 18+. When i run dyld_info Design.framework/Design, i see that there is indeed a dependency on SwiftUICore.framework Design.framework/Design [arm64]: -platform: platform minOS sdk iOS-simulator 16.0 18.1 -uuid: 09880F25-DC86-3D8E-BCAE-1A283508D879 -segments: load-offset segment section sect-size seg-size max-prot init-prot 0x00000000 __TEXT 416KB r.x 0x00000000 __TEXT 416KB r.x 0x0000543C __text 355508 0x0005C0F0 __stubs 3168 0x0005CD50 __objc_methlist 32 0x0005CD70 __const 8296 0x0005EDD8 __swift5_typeref 15820 0x00062BB0 __cstring 6885 0x00064698 __constg_swiftt 2804 0x0006518C __swift5_builtin 40 0x000651C0 __swift5_reflstr 2952 0x00065D48 __swift5_assocty 816 0x00066078 __objc_methname 299 0x000661A4 __swift5_proto 368 0x00066314 __swift5_types 280 0x0006642C __swift5_fieldmd 3688 0x00067294 __swift5_protos 8 0x0006729C __swift5_capture 244 0x00067390 __unwind_info 2296 0x00067C88 __eh_frame 888 0x00068000 __DATA_CONST 16KB rw. 0x00068000 __DATA_CONST 16KB rw. 0x00068000 __got 3704 0x00068E78 __const 6864 0x0006A948 __objc_classlist 40 0x0006A970 __objc_imageinfo 8 0x0006C000 __DATA 32KB rw. 0x0006C000 __DATA 32KB rw. 0x0006C000 __objc_const 792 0x0006C318 __objc_selrefs 96 0x0006C378 __objc_classrefs 48 0x0006C3A8 __objc_data 208 0x0006C478 __data 4136 0x0006D4A0 __bss 12784 0x00070690 __common 4592 -linked_dylibs: attributes load path @rpath/CommonTools.framework/CommonTools /System/Library/Frameworks/Foundation.framework/Foundation /usr/lib/libobjc.A.dylib /usr/lib/libSystem.B.dylib /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation /System/Library/Frameworks/CoreGraphics.framework/CoreGraphics /System/Library/Frameworks/CoreText.framework/CoreText weak-link /System/Library/Frameworks/DeveloperToolsSupport.framework/DeveloperToolsSupport /System/Library/Frameworks/SwiftUI.framework/SwiftUI /System/Library/Frameworks/SwiftUICore.framework/SwiftUICore /System/Library/Frameworks/UIKit.framework/UIKit /usr/lib/swift/libswiftCore.dylib weak-link /usr/lib/swift/libswiftCoreAudio.dylib /usr/lib/swift/libswiftCoreFoundation.dylib weak-link /usr/lib/swift/libswiftCoreImage.dylib weak-link /usr/lib/swift/libswiftCoreMedia.dylib weak-link /usr/lib/swift/libswiftDarwin.dylib weak-link /usr/lib/swift/libswiftDataDetection.dylib weak-link /usr/lib/swift/libswiftDispatch.dylib weak-link /usr/lib/swift/libswiftFileProvider.dylib weak-link /usr/lib/swift/libswiftMetal.dylib weak-link /usr/lib/swift/libswiftOSLog.dylib /usr/lib/swift/libswiftObjectiveC.dylib weak-link /usr/lib/swift/libswiftQuartzCore.dylib weak-link /usr/lib/swift/libswiftSpatial.dylib weak-link /usr/lib/swift/libswiftUniformTypeIdentifiers.dylib weak-link /usr/lib/swift/libswiftXPC.dylib /usr/lib/swift/libswift_Concurrency.dylib weak-link /usr/lib/swift/libswiftos.dylib weak-link /usr/lib/swift/libswiftsimd.dylib weak-link /usr/lib/swift/libswiftUIKit.dylib I can add a -weak_framework SwiftUICore to "Other Linker Flags" in my Design.framework Build Settings, and that will solve my problem, but I'd like to know what prompts my Design.framework to depend on SwiftUICore despite having a minimum set to iOS 16? And how am I supposed to handle devices prior to iOS 18 which do not have this library? is adding the linker flag the right way forward?
Topic: UI Frameworks SubTopic: SwiftUI
5
0
1.3k
Jan ’25