Skip to content

Commit 2f27e07

Browse files
committed
fix(ios): guard preloadKeyboardIfNeeded with @available(iOS 26.0, *)
On iOS 26+, `[UIResponder preloadKeyboardIfNeeded]` is a private API that causes a crash. Guard the call so it is skipped on iOS 26 and later. Fixes: https://github.com/kirillzyusko/react-native-keyboard-controller/issues/preload-crash-ios26
1 parent 21a939f commit 2f27e07

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

ios/KeyboardControllerModule.mm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ - (void)preload
8787
RCT_EXPORT_METHOD(preload)
8888
#endif
8989
{
90+
if (@available(iOS 26.0, *)) {
91+
return;
92+
}
9093
[UIResponder preloadKeyboardIfNeeded];
9194
}
9295

0 commit comments

Comments
 (0)