-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Capacitor Version
"@capacitor/cli": "^7.1.0",
"@capacitor/core": "^7.1.0",
"@capacitor/android": "^7.1.0",
"@capacitor/ios": "^7.1.0",
Xcode : 16.2
iOS : 17.5
Other API Details
node : v23.11.0
npm : 10.9.2
pod : 1.16.2Platforms Affected
- iOS
- Android
- Web
Current Behavior
Summary
Apps built with Xcode 16+ that use SwiftUI or link to frameworks built with SwiftUI (like OwnIDCoreSDK) may crash on launch when run on iOS 17.x. The crash occurs because the app tries to load SwiftUICore.framework, which is only available in iOS 18 and later.
Crash Details
Exception Type: EXC_CRASH (SIGABRT)
Termination Reason: DYLD 1 Library missing
Missing Library: /System/Library/Frameworks/SwiftUICore.framework/SwiftUICore
Error Message:
Code
Library not loaded: /System/Library/Frameworks/SwiftUICore.framework/SwiftUICore
Reason: tried: ... (no such file, not in dyld cache)
Root Cause
SwiftUI code or third-party SDKs (like OwnIDCoreSDK) built with Xcode 16 may use new SwiftUI APIs introduced in iOS 18.
These APIs implicitly link to SwiftUICore.framework.
On iOS 17, this framework doesn't exist, causing a dynamic linker crash at launch.
Expected Behavior
App Launches Successfully on iOS 17 and iOS 18
The app should no longer crash at launch on iOS 17.4.1.
It should continue to function normally on iOS 18+.
No Runtime Linker Errors
The dynamic linker (dyld) should not attempt to load SwiftUICore.framework on iOS 17.
The app should gracefully skip loading unavailable frameworks due to the weak linking.
SwiftUI Features Work Where Supported
Any SwiftUI features that rely on SwiftUICore should:
Work on iOS 18+
Be conditionally excluded or gracefully degraded on iOS 17
No Build-Time Errors
Xcode should compile the app without errors related to SwiftUICore, assuming:
-weak_framework SwiftUICore is added correctly
No direct imports or hard dependencies exist on SwiftUICore.framework
Project Reproduction
https://github.com/github-samples
Additional Information
This issue occurs in my app because I'm using the ownid-core-ios-sdk CocoaPod (version 3.8.3), which internally uses SwiftUI and implicitly links to SwiftUICore.framework. While this framework is available in iOS 18 and later, it does not exist in iOS 17, causing the app to crash at launch on devices running iOS 17.4.1.
Even though I don’t directly import or use SwiftUICore in my own code, the SDK’s internal usage of SwiftUI APIs introduced in iOS 18 triggers a dynamic link to SwiftUICore.framework, which fails on older OS versions.