Skip to content

[MOB-?] Fix InAppMessage not being displayed due to correct KeyWindow not being retrieved on app that uses multiple windows #740

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

Open
wants to merge 7 commits into
base: inapp-message-on-multiple-windows
Choose a base branch
from

Conversation

harrywombat
Copy link

@harrywombat harrywombat commented Jan 26, 2024

🔹 Jira Ticket(s)

✏️ Description

If a project makes use of multiple Windows, then the IterableSDK can fail to retrieve the correct one, resulting in the InAppMessage failing and never being displayed.

This fix allows the currently displayed Window to be retrieved (the true keyWindow), so the InAppMessage can be displayed on the very top view controller.

It also accounts for the iOS 15 changes to windows.

Notes:

I have only tested it on my company's app which uses multiple windows, I haven't tested it on a single window app.

@jena-chakour
Copy link
Contributor

Thanks for sharing this, Harry!

@jena-chakour jena-chakour requested a review from joaodordio March 19, 2025 20:51
@Ayyanchira Ayyanchira changed the base branch from master to inapp-message-on-multiple-windows May 23, 2025 16:16
Copy link
Member

@Ayyanchira Ayyanchira left a comment

Choose a reason for hiding this comment

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

Looks good. Merging in a feature branch to test locally

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.

4 participants