From c09d509c2b8a5a02701829e1f0ace8081ce64277 Mon Sep 17 00:00:00 2001 From: Sho Ikeda Date: Thu, 24 May 2018 12:37:32 -0700 Subject: [PATCH] Fix CocoaPods integration without DevSupport subspec Summary: This is the thing which is handled in https://github.com/orta/cocoapods-fix-react-native today. https://github.com/orta/cocoapods-fix-react-native/blob/89a78ad34950b5d6b3de657914c8ced8bf37ee8e/lib/cocoapods-fix-react-native/versions/0_55_3-post.rb#L140-L164 This should be the correct fix for #17799. Integrating React Native into an existing iOS project using CocoaPods without `DevSupport` subspec and seeing if the project successfully compiles. [IOS] [BUGFIX] [DevSupport] - Fix CocoaPods integration without DevSupport subspec Closes https://github.com/facebook/react-native/pull/19265 Differential Revision: D8149786 Pulled By: hramos fbshipit-source-id: c665e463b76aacdfb2022e82e36eb381d2d9ff2b --- React/Modules/RCTDevSettings.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/React/Modules/RCTDevSettings.mm b/React/Modules/RCTDevSettings.mm index db61029d8ae892..684e5d2238f2e0 100644 --- a/React/Modules/RCTDevSettings.mm +++ b/React/Modules/RCTDevSettings.mm @@ -18,7 +18,6 @@ #import "RCTEventDispatcher.h" #import "RCTJSCSamplingProfiler.h" #import "RCTLog.h" -#import "RCTPackagerClient.h" #import "RCTProfile.h" #import "RCTUtils.h" @@ -35,6 +34,7 @@ static NSString *const kRCTDevSettingsUserDefaultsKey = @"RCTDevMenu"; #if ENABLE_PACKAGER_CONNECTION +#import "RCTPackagerClient.h" #import "RCTPackagerConnection.h" #endif @@ -201,6 +201,7 @@ - (void)setBridge:(RCTBridge *)bridge #endif } +#if ENABLE_PACKAGER_CONNECTION static void pokeSamplingProfiler(RCTBridge *const bridge, RCTPackagerClientResponder *const responder) { if (!bridge) { @@ -224,6 +225,7 @@ static void pokeSamplingProfiler(RCTBridge *const bridge, RCTPackagerClientRespo [responder respondWithResult:results]; } } +#endif - (dispatch_queue_t)methodQueue {