From 086df1fd3d80e06144727cb52fd7b6fe08556eaf Mon Sep 17 00:00:00 2001 From: Liam Potter Date: Mon, 26 Sep 2022 13:03:20 +0100 Subject: [PATCH] Remove usage of UIApplication.sharedApplication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Brings in line with rest of code base and avoids running into this error ``` ‘sharedApplication’ is unavailable: not available on iOS (App Extension) — Use view controller based solutions where appropriate instead. ``` when `Requires Only App-Extension-Safe-API` is set to Yes. --- React/Base/RCTKeyCommands.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/React/Base/RCTKeyCommands.m b/React/Base/RCTKeyCommands.m index 83385f82439f..1ceaf6ec0dce 100644 --- a/React/Base/RCTKeyCommands.m +++ b/React/Base/RCTKeyCommands.m @@ -128,7 +128,7 @@ - (void)handleKeyUIEventSwizzle:(UIEvent *)event isKeyDown = [event _isKeyDown]; } - BOOL interactionEnabled = !UIApplication.sharedApplication.isIgnoringInteractionEvents; + BOOL interactionEnabled = !RCTSharedApplication().isIgnoringInteractionEvents; BOOL hasFirstResponder = NO; if (isKeyDown && modifiedInput.length > 0 && interactionEnabled) { UIResponder *firstResponder = nil;