2019-10-16 20:03:47 +03:00
|
|
|
/*
|
2018-09-12 01:27:47 +03:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2016-12-08 07:04:33 +03:00
|
|
|
*
|
2018-02-17 05:24:55 +03:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2016-12-08 07:04:33 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
|
|
|
#import <React/RCTDefines.h>
|
|
|
|
|
2019-10-30 22:20:29 +03:00
|
|
|
/**
|
|
|
|
* A protocol which should be conformed to in order to be notified of RN reload events. These events can be
|
|
|
|
* created by CMD+R or dev menu during development, or anywhere the trigger is exposed to JS.
|
|
|
|
* The listener must also register itself using the method below.
|
|
|
|
*/
|
2016-12-08 07:04:33 +03:00
|
|
|
@protocol RCTReloadListener
|
|
|
|
- (void)didReceiveReloadCommand;
|
|
|
|
@end
|
|
|
|
|
2019-10-30 22:20:29 +03:00
|
|
|
/**
|
|
|
|
* Registers a weakly-held observer of RN reload events.
|
|
|
|
*/
|
2016-12-08 07:04:33 +03:00
|
|
|
RCT_EXTERN void RCTRegisterReloadCommandListener(id<RCTReloadListener> listener);
|
2017-10-05 23:17:07 +03:00
|
|
|
|
2019-10-30 22:20:29 +03:00
|
|
|
/**
|
2019-10-30 22:20:29 +03:00
|
|
|
* Triggers a reload for all current listeners. Replaces [_bridge reload].
|
2019-10-30 22:20:29 +03:00
|
|
|
*/
|
2019-10-30 22:20:29 +03:00
|
|
|
RCT_EXTERN void RCTTriggerReloadCommandListeners(NSString *reason);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* This notification fires anytime RCTTriggerReloadCommandListeners() is called.
|
|
|
|
*/
|
|
|
|
RCT_EXTERN NSString *const RCTTriggerReloadCommandNotification;
|
2019-11-19 03:15:05 +03:00
|
|
|
RCT_EXTERN NSString *const RCTTriggerReloadCommandReasonKey;
|
|
|
|
RCT_EXTERN NSString *const RCTTriggerReloadCommandBundleURLKey;
|
|
|
|
|
|
|
|
RCT_EXTERN void RCTReloadCommandSetBundleURL(NSURL *URL);
|