From 086c13dd5fba3f77acbc70c9bdedc9299118b526 Mon Sep 17 00:00:00 2001 From: Arinjay Sharma Date: Mon, 6 Jun 2022 10:08:11 -0700 Subject: [PATCH] fixed SDK issue while uploading app in debug scheme (#33153) Summary: Problem - Error when trying to publish to Apple Store in debug scheme Error thread - https://github.com/facebook/react-native/issues/31507 ## Changelog [General][Removed] - The diffs renames the required variable which was causing conflicts in names with Apple core SDK's Pull Request resolved: https://github.com/facebook/react-native/pull/33153 Reviewed By: lunaleaps Differential Revision: D34392529 Pulled By: sshic fbshipit-source-id: 78387999f94e0db71f5d3dafff51e58d7d0c1847 --- 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 83385f82439f84..449d5f4b2314be 100644 --- a/React/Base/RCTKeyCommands.m +++ b/React/Base/RCTKeyCommands.m @@ -18,10 +18,10 @@ @interface UIEvent (UIPhysicalKeyboardEvent) -@property (nonatomic) NSString *_modifiedInput; +@property (nonatomic) NSString *_modifiedEventInput; @property (nonatomic) NSString *_unmodifiedInput; -@property (nonatomic) UIKeyModifierFlags _modifierFlags; -@property (nonatomic) BOOL _isKeyDown; +@property (nonatomic) UIKeyModifierFlags _modifierEventFlags; +@property (nonatomic) BOOL _isKeyEventDown; @property (nonatomic) long _keyCode; @end @@ -116,16 +116,16 @@ - (void)handleKeyUIEventSwizzle:(UIEvent *)event UIKeyModifierFlags modifierFlags = 0; BOOL isKeyDown = NO; - if ([event respondsToSelector:@selector(_modifiedInput)]) { - modifiedInput = [event _modifiedInput]; + if ([event respondsToSelector:@selector(_modifiedEventInput)]) { + modifiedInput = [event _modifiedEventInput]; } - if ([event respondsToSelector:@selector(_modifierFlags)]) { - modifierFlags = [event _modifierFlags]; + if ([event respondsToSelector:@selector(_modifierEventFlags)]) { + modifierFlags = [event _modifierEventFlags]; } - if ([event respondsToSelector:@selector(_isKeyDown)]) { - isKeyDown = [event _isKeyDown]; + if ([event respondsToSelector:@selector(_isKeyEventDown)]) { + isKeyDown = [event _isKeyEventDown]; } BOOL interactionEnabled = !UIApplication.sharedApplication.isIgnoringInteractionEvents; diff --git a/React/DevSupport/RCTPackagerClient.h b/React/DevSupport/RCTPackagerClient.h index 6dea84f358a516..c012d4ea90a691 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)handleNotification:(NSDictionary *)params; +- (void)handlePackageNotification:(NSDictionary *)params; @optional diff --git a/React/DevSupport/RCTPackagerConnection.mm b/React/DevSupport/RCTPackagerConnection.mm index 199f8ac42ad320..10e48bf6d64a72 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 handleNotification:notification]; + [handler handlePackageNotification:notification]; } queue:queue forMethod:method];