Skip to content

Commit

Permalink
fix(ios): apply filter to fetch correct scene object (#2103)
Browse files Browse the repository at this point in the history
  • Loading branch information
OS-ricardomoreirasilva authored May 14, 2024
1 parent 41683f7 commit c4feee0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion keyboard/ios/Plugin/Keyboard.m
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ - (void)_updateFrame

if (!window) {
if (@available(iOS 13.0, *)) {
UIScene *scene = [UIApplication sharedApplication].connectedScenes.allObjects.firstObject;
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"self isKindOfClass: %@", UIWindowScene.class];
UIScene *scene = [UIApplication.sharedApplication.connectedScenes.allObjects filteredArrayUsingPredicate:predicate].firstObject;
window = [[(UIWindowScene*)scene windows] filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"isKeyWindow == YES"]].firstObject;
}
}
Expand Down

0 comments on commit c4feee0

Please sign in to comment.