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 alerts crash when controller is not in view hierarchy #1

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

vladpcog
Copy link

@vladpcog vladpcog commented Aug 7, 2023

Summary

  • Check that the view controller is present in the view hierarchy before trying to present the alert, so as to avoid crashes when the view is not in the hierarchy.
  • Check that there is no other alert already presented by the implementor, so as to avoid the completion handler never getting called and crashing the app.

⚠️ I removed the testTarget part from the Package.swift, because I could not build the package in Xcode 14.1, as there was no testTarget in the package.

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.

1 participant