Crash on iOS 12.5.7 (release build only) when built with Xcode 15.1

I'm testing my app built with Xcode 15.1 on 3 devices:

  1. iPhone 14 Pro (iOS 17.2) - no problem with both debug and release builds
  2. iPhone 6S (iOS 15.7.9) - no problem with both debug and release builds
  3. iPhone 5S (iOS 12.5.7) - no problem with debug build but immediate crash on the splash screen when running release build.

The message is:

dyld: Library not loaded: /System/Library/Frameworks/SwiftUI.framework/SwiftUI Referenced from: /var/containers/Bundle/Application/MyApp.app/MyApp Reason: image not found

Googled about this error and it seems to be an old and known issue: "Apps containing SwiftUI inside a Swift package might not run on versions of iOS earlier than iOS 13. (53706729)." Adding -weak_framework SwiftUI to Other Linker Flags fixed my issue.

However I'm curious why this old issue reappeared in the most recent Xcode 15 while I haven't such problems with Xcode 14 and 13.

Post not yet marked as solved Up vote post of KalMudov Down vote post of KalMudov
564 views