Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DebugViewModel: fixed runtime crash on iOS < 16 #3139

Merged
merged 1 commit into from
Sep 5, 2023

Commits on Sep 5, 2023

  1. DebugViewModel: fixed runtime crash on iOS < 16

    Fixes RevenueCat/purchases-capacitor#100 and https://app.circleci.com/pipelines/github/RevenueCat/purchases-ios/14093/workflows/b3f8d001-6f39-40db-a5c5-00fc37d0211e/jobs/105838
    
    Both `XCTest` (to load tests at runtime) and `Capacitor` use `objc_getClassList`. That's broken before iOS 16 and will try to load the metadata for `DebugViewModel` even though it's not `@available`.
    A similar issue has been reported before: https://openradar.appspot.com/radar?id=4970535809187840 / swiftlang/swift#58099
    
    This adds a layer of indirection so loading `DebugViewModel` at runtime doesn't require the metadata for `NavigationPath`.
    NachoSoto committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    9d323ee View commit details
    Browse the repository at this point in the history