mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Fixes current CI failures and allows tree shaking of native dev support code.
Summary: * The dev support code moved into a `DevSupport` subspec, meaning that only if the subspec is specified in the user’s Podfile will the packager client, dev menu, etc be included. This is mainly done through checks for header availability. It also improves the weird situation where you had to specify the `RCTWebSocket` subspec if you wanted to be able to use the packager client during development. * I removed hardcoding the release version in the podspec on release, because the podspec still relies on `package.json` when evaluating, so there’s no real point in not also getting the version number from there. This should remove any requirement to perform maintenance of the OSS release script regarding the podspec. Closes https://github.com/facebook/react-native/pull/12602 Differential Revision: D4621021 Pulled By: ericvicenti fbshipit-source-id: 6c208371fc40ea607809a6ab05dd3714ed9980cf
This commit is contained in:
committed by
Facebook Github Bot
parent
24a7665df5
commit
19caaba1d5
@@ -14,7 +14,6 @@
|
||||
#import "RCTBridge.h"
|
||||
#import "RCTBridgeMethod.h"
|
||||
#import "RCTConvert.h"
|
||||
#import "RCTDevLoadingView.h"
|
||||
#import "RCTDisplayLink.h"
|
||||
#import "RCTJSCExecutor.h"
|
||||
#import "RCTJavaScriptLoader.h"
|
||||
@@ -25,6 +24,10 @@
|
||||
#import "RCTRedBox.h"
|
||||
#import "RCTUtils.h"
|
||||
|
||||
#if RCT_DEV && __has_include("RCTDevLoadingView.h")
|
||||
#import "RCTDevLoadingView.h"
|
||||
#endif
|
||||
|
||||
#define RCTAssertJSThread() \
|
||||
RCTAssert(![NSStringFromClass([self->_javaScriptExecutor class]) isEqualToString:@"RCTJSCExecutor"] || \
|
||||
[[[NSThread currentThread] name] isEqualToString:RCTJSCThreadName], \
|
||||
@@ -116,7 +119,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithDelegate:(id<RCTBridgeDelegate>)dele
|
||||
sourceCode = source;
|
||||
dispatch_group_leave(initModulesAndLoadSource);
|
||||
} onProgress:^(RCTLoadingProgress *progressData) {
|
||||
#ifdef RCT_DEV
|
||||
#if RCT_DEV && __has_include("RCTDevLoadingView.h")
|
||||
RCTDevLoadingView *loadingView = [weakSelf moduleForClass:[RCTDevLoadingView class]];
|
||||
[loadingView updateProgress:progressData];
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user