From 6fcb878a8973601a75757e9efec0bded132cb783 Mon Sep 17 00:00:00 2001 From: Pieter De Baets Date: Tue, 21 Jun 2022 10:48:14 -0700 Subject: [PATCH] Back out "fixed SDK issue while uploading app in debug scheme" Summary: Original commit changeset: 78387999f94e Original Phabricator Diff: D34392529 (https://github.com/facebook/react-native/commit/086c13dd5fba3f77acbc70c9bdedc9299118b526) Backing this out because it breaks univeral hot reload support. We should probably find a way to support this *without* relying on swizzling. This was originally backed out it because it was blocking app store submission, but this is gated by `RN_DEV` so should never be included in a release build. Changelog: [General][Removed] - The diffs renames the required variable which was causing conflicts in names with Apple core SDK's Reviewed By: cipolleschi Differential Revision: D37311377 fbshipit-source-id: 18abb1b53a5be054098cd3717705ea5086c4f595 --- React/Base/RCTKeyCommands.m | 18 +++++++++--------- React/DevSupport/RCTPackagerClient.h | 2 +- React/DevSupport/RCTPackagerConnection.mm | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/React/Base/RCTKeyCommands.m b/React/Base/RCTKeyCommands.m index 449d5f4b2314be..83385f82439f84 100644 --- a/React/Base/RCTKeyCommands.m +++ b/React/Base/RCTKeyCommands.m @@ -18,10 +18,10 @@ @interface UIEvent (UIPhysicalKeyboardEvent) -@property (nonatomic) NSString *_modifiedEventInput; +@property (nonatomic) NSString *_modifiedInput; @property (nonatomic) NSString *_unmodifiedInput; -@property (nonatomic) UIKeyModifierFlags _modifierEventFlags; -@property (nonatomic) BOOL _isKeyEventDown; +@property (nonatomic) UIKeyModifierFlags _modifierFlags; +@property (nonatomic) BOOL _isKeyDown; @property (nonatomic) long _keyCode; @end @@ -116,16 +116,16 @@ - (void)handleKeyUIEventSwizzle:(UIEvent *)event UIKeyModifierFlags modifierFlags = 0; BOOL isKeyDown = NO; - if ([event respondsToSelector:@selector(_modifiedEventInput)]) { - modifiedInput = [event _modifiedEventInput]; + if ([event respondsToSelector:@selector(_modifiedInput)]) { + modifiedInput = [event _modifiedInput]; } - if ([event respondsToSelector:@selector(_modifierEventFlags)]) { - modifierFlags = [event _modifierEventFlags]; + if ([event respondsToSelector:@selector(_modifierFlags)]) { + modifierFlags = [event _modifierFlags]; } - if ([event respondsToSelector:@selector(_isKeyEventDown)]) { - isKeyDown = [event _isKeyEventDown]; + if ([event respondsToSelector:@selector(_isKeyDown)]) { + isKeyDown = [event _isKeyDown]; } BOOL interactionEnabled = !UIApplication.sharedApplication.isIgnoringInteractionEvents; diff --git a/React/DevSupport/RCTPackagerClient.h b/React/DevSupport/RCTPackagerClient.h index c012d4ea90a691..6dea84f358a516 100644 --- a/React/DevSupport/RCTPackagerClient.h +++ b/React/DevSupport/RCTPackagerClient.h @@ -25,7 +25,7 @@ extern const int RCT_PACKAGER_CLIENT_PROTOCOL_VERSION; @protocol RCTPackagerClientMethod - (void)handleRequest:(NSDictionary *)params withResponder:(RCTPackagerClientResponder *)responder; -- (void)handlePackageNotification:(NSDictionary *)params; +- (void)handleNotification:(NSDictionary *)params; @optional diff --git a/React/DevSupport/RCTPackagerConnection.mm b/React/DevSupport/RCTPackagerConnection.mm index 10e48bf6d64a72..199f8ac42ad320 100644 --- a/React/DevSupport/RCTPackagerConnection.mm +++ b/React/DevSupport/RCTPackagerConnection.mm @@ -210,7 +210,7 @@ - (void)addHandler:(id)handler forMethod:(NSString *)me [self addNotificationHandler:^(NSDictionary *notification) { - [handler handlePackageNotification:notification]; + [handler handleNotification:notification]; } queue:queue forMethod:method];