1 /* 2 * Copyright (c) Meta Platforms, Inc. and affiliates. 3 * 4 * This source code is licensed under the MIT license found in the 5 * LICENSE file in the root directory of this source tree. 6 */ 7 8 #import <Foundation/Foundation.h> 9 10 #import <ABI48_0_0React/ABI48_0_0RCTDefines.h> 11 12 /** 13 * A protocol which should be conformed to in order to be notified of ABI48_0_0RN reload events. These events can be 14 * created by CMD+R or dev menu during development, or anywhere the trigger is exposed to JS. 15 * The listener must also register itself using the method below. 16 */ 17 @protocol ABI48_0_0RCTReloadListener 18 - (void)didReceiveReloadCommand; 19 @end 20 21 /** 22 * Registers a weakly-held observer of ABI48_0_0RN reload events. 23 */ 24 ABI48_0_0RCT_EXTERN void ABI48_0_0RCTRegisterReloadCommandListener(id<ABI48_0_0RCTReloadListener> listener); 25 26 /** 27 * Triggers a reload for all current listeners. Replaces [_bridge reload]. 28 */ 29 ABI48_0_0RCT_EXTERN void ABI48_0_0RCTTriggerReloadCommandListeners(NSString *reason); 30 31 /** 32 * This notification fires anytime ABI48_0_0RCTTriggerReloadCommandListeners() is called. 33 */ 34 ABI48_0_0RCT_EXTERN NSString *const ABI48_0_0RCTTriggerReloadCommandNotification; 35 ABI48_0_0RCT_EXTERN NSString *const ABI48_0_0RCTTriggerReloadCommandReasonKey; 36 ABI48_0_0RCT_EXTERN NSString *const ABI48_0_0RCTTriggerReloadCommandBundleURLKey; 37 38 ABI48_0_0RCT_EXTERN void ABI48_0_0RCTReloadCommandSetBundleURL(NSURL *URL); 39