Remove deprecated RCTReloadNotification
Reviewed By: adamjernst Differential Revision: D4294180 fbshipit-source-id: 6837597df2a798661c993c6f63ec430989954de6
This commit is contained in:
parent
59407f3660
commit
286a1b2e5e
|
@ -20,12 +20,6 @@
|
||||||
@class RCTEventDispatcher;
|
@class RCTEventDispatcher;
|
||||||
@class RCTPerformanceLogger;
|
@class RCTPerformanceLogger;
|
||||||
|
|
||||||
/**
|
|
||||||
* This notification triggers a reload of all bridges currently running.
|
|
||||||
* Deprecated, use RCTBridge::requestReload instead.
|
|
||||||
*/
|
|
||||||
RCT_EXTERN NSString *const RCTReloadNotification DEPRECATED_ATTRIBUTE;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This notification fires when the bridge starts loading the JS bundle.
|
* This notification fires when the bridge starts loading the JS bundle.
|
||||||
*/
|
*/
|
||||||
|
@ -203,7 +197,7 @@ RCT_EXTERN NSString *RCTBridgeModuleNameForClass(Class bridgeModuleClass);
|
||||||
/**
|
/**
|
||||||
* Inform the bridge, and anything subscribing to it, that it should reload.
|
* Inform the bridge, and anything subscribing to it, that it should reload.
|
||||||
*/
|
*/
|
||||||
- (void)requestReload;
|
- (void)requestReload __deprecated_msg("Call reload instead");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Says whether bridge has started recieving calls from javascript.
|
* Says whether bridge has started recieving calls from javascript.
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
#import "RCTProfile.h"
|
#import "RCTProfile.h"
|
||||||
#import "RCTUtils.h"
|
#import "RCTUtils.h"
|
||||||
|
|
||||||
NSString *const RCTReloadNotification = @"RCTReloadNotification";
|
|
||||||
NSString *const RCTJavaScriptWillStartLoadingNotification = @"RCTJavaScriptWillStartLoadingNotification";
|
NSString *const RCTJavaScriptWillStartLoadingNotification = @"RCTJavaScriptWillStartLoadingNotification";
|
||||||
NSString *const RCTJavaScriptDidLoadNotification = @"RCTJavaScriptDidLoadNotification";
|
NSString *const RCTJavaScriptDidLoadNotification = @"RCTJavaScriptDidLoadNotification";
|
||||||
NSString *const RCTJavaScriptDidFailToLoadNotification = @"RCTJavaScriptDidFailToLoadNotification";
|
NSString *const RCTJavaScriptDidFailToLoadNotification = @"RCTJavaScriptDidFailToLoadNotification";
|
||||||
|
@ -200,7 +199,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||||
* This runs only on the main thread, but crashes the subclass
|
* This runs only on the main thread, but crashes the subclass
|
||||||
* RCTAssertMainQueue();
|
* RCTAssertMainQueue();
|
||||||
*/
|
*/
|
||||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
|
||||||
[self invalidate];
|
[self invalidate];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +214,7 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||||
[commands registerKeyCommandWithInput:@"r"
|
[commands registerKeyCommandWithInput:@"r"
|
||||||
modifierFlags:UIKeyModifierCommand
|
modifierFlags:UIKeyModifierCommand
|
||||||
action:^(__unused UIKeyCommand *command) {
|
action:^(__unused UIKeyCommand *command) {
|
||||||
[weakSelf requestReload];
|
[weakSelf reload];
|
||||||
}];
|
}];
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -273,7 +271,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
|
||||||
|
|
||||||
- (void)requestReload
|
- (void)requestReload
|
||||||
{
|
{
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:RCTReloadNotification object:self];
|
|
||||||
[self reload];
|
[self reload];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -563,7 +563,7 @@ RCT_EXPORT_METHOD(show)
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(reload)
|
RCT_EXPORT_METHOD(reload)
|
||||||
{
|
{
|
||||||
[_bridge requestReload];
|
[_bridge reload];
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(debugRemotely:(BOOL)enableDebug)
|
RCT_EXPORT_METHOD(debugRemotely:(BOOL)enableDebug)
|
||||||
|
|
|
@ -56,7 +56,7 @@ RCT_EXPORT_METHOD(reportFatalException:(NSString *)message
|
||||||
static NSUInteger reloadRetries = 0;
|
static NSUInteger reloadRetries = 0;
|
||||||
if (!RCT_DEBUG && reloadRetries < _maxReloadAttempts) {
|
if (!RCT_DEBUG && reloadRetries < _maxReloadAttempts) {
|
||||||
reloadRetries++;
|
reloadRetries++;
|
||||||
[_bridge requestReload];
|
[_bridge reload];
|
||||||
} else {
|
} else {
|
||||||
NSString *description = [@"Unhandled JS Exception: " stringByAppendingString:message];
|
NSString *description = [@"Unhandled JS Exception: " stringByAppendingString:message];
|
||||||
NSDictionary *errorInfo = @{ NSLocalizedDescriptionKey: description, RCTJSStackTraceKey: stack };
|
NSDictionary *errorInfo = @{ NSLocalizedDescriptionKey: description, RCTJSStackTraceKey: stack };
|
||||||
|
|
|
@ -451,8 +451,9 @@ RCT_EXPORT_METHOD(dismiss)
|
||||||
[[[NSURLSession sharedSession] dataTaskWithRequest:request] resume];
|
[[[NSURLSession sharedSession] dataTaskWithRequest:request] resume];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)reloadFromRedBoxWindow:(__unused RCTRedBoxWindow *)redBoxWindow {
|
- (void)reloadFromRedBoxWindow:(__unused RCTRedBoxWindow *)redBoxWindow
|
||||||
[_bridge requestReload];
|
{
|
||||||
|
[_bridge reload];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
#import "RCTProfile.h"
|
#import "RCTProfile.h"
|
||||||
|
|
||||||
#import <dlfcn.h>
|
#import <dlfcn.h>
|
||||||
|
|
||||||
#import <libkern/OSAtomic.h>
|
#import <libkern/OSAtomic.h>
|
||||||
#import <mach/mach.h>
|
#import <mach/mach.h>
|
||||||
#import <objc/message.h>
|
#import <objc/message.h>
|
||||||
|
@ -19,15 +18,15 @@
|
||||||
#import <UIKit/UIKit.h>
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
#import "RCTAssert.h"
|
#import "RCTAssert.h"
|
||||||
#import "RCTBridge.h"
|
|
||||||
#import "RCTBridge+Private.h"
|
#import "RCTBridge+Private.h"
|
||||||
|
#import "RCTBridge.h"
|
||||||
#import "RCTComponentData.h"
|
#import "RCTComponentData.h"
|
||||||
#import "RCTDefines.h"
|
#import "RCTDefines.h"
|
||||||
|
#import "RCTJSCExecutor.h"
|
||||||
#import "RCTLog.h"
|
#import "RCTLog.h"
|
||||||
#import "RCTModuleData.h"
|
#import "RCTModuleData.h"
|
||||||
#import "RCTUtils.h"
|
|
||||||
#import "RCTUIManager.h"
|
#import "RCTUIManager.h"
|
||||||
#import "RCTJSCExecutor.h"
|
#import "RCTUtils.h"
|
||||||
|
|
||||||
NSString *const RCTProfileDidStartProfiling = @"RCTProfileDidStartProfiling";
|
NSString *const RCTProfileDidStartProfiling = @"RCTProfileDidStartProfiling";
|
||||||
NSString *const RCTProfileDidEndProfiling = @"RCTProfileDidEndProfiling";
|
NSString *const RCTProfileDidEndProfiling = @"RCTProfileDidEndProfiling";
|
||||||
|
@ -363,7 +362,7 @@ void RCTProfileUnhookModules(RCTBridge *bridge)
|
||||||
|
|
||||||
+ (void)reload
|
+ (void)reload
|
||||||
{
|
{
|
||||||
[RCTProfilingBridge() requestReload];
|
[RCTProfilingBridge() reload];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (void)toggle:(UIButton *)target
|
+ (void)toggle:(UIButton *)target
|
||||||
|
|
Loading…
Reference in New Issue