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

Guarantee that messageView is a subview of OSInAppMessageViewController #983

Merged
merged 1 commit into from
Aug 26, 2021

Conversation

emawby
Copy link
Contributor

@emawby emawby commented Aug 24, 2021

There is swiftUI crash where addConstraintsForMessage can be called without messageView being a subview of OSInAppMessageViewController's view. This is likely happening because viewWillTransitionToSize is being called before setupInitialMessageUI. Neither the crash reporters nor OneSignal have been able to reproduce the crash, but it is safe to always add messageView as a subview if it is not already.

Fixes #819


This change is Reviewable

There is swiftUI crash where addConstraintsForMessage can be called without messageView being a subview of OSInAppMessageViewController's view.  This is likely happening because viewWillTransitionToSize is being called before setupInitialMessageUI. Neither the crash reporters nor OneSignal have been able to reproduce the crash, but it is safe to always add messageView as a subview if it is not already.
Copy link
Member

@jkasten2 jkasten2 left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @Jeasmine and @nan-li)

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.

[Crashlytics] Crash on OSInAppMessageViewController
2 participants