Skip to content

Conversation

@mmertsock
Copy link
Member

@mmertsock mmertsock commented Oct 8, 2025

Several lines of ResearchKit v2 code get a UIWindow instance via the AppDelegate instance. This causes a crash in apps with a newer UIScene/SwiftUI lifecycle: the [UIApplicationDelegate window] selector is not guaranteed to exist.

Pulled in some recent updates to the main ResearchKit fork to implement this fix.

image

Testing

Launch basically any ResearchKit v2 survey, and ensure the app does not immediately crash.

@mmertsock mmertsock requested a review from eschramm October 8, 2025 13:34
Copy link

@eschramm eschramm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - yikes, this makes me wonder how much we should be monitoring the main fork. It's frustrating that they make most of their updates in monster PRs with no documentation so it's hard to know what we should take.

@mmertsock
Copy link
Member Author

(To clarify, this was only causing crashes in the refactor branch of our app. So, no impact in production for us)

@mmertsock mmertsock merged commit d0b842c into CEVRelease-2.x Oct 9, 2025
1 check passed
@mmertsock mmertsock deleted the mmertsock/fix-crash branch October 9, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants