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

Fix access to UIWindow when delegate doesn't implement that property #21

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

Supereg
Copy link
Member

@Supereg Supereg commented Mar 5, 2024

Fix access to UIWindow when delegate doesn't implement that property

♻️ Current situation & Problem

Currently, ResearchKit assumes that the window property is implemented by every UIApplicationDelegate. However, if you refer to the documentation of window the property is only required if you are using UIKit with Storyboard files. The automatic synthesis the documentation refers to doesn't seem to work according to our experience.
This issue impacted, e.g., CS342/2024-PICS#43.

This PR fixes this issue by checking first, if the respective delegate instance responds to the window selector.

This PR also addresses an issue in the CI setup where artifact names where not unique and therefore failed the CI run.

⚙️ Release Notes

  • Fixes a crash where window is not implemented for an UIApplicationDelegate.

📚 Documentation

--

✅ Testing

This will be verified within #20. However, the PR requires to compiled ResearchKit xcfamework first.

Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this issue @Supereg 🚀

@Supereg Supereg merged commit e2ebadd into main Mar 5, 2024
8 checks passed
@Supereg Supereg deleted the fix/window-crash branch March 5, 2024 18:42
@Supereg Supereg added the bug Something isn't working label Apr 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants