Closed richard-ww closed 1 year ago
Hi @richard-ww,
Apologies for the late reply, and thanks for linking to the code in ABKUIUtils.m! It sounds like this issue has to do with the iPhone's mirror feature with a TV when displaying a modal in-app message. Are you experiencing this issue with other in-app message types?
I'm also curious if you are experiencing this issue when using our new Braze Swift SDK which has been written from scratch and may solve the issue you are facing. With the 5.8.0 release and the associated Appboy-iOS-SDK migration guide, the hope is that the migration to the new SDK should be smooth.
Are you still experiencing this issue?
I'm closing out this ticket due to inactivity. For others running into a similar issue, we recommend migrating to the Swift SDK which has completely rewritten logic for the UI layer.
Platform
iOS
Platform Version
iOS 16.1
Braze SDK Version
4.5.1
Xcode Version
Xcode 14.1(14B47b)
Integration Method
Cocoapods
Computer Processor
Apple (M1)
Repro Rate
< 10%
Steps To Reproduce
Expected Behavior
It shouldn't show up on the TV, it should show up on the phone for me to click on
Actual Incorrect Behavior
It sometimes shows up on TV, and maybe once in 10 tries it will have this issue
Verbose Logs
No response
Additional Information
After debugging, I think the cause of the problem should be in the following code, two issues here:
(UIWindowScene )activeWindowScene { UIWindowScene windowScene; UIWindowScene *activeWindowScene;
// Loop over the connected window scenes to find the last foreground active // one. If no scene is currently in foreground state, fallback to last window // scene in hierarchy. for (UIScene *scene in [self application].connectedScenes) { if (![scene isKindOfClass:[UIWindowScene class]]) { continue; }
windowScene = (UIWindowScene *)scene; if (scene.activationState == UISceneActivationStateForegroundActive) { activeWindowScene = windowScene; } } return activeWindowScene ?: windowScene; }