Files
react-native/React/Base/RCTBundleHolderModule.h
T
Peter Argany dd1ac9de24 Introducting RCTBundleHolderModule (name pending)
Summary:
Changelog: [Internal]

Problem:

The Bridge holds and exposes the bundle URL for native modules to inspect via `bridge.bundleURL`.

Solution:

This follows the same pattern we've been using for attaching objects to native modules: declare a protocol with the required object, attach that object during module init.

Differential Revision: D26289581

fbshipit-source-id: 35ae83912e392be84f55c8d056c8da15ba75060f
2021-02-19 13:47:25 -08:00

17 lines
476 B
Objective-C

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* This protocol should be adopted when a turbo module needs to access the currently loaded JS bundle URL.
* In bridge-less React Native, it is a replacement for bridge.bundleURL.
*/
@protocol RCTBundleHolderModule
@property (nonatomic, strong, readwrite) NSURL *bundleURL;
@end