Refactor iOS packager webSocket handling to resemble Android's packagerconnection

Reviewed By: javache

Differential Revision: D4572607

fbshipit-source-id: b588d6216f7b84aef5a63454d2d8978783412c7b
This commit is contained in:
Lukas Piatkowski 2017-02-23 09:54:37 -08:00 committed by Facebook Github Bot
parent e11b9d832a
commit ccc525c5ca
12 changed files with 507 additions and 78 deletions

View File

@ -0,0 +1,31 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <React/RCTDefines.h>
#if RCT_DEV // Only supported in dev mode
@class RCTSRWebSocket;
@protocol RCTWebSocketProtocolDelegate
- (void)webSocket:(RCTSRWebSocket *)webSocket didReceiveMessage:(id)message;
@end
@interface RCTReconnectingWebSocket : NSObject
- (instancetype)initWithURL:(NSURL *)url;
@property (nonatomic, weak) id<RCTWebSocketProtocolDelegate> delegate;
- (void)start;
- (void)stop;
@end
#endif

View File

@ -0,0 +1,83 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTReconnectingWebSocket.h"
#import <React/RCTConvert.h>
#import <React/RCTDefines.h>
#import "RCTSRWebSocket.h"
#if RCT_DEV // Only supported in dev mode
@interface RCTReconnectingWebSocket () <RCTSRWebSocketDelegate>
@end
@implementation RCTReconnectingWebSocket {
NSURL *_url;
RCTSRWebSocket *_socket;
}
@synthesize delegate = _delegate;
- (instancetype)initWithURL:(NSURL *)url
{
if (self = [super init]) {
_url = url;
}
return self;
}
- (void)start
{
[self stop];
_socket = [[RCTSRWebSocket alloc] initWithURL:_url];
_socket.delegate = self;
[_socket open];
}
- (void)stop
{
_socket.delegate = nil;
[_socket closeWithCode:1000 reason:@"Invalidated"];
_socket = nil;
}
- (void)webSocket:(RCTSRWebSocket *)webSocket didReceiveMessage:(id)message
{
if (_delegate) {
[_delegate webSocket:webSocket didReceiveMessage:message];
}
}
- (void)reconnect
{
__weak RCTSRWebSocket *socket = _socket;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// Only reconnect if the observer wasn't stoppped while we were waiting
if (socket) {
[self start];
}
});
}
- (void)webSocket:(RCTSRWebSocket *)webSocket didFailWithError:(NSError *)error
{
[self reconnect];
}
- (void)webSocket:(RCTSRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean
{
[self reconnect];
}
@end
#endif

View File

@ -15,6 +15,8 @@
2D3B5F401D9B165B00451313 /* RCTWebSocketModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C86DF7B1ADF695F0047B81A /* RCTWebSocketModule.m */; };
3C86DF7C1ADF695F0047B81A /* RCTWebSocketModule.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C86DF7B1ADF695F0047B81A /* RCTWebSocketModule.m */; };
3DB9106F1C74B1ED00838BBE /* RCTWebSocketObserver.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DB9106E1C74B1ED00838BBE /* RCTWebSocketObserver.m */; };
A12E9E2E1E5DEC4E0029001B /* RCTReconnectingWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = A12E9E2D1E5DEC4E0029001B /* RCTReconnectingWebSocket.m */; };
A12E9E2F1E5DEC550029001B /* RCTReconnectingWebSocket.m in Sources */ = {isa = PBXBuildFile; fileRef = A12E9E2D1E5DEC4E0029001B /* RCTReconnectingWebSocket.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@ -28,12 +30,16 @@
3C86DF7B1ADF695F0047B81A /* RCTWebSocketModule.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = RCTWebSocketModule.m; sourceTree = "<group>"; tabWidth = 2; };
3DB9106D1C74B1ED00838BBE /* RCTWebSocketObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTWebSocketObserver.h; sourceTree = "<group>"; };
3DB9106E1C74B1ED00838BBE /* RCTWebSocketObserver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTWebSocketObserver.m; sourceTree = "<group>"; };
A12E9E2C1E5DEC4E0029001B /* RCTReconnectingWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTReconnectingWebSocket.h; sourceTree = "<group>"; };
A12E9E2D1E5DEC4E0029001B /* RCTReconnectingWebSocket.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTReconnectingWebSocket.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXGroup section */
3C86DF3D1ADF2C930047B81A = {
isa = PBXGroup;
children = (
A12E9E2C1E5DEC4E0029001B /* RCTReconnectingWebSocket.h */,
A12E9E2D1E5DEC4E0029001B /* RCTReconnectingWebSocket.m */,
1338BBDC1B04ACC80064A9C9 /* RCTSRWebSocket.h */,
1338BBDD1B04ACC80064A9C9 /* RCTSRWebSocket.m */,
1338BBDE1B04ACC80064A9C9 /* RCTWebSocketExecutor.h */,
@ -133,6 +139,7 @@
files = (
2D3B5F3E1D9B165B00451313 /* RCTWebSocketExecutor.m in Sources */,
2D3B5F401D9B165B00451313 /* RCTWebSocketModule.m in Sources */,
A12E9E2F1E5DEC550029001B /* RCTReconnectingWebSocket.m in Sources */,
2D3B5F3D1D9B165B00451313 /* RCTSRWebSocket.m in Sources */,
2D3B5F3F1D9B165B00451313 /* RCTWebSocketObserver.m in Sources */,
);
@ -144,6 +151,7 @@
files = (
1338BBE01B04ACC80064A9C9 /* RCTSRWebSocket.m in Sources */,
3C86DF7C1ADF695F0047B81A /* RCTWebSocketModule.m in Sources */,
A12E9E2E1E5DEC4E0029001B /* RCTReconnectingWebSocket.m in Sources */,
1338BBE11B04ACC80064A9C9 /* RCTWebSocketExecutor.m in Sources */,
3DB9106F1C74B1ED00838BBE /* RCTWebSocketObserver.m in Sources */,
);

View File

@ -14,42 +14,37 @@
#import <React/RCTLog.h>
#import <React/RCTUtils.h>
#import "RCTSRWebSocket.h"
#import "RCTReconnectingWebSocket.h"
#if RCT_DEV // Only supported in dev mode
@interface RCTWebSocketObserver () <RCTSRWebSocketDelegate>
@interface RCTWebSocketObserver () <RCTWebSocketProtocolDelegate>
@end
@implementation RCTWebSocketObserver {
NSURL *_url;
RCTSRWebSocket *_socket;
RCTReconnectingWebSocket *_socket;
}
@synthesize delegate = _delegate;
- (instancetype)initWithURL:(NSURL *)url
{
if ((self = [self init])) {
_url = url;
}
if (self = [super init]) {
_socket = [[RCTReconnectingWebSocket alloc] initWithURL:url];
_socket.delegate = self;
}
return self;
}
- (void)start
{
[self stop];
_socket = [[RCTSRWebSocket alloc] initWithURL:_url];
_socket.delegate = self;
[_socket open];
[_socket start];
}
- (void)stop
{
_socket.delegate = nil;
[_socket closeWithCode:1000 reason:@"Invalidated"];
_socket = nil;
[_socket stop];
}
- (void)webSocket:(RCTSRWebSocket *)webSocket didReceiveMessage:(id)message
@ -66,27 +61,6 @@
}
}
- (void)reconnect
{
__weak RCTSRWebSocket *socket = _socket;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// Only reconnect if the observer wasn't stoppped while we were waiting
if (socket) {
[self start];
}
});
}
- (void)webSocket:(RCTSRWebSocket *)webSocket didFailWithError:(NSError *)error
{
[self reconnect];
}
- (void)webSocket:(RCTSRWebSocket *)webSocket didCloseWithCode:(NSInteger)code reason:(NSString *)reason wasClean:(BOOL)wasClean
{
[self reconnect];
}
@end
#endif

View File

@ -0,0 +1,31 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <React/RCTDefines.h>
#import <React/RCTPackagerClientResponder.h>
#if RCT_DEV // Only supported in dev mode
@protocol RCTPackagerClientMethod
- (void)handleRequest:(id)params withResponder:(RCTPackagerClientResponder *)responder;
- (void)handleNotification:(id)params;
@end
@interface RCTPackagerClient : NSObject
- (instancetype)initWithURL:(NSURL *)url;
- (void)addHandler:(id<RCTPackagerClientMethod>)handler forMethod:(NSString *)name;
- (void)start;
- (void)stop;
@end
#endif

View File

@ -0,0 +1,103 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTPackagerClient.h"
#import <React/RCTConvert.h>
#import <React/RCTDefines.h>
#import <React/RCTLog.h>
#import <React/RCTReconnectingWebSocket.h>
#import <React/RCTSRWebSocket.h>
#import <React/RCTUtils.h>
#import "RCTPackagerClientResponder.h"
#if RCT_DEV // Only supported in dev mode
@interface RCTPackagerClient () <RCTWebSocketProtocolDelegate>
@end
@implementation RCTPackagerClient {
RCTReconnectingWebSocket *_socket;
NSMutableDictionary<NSString *, id<RCTPackagerClientMethod>> *_handlers;
}
- (instancetype)initWithURL:(NSURL *)url
{
if (self = [super init]) {
_socket = [[RCTReconnectingWebSocket alloc] initWithURL:url];
_socket.delegate = self;
_handlers = [NSMutableDictionary new];
}
return self;
}
- (void)addHandler:(id<RCTPackagerClientMethod>)handler forMethod:(NSString *)name
{
_handlers[name] = handler;
}
- (void)start
{
_socket.delegate = self;
[_socket start];
}
- (void)stop
{
[_socket stop];
}
- (BOOL)isSupportedVersion:(NSNumber *)version
{
NSArray<NSNumber *> *const kSupportedVersions = @[ @(RCT_PACKAGER_CLIENT_PROTOCOL_VERSION) ];
return [kSupportedVersions containsObject:version];
}
- (void)webSocket:(RCTSRWebSocket *)webSocket didReceiveMessage:(id)message
{
if (!_handlers) {
return;
}
NSError *error = nil;
NSDictionary<NSString *, id> *msg = RCTJSONParse(message, &error);
if (error) {
RCTLogError(@"%@ failed to parse message with error %@\n<message>\n%@\n</message>", [self class], error, msg);
return;
}
if (![self isSupportedVersion:msg[@"version"]]) {
RCTLogError(@"%@ received message with not supported version %@", [self class], msg[@"version"]);
return;
}
id<RCTPackagerClientMethod> methodHandler = _handlers[msg[@"method"]];
if (!methodHandler) {
if (msg[@"id"]) {
NSString *errorMsg = [NSString stringWithFormat:@"%@ no handler found for method %@", [self class], msg[@"method"]];
RCTLogError(errorMsg, msg[@"method"]);
[[[RCTPackagerClientResponder alloc] initWithId:msg[@"id"]
socket:webSocket] respondWithError:errorMsg];
}
return; // If it was a broadcast then we ignore it gracefully
}
if (msg[@"id"]) {
[methodHandler handleRequest:msg[@"params"]
withResponder:[[RCTPackagerClientResponder alloc] initWithId:msg[@"id"]
socket:webSocket]];
} else {
[methodHandler handleNotification:msg[@"params"]];
}
}
@end
#endif

View File

@ -0,0 +1,26 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <React/RCTDefines.h>
#if RCT_DEV // Only supported in dev mode
extern const int RCT_PACKAGER_CLIENT_PROTOCOL_VERSION;
@class RCTSRWebSocket;
@interface RCTPackagerClientResponder : NSObject
- (instancetype)initWithId:(id)msgId socket:(RCTSRWebSocket *)socket;
- (void)respondWithResult:(id)result;
- (void)respondWithError:(id)error;
@end
#endif

View File

@ -0,0 +1,67 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTPackagerClientResponder.h"
#import <React/RCTLog.h>
#import <React/RCTSRWebSocket.h>
#import <React/RCTUtils.h>
#if RCT_DEV // Only supported in dev mode
const int RCT_PACKAGER_CLIENT_PROTOCOL_VERSION = 2;
@implementation RCTPackagerClientResponder {
id _msgId;
__weak RCTSRWebSocket *_socket;
}
- (instancetype)initWithId:(id)msgId socket:(RCTSRWebSocket *)socket
{
if (self = [super init]) {
_msgId = msgId;
_socket = socket;
}
return self;
}
- (void)respondWithResult:(id)result
{
NSDictionary<NSString *, id> *msg = @{
@"version": @(RCT_PACKAGER_CLIENT_PROTOCOL_VERSION),
@"id": _msgId,
@"result": result,
};
NSError *jsError = nil;
NSString *message = RCTJSONStringify(msg, &jsError);
if (jsError) {
RCTLogError(@"%@ failed to stringify message with error %@", [self class], jsError);
} else {
[_socket send:message];
}
}
- (void)respondWithError:(id)error
{
NSDictionary<NSString *, id> *msg = @{
@"version": @(RCT_PACKAGER_CLIENT_PROTOCOL_VERSION),
@"id": _msgId,
@"error": error,
};
NSError *jsError = nil;
NSString *message = RCTJSONStringify(msg, &jsError);
if (jsError) {
RCTLogError(@"%@ failed to stringify message with error %@", [self class], jsError);
} else {
[_socket send:message];
}
}
@end
#endif

View File

@ -0,0 +1,21 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <React/RCTBridge.h>
#import <React/RCTPackagerClient.h>
#if RCT_DEV // Only supported in dev mode
@interface RCTReloadPackagerMethod : NSObject<RCTPackagerClientMethod>
- (instancetype)initWithBridge:(RCTBridge *)bridge;
@end
#endif

View File

@ -0,0 +1,43 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTReloadPackagerMethod.h"
#import <objc/runtime.h>
#if RCT_DEV // Only supported in dev mode
@implementation RCTReloadPackagerMethod {
__weak RCTBridge *_bridge;
}
- (instancetype)initWithBridge:(RCTBridge *)bridge
{
if (self = [super init]) {
_bridge = bridge;
}
return self;
}
- (void)handleRequest:(id)params withResponder:(RCTPackagerClientResponder *)responder
{
[responder respondWithError:[NSString stringWithFormat: @"%@ does not support onRequest", [self class]]];
}
- (void)handleNotification:(id)params
{
if (![params isEqual:[NSNull null]] && [params[@"debug"] boolValue]) {
_bridge.executorClass = objc_lookUpClass("RCTWebSocketExecutor");
}
[_bridge reload];
}
@end
#endif

View File

@ -22,10 +22,11 @@
#import "RCTEventDispatcher.h"
#import "RCTKeyCommands.h"
#import "RCTLog.h"
#import "RCTPackagerClient.h"
#import "RCTProfile.h"
#import "RCTReloadPackagerMethod.h"
#import "RCTRootView.h"
#import "RCTUtils.h"
#import "RCTWebSocketObserverProtocol.h"
#if RCT_DEV
@ -136,7 +137,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
typedef void(^RCTDevMenuAlertActionHandler)(UIAlertAction *action);
@interface RCTDevMenu () <RCTBridgeModule, RCTInvalidating, RCTWebSocketObserverDelegate>
@interface RCTDevMenu () <RCTBridgeModule, RCTInvalidating>
@property (nonatomic, strong) Class executorClass;
@ -282,53 +283,26 @@ RCT_EXPORT_MODULE()
return;
}
Class webSocketObserverClass = objc_lookUpClass("RCTWebSocketObserver");
if (webSocketObserverClass == Nil) {
return;
}
// If multiple RCTDevMenus are created, the most recently connected one steals the RCTWebSocketObserver.
// (Why this behavior exists is beyond me, as of this writing.)
static NSMutableDictionary<NSString *, id<RCTWebSocketObserver>> *observers = nil;
if (observers == nil) {
observers = [NSMutableDictionary new];
// The jsPackagerClient is a static map that holds different packager clients per the packagerURL
// In case many instances of DevMenu are created, the latest instance that use the same URL as
// previous instances will override given packager client's method handlers
static NSMutableDictionary<NSString *, RCTPackagerClient *> *jsPackagerClients = nil;
if (jsPackagerClients == nil) {
jsPackagerClients = [NSMutableDictionary new];
}
NSString *key = [url absoluteString];
id<RCTWebSocketObserver> existingObserver = observers[key];
if (existingObserver) {
existingObserver.delegate = self;
RCTPackagerClient *packagerClient = jsPackagerClients[key];
if (!packagerClient) {
packagerClient = [[RCTPackagerClient alloc] initWithURL:url];
jsPackagerClients[key] = packagerClient;
} else {
id<RCTWebSocketObserver> newObserver = [(id<RCTWebSocketObserver>)[webSocketObserverClass alloc] initWithURL:url];
newObserver.delegate = self;
[newObserver start];
observers[key] = newObserver;
[packagerClient stop];
}
}
- (BOOL)isSupportedVersion:(NSNumber *)version
{
NSArray<NSNumber *> *const kSupportedVersions = @[ @2 ];
return [kSupportedVersions containsObject:version];
}
- (void)didReceiveWebSocketMessage:(NSDictionary<NSString *, id> *)message
{
if ([self isSupportedVersion:message[@"version"]]) {
[self processMethod:message[@"method"] params:message[@"params"]];
}
}
- (void)processMethod:(NSString *)method params:(NSDictionary<NSString *, id> *)params
{
if ([method isEqualToString:@"reload"]) {
if (![params isEqual:[NSNull null]] && [params[@"debug"] boolValue]) {
_bridge.executorClass = objc_lookUpClass("RCTWebSocketExecutor");
}
[_bridge reload];
}
[packagerClient addHandler:[[RCTReloadPackagerMethod alloc] initWithBridge:_bridge]
forMethod:@"reload"];
[packagerClient start];
}
- (dispatch_queue_t)methodQueue

View File

@ -731,6 +731,24 @@
83CBBACC1A6023D300E9B192 /* RCTConvert.m in Sources */ = {isa = PBXBuildFile; fileRef = 83CBBACB1A6023D300E9B192 /* RCTConvert.m */; };
945929C41DD62ADD00653A7D /* RCTConvert+Transform.m in Sources */ = {isa = PBXBuildFile; fileRef = 945929C31DD62ADD00653A7D /* RCTConvert+Transform.m */; };
945929C51DD62ADD00653A7D /* RCTConvert+Transform.m in Sources */ = {isa = PBXBuildFile; fileRef = 945929C31DD62ADD00653A7D /* RCTConvert+Transform.m */; };
A12E9E1B1E5DEA350029001B /* RCTPackagerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A12E9E171E5DEA350029001B /* RCTPackagerClient.h */; };
A12E9E1C1E5DEA350029001B /* RCTPackagerClient.m in Sources */ = {isa = PBXBuildFile; fileRef = A12E9E181E5DEA350029001B /* RCTPackagerClient.m */; };
A12E9E1D1E5DEA350029001B /* RCTPackagerClientResponder.h in Headers */ = {isa = PBXBuildFile; fileRef = A12E9E191E5DEA350029001B /* RCTPackagerClientResponder.h */; };
A12E9E1E1E5DEA350029001B /* RCTPackagerClientResponder.m in Sources */ = {isa = PBXBuildFile; fileRef = A12E9E1A1E5DEA350029001B /* RCTPackagerClientResponder.m */; };
A12E9E1F1E5DEAEF0029001B /* RCTPackagerClient.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = A12E9E171E5DEA350029001B /* RCTPackagerClient.h */; };
A12E9E201E5DEAEF0029001B /* RCTPackagerClientResponder.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = A12E9E191E5DEA350029001B /* RCTPackagerClientResponder.h */; };
A12E9E211E5DEAFB0029001B /* RCTPackagerClient.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = A12E9E171E5DEA350029001B /* RCTPackagerClient.h */; };
A12E9E221E5DEAFB0029001B /* RCTPackagerClientResponder.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = A12E9E191E5DEA350029001B /* RCTPackagerClientResponder.h */; };
A12E9E231E5DEB160029001B /* RCTPackagerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = A12E9E171E5DEA350029001B /* RCTPackagerClient.h */; };
A12E9E241E5DEB160029001B /* RCTPackagerClientResponder.h in Headers */ = {isa = PBXBuildFile; fileRef = A12E9E191E5DEA350029001B /* RCTPackagerClientResponder.h */; };
A12E9E251E5DEB4D0029001B /* RCTPackagerClient.m in Sources */ = {isa = PBXBuildFile; fileRef = A12E9E181E5DEA350029001B /* RCTPackagerClient.m */; };
A12E9E261E5DEB510029001B /* RCTPackagerClientResponder.m in Sources */ = {isa = PBXBuildFile; fileRef = A12E9E1A1E5DEA350029001B /* RCTPackagerClientResponder.m */; };
A12E9E2A1E5DEB860029001B /* RCTReconnectingWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = A12E9E281E5DEB860029001B /* RCTReconnectingWebSocket.h */; };
A12E9E2B1E5DEB860029001B /* RCTSRWebSocket.h in Headers */ = {isa = PBXBuildFile; fileRef = A12E9E291E5DEB860029001B /* RCTSRWebSocket.h */; };
A12E9E5A1E5DF8600029001B /* RCTReloadPackagerMethod.h in Headers */ = {isa = PBXBuildFile; fileRef = A12E9E581E5DF8600029001B /* RCTReloadPackagerMethod.h */; };
A12E9E5B1E5DF8600029001B /* RCTReloadPackagerMethod.m in Sources */ = {isa = PBXBuildFile; fileRef = A12E9E591E5DF8600029001B /* RCTReloadPackagerMethod.m */; };
A12E9E5C1E5DF86F0029001B /* RCTReloadPackagerMethod.h in Headers */ = {isa = PBXBuildFile; fileRef = A12E9E581E5DF8600029001B /* RCTReloadPackagerMethod.h */; };
A12E9E5D1E5DF8720029001B /* RCTReloadPackagerMethod.m in Sources */ = {isa = PBXBuildFile; fileRef = A12E9E591E5DF8600029001B /* RCTReloadPackagerMethod.m */; };
A2440AA21DF8D854006E7BFC /* RCTReloadCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = A2440AA01DF8D854006E7BFC /* RCTReloadCommand.h */; };
A2440AA31DF8D854006E7BFC /* RCTReloadCommand.m in Sources */ = {isa = PBXBuildFile; fileRef = A2440AA11DF8D854006E7BFC /* RCTReloadCommand.m */; };
A2440AA41DF8D865006E7BFC /* RCTReloadCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = A2440AA01DF8D854006E7BFC /* RCTReloadCommand.h */; };
@ -799,6 +817,8 @@
dstPath = include/React;
dstSubfolderSpec = 16;
files = (
A12E9E211E5DEAFB0029001B /* RCTPackagerClient.h in Copy Headers */,
A12E9E221E5DEAFB0029001B /* RCTPackagerClientResponder.h in Copy Headers */,
3D5AC71D1E00572F000F9153 /* RCTTVView.h in Copy Headers */,
3D5AC71B1E005723000F9153 /* RCTReloadCommand.h in Copy Headers */,
3D5AC71C1E005723000F9153 /* RCTTVNavigationEventEmitter.h in Copy Headers */,
@ -964,6 +984,8 @@
dstPath = include/React;
dstSubfolderSpec = 16;
files = (
A12E9E1F1E5DEAEF0029001B /* RCTPackagerClient.h in Copy Headers */,
A12E9E201E5DEAEF0029001B /* RCTPackagerClientResponder.h in Copy Headers */,
3D80D91F1DF6FA890028D040 /* RCTImageLoader.h in Copy Headers */,
3D80D9201DF6FA890028D040 /* RCTImageStoreManager.h in Copy Headers */,
3D80D9211DF6FA890028D040 /* RCTResizeMode.h in Copy Headers */,
@ -1373,6 +1395,14 @@
83F15A171B7CC46900F10295 /* UIView+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+Private.h"; sourceTree = "<group>"; };
945929C21DD62ADD00653A7D /* RCTConvert+Transform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RCTConvert+Transform.h"; sourceTree = "<group>"; };
945929C31DD62ADD00653A7D /* RCTConvert+Transform.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "RCTConvert+Transform.m"; sourceTree = "<group>"; };
A12E9E171E5DEA350029001B /* RCTPackagerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTPackagerClient.h; path = DevSupport/RCTPackagerClient.h; sourceTree = "<group>"; };
A12E9E181E5DEA350029001B /* RCTPackagerClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RCTPackagerClient.m; path = DevSupport/RCTPackagerClient.m; sourceTree = "<group>"; };
A12E9E191E5DEA350029001B /* RCTPackagerClientResponder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTPackagerClientResponder.h; path = DevSupport/RCTPackagerClientResponder.h; sourceTree = "<group>"; };
A12E9E1A1E5DEA350029001B /* RCTPackagerClientResponder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RCTPackagerClientResponder.m; path = DevSupport/RCTPackagerClientResponder.m; sourceTree = "<group>"; };
A12E9E281E5DEB860029001B /* RCTReconnectingWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTReconnectingWebSocket.h; path = WebSocket/RCTReconnectingWebSocket.h; sourceTree = "<group>"; };
A12E9E291E5DEB860029001B /* RCTSRWebSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTSRWebSocket.h; path = WebSocket/RCTSRWebSocket.h; sourceTree = "<group>"; };
A12E9E581E5DF8600029001B /* RCTReloadPackagerMethod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RCTReloadPackagerMethod.h; path = DevSupport/RCTReloadPackagerMethod.h; sourceTree = "<group>"; };
A12E9E591E5DF8600029001B /* RCTReloadPackagerMethod.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RCTReloadPackagerMethod.m; path = DevSupport/RCTReloadPackagerMethod.m; sourceTree = "<group>"; };
A2440AA01DF8D854006E7BFC /* RCTReloadCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RCTReloadCommand.h; sourceTree = "<group>"; };
A2440AA11DF8D854006E7BFC /* RCTReloadCommand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RCTReloadCommand.m; sourceTree = "<group>"; };
AC70D2E81DE489E4002E6351 /* RCTJavaScriptLoader.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RCTJavaScriptLoader.mm; sourceTree = "<group>"; };
@ -1633,6 +1663,7 @@
3D1FA0891DE4F4B900E03CC6 /* LinkingIOS */,
3D1FA0791DE4F2D200E03CC6 /* Network */,
3D1FA08A1DE4F4D600E03CC6 /* PushNotificationIOS */,
A12E9E271E5DEB600029001B /* WebSocket */,
);
name = Libraries;
path = ../Libraries;
@ -1714,6 +1745,7 @@
isa = PBXGroup;
children = (
83CBBA491A601E3B00E9B192 /* Base */,
A12E9E161E5DEA260029001B /* DevSupport */,
134FCB381A6E7F0800051CC8 /* Executors */,
13B07FE01A69315300A75B9A /* Modules */,
1450FF7F1BCFF28A00208362 /* Profiler */,
@ -1798,6 +1830,28 @@
path = Base;
sourceTree = "<group>";
};
A12E9E161E5DEA260029001B /* DevSupport */ = {
isa = PBXGroup;
children = (
A12E9E171E5DEA350029001B /* RCTPackagerClient.h */,
A12E9E181E5DEA350029001B /* RCTPackagerClient.m */,
A12E9E581E5DF8600029001B /* RCTReloadPackagerMethod.h */,
A12E9E591E5DF8600029001B /* RCTReloadPackagerMethod.m */,
A12E9E191E5DEA350029001B /* RCTPackagerClientResponder.h */,
A12E9E1A1E5DEA350029001B /* RCTPackagerClientResponder.m */,
);
name = DevSupport;
sourceTree = "<group>";
};
A12E9E271E5DEB600029001B /* WebSocket */ = {
isa = PBXGroup;
children = (
A12E9E281E5DEB860029001B /* RCTReconnectingWebSocket.h */,
A12E9E291E5DEB860029001B /* RCTSRWebSocket.h */,
);
name = WebSocket;
sourceTree = "<group>";
};
AC70D2EA1DE489FC002E6351 /* cxxreact */ = {
isa = PBXGroup;
children = (
@ -1815,6 +1869,8 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
A12E9E231E5DEB160029001B /* RCTPackagerClient.h in Headers */,
A12E9E241E5DEB160029001B /* RCTPackagerClientResponder.h in Headers */,
3D302F241DF828F800D6DDAE /* RCTImageLoader.h in Headers */,
3D302F251DF828F800D6DDAE /* RCTImageStoreManager.h in Headers */,
3D302F261DF828F800D6DDAE /* RCTResizeMode.h in Headers */,
@ -1870,6 +1926,7 @@
3D302F561DF828F800D6DDAE /* RCTAlertManager.h in Headers */,
3D302F571DF828F800D6DDAE /* RCTAppState.h in Headers */,
3D302F581DF828F800D6DDAE /* RCTAsyncLocalStorage.h in Headers */,
A12E9E5C1E5DF86F0029001B /* RCTReloadPackagerMethod.h in Headers */,
3D302F591DF828F800D6DDAE /* RCTClipboard.h in Headers */,
3D302F5A1DF828F800D6DDAE /* RCTDevLoadingView.h in Headers */,
3D302F5B1DF828F800D6DDAE /* RCTDevMenu.h in Headers */,
@ -2017,8 +2074,10 @@
3D80DA231DF820620028D040 /* RCTBridgeDelegate.h in Headers */,
3D80DA241DF820620028D040 /* RCTBridgeMethod.h in Headers */,
3D80DA251DF820620028D040 /* RCTBridgeModule.h in Headers */,
A12E9E1D1E5DEA350029001B /* RCTPackagerClientResponder.h in Headers */,
3D80DA261DF820620028D040 /* RCTBundleURLProvider.h in Headers */,
3D80DA271DF820620028D040 /* RCTConvert.h in Headers */,
A12E9E1B1E5DEA350029001B /* RCTPackagerClient.h in Headers */,
3D80DA281DF820620028D040 /* RCTDefines.h in Headers */,
3D80DA291DF820620028D040 /* RCTDisplayLink.h in Headers */,
3D80DA2A1DF820620028D040 /* RCTErrorCustomizer.h in Headers */,
@ -2029,6 +2088,8 @@
3D80DA2E1DF820620028D040 /* RCTImageSource.h in Headers */,
3D80DA2F1DF820620028D040 /* RCTInvalidating.h in Headers */,
3D80DA301DF820620028D040 /* RCTJavaScriptExecutor.h in Headers */,
A12E9E5A1E5DF8600029001B /* RCTReloadPackagerMethod.h in Headers */,
A12E9E2A1E5DEB860029001B /* RCTReconnectingWebSocket.h in Headers */,
3D80DA311DF820620028D040 /* RCTJavaScriptLoader.h in Headers */,
3D80DA321DF820620028D040 /* RCTJSStackFrame.h in Headers */,
3D80DA331DF820620028D040 /* RCTKeyCommands.h in Headers */,
@ -2072,6 +2133,7 @@
3D80DA5A1DF820620028D040 /* RCTUIManager.h in Headers */,
3D80DA5B1DF820620028D040 /* RCTFPSGraph.h in Headers */,
3D80DA5C1DF820620028D040 /* RCTJSCProfiler.h in Headers */,
A12E9E2B1E5DEB860029001B /* RCTSRWebSocket.h in Headers */,
3D80DA5D1DF820620028D040 /* RCTMacros.h in Headers */,
3D80DA5E1DF820620028D040 /* RCTProfile.h in Headers */,
3D80DA5F1DF820620028D040 /* RCTActivityIndicatorView.h in Headers */,
@ -2419,6 +2481,7 @@
2D3B5E9B1D9B08A000451313 /* RCTFrameUpdate.m in Sources */,
2D3B5EE41D9B09BB00451313 /* RCTSegmentedControlManager.m in Sources */,
2D3B5EE31D9B09B700451313 /* RCTSegmentedControl.m in Sources */,
A12E9E251E5DEB4D0029001B /* RCTPackagerClient.m in Sources */,
2D3B5EB71D9B091800451313 /* RCTRedBox.m in Sources */,
2D3B5ED11D9B097500451313 /* RCTMapAnnotation.m in Sources */,
2D3B5EAF1D9B08FB00451313 /* RCTAccessibilityManager.m in Sources */,
@ -2443,6 +2506,7 @@
2D3B5EB11D9B090100451313 /* RCTAppState.m in Sources */,
2D3B5EC21D9B093B00451313 /* RCTProfile.m in Sources */,
2D3B5ECB1D9B096200451313 /* RCTConvert+CoreLocation.m in Sources */,
A12E9E261E5DEB510029001B /* RCTPackagerClientResponder.m in Sources */,
2D3B5EEE1D9B09DA00451313 /* RCTView.m in Sources */,
594AD5D01E46D87500B07237 /* RCTScrollContentShadowView.m in Sources */,
2D3B5ECC1D9B096500451313 /* RCTConvert+MapKit.m in Sources */,
@ -2461,6 +2525,7 @@
3DCD185D1DF978E7007FE5A1 /* RCTReloadCommand.m in Sources */,
2D3B5EC61D9B095000451313 /* RCTProfileTrampoline-x86_64.S in Sources */,
594AD5D41E46D87500B07237 /* RCTScrollContentViewManager.m in Sources */,
A12E9E5D1E5DF8720029001B /* RCTReloadPackagerMethod.m in Sources */,
3D5AC71A1E0056E0000F9153 /* RCTTVNavigationEventEmitter.m in Sources */,
3D7A27E31DE325DA002E3F95 /* RCTJSCErrorHandling.mm in Sources */,
2D3B5ED01D9B097200451313 /* RCTMap.m in Sources */,
@ -2568,6 +2633,7 @@
13BCE8091C99CB9D00DD7AAD /* RCTRootShadowView.m in Sources */,
14C2CA711B3AC63800E6CBB2 /* RCTModuleMethod.m in Sources */,
006FC4141D9B20820057AAAD /* RCTMultipartDataTask.m in Sources */,
A12E9E1C1E5DEA350029001B /* RCTPackagerClient.m in Sources */,
13CC8A821B17642100940AE7 /* RCTBorderDrawing.m in Sources */,
83CBBA511A601E3B00E9B192 /* RCTAssert.m in Sources */,
13AF20451AE707F9005F5298 /* RCTSlider.m in Sources */,
@ -2615,6 +2681,7 @@
13A6E20E1C19AA0C00845B82 /* RCTParserUtils.m in Sources */,
13E067571A70F44B002CDEE1 /* RCTView.m in Sources */,
3D7749441DC1065C007EC8D8 /* RCTPlatform.m in Sources */,
A12E9E1E1E5DEA350029001B /* RCTPackagerClientResponder.m in Sources */,
13AFBCA01C07247D00BBAEAA /* RCTMapOverlay.m in Sources */,
13D9FEEE1CDCD93000158BD7 /* RCTKeyboardObserver.m in Sources */,
B233E6EA1D2D845D00BC68BA /* RCTI18nManager.m in Sources */,
@ -2644,6 +2711,7 @@
14435CE51AAC4AE100FC20F4 /* RCTMap.m in Sources */,
13B0801C1A69489C00A75B9A /* RCTNavItem.m in Sources */,
83CBBA691A601EF300E9B192 /* RCTEventDispatcher.m in Sources */,
A12E9E5B1E5DF8600029001B /* RCTReloadPackagerMethod.m in Sources */,
83A1FE8F1B62643A00BE0E65 /* RCTModalHostViewManager.m in Sources */,
13E0674A1A70F434002CDEE1 /* RCTUIManager.m in Sources */,
391E86A41C623EC800009732 /* RCTTouchEvent.m in Sources */,