diff --git a/React/CxxBridge/RCTCxxBridge.mm b/React/CxxBridge/RCTCxxBridge.mm index 589c037f461..2e4bf048130 100644 --- a/React/CxxBridge/RCTCxxBridge.mm +++ b/React/CxxBridge/RCTCxxBridge.mm @@ -257,12 +257,23 @@ struct RCTInstanceCallback : public InstanceCallback { * Attach the RCTViewRegistry to this TurboModule, which allows this TurboModule * To query a React component's UIView, given its reactTag. * - * Usage: In the NativeModule @implementation, include: + * Usage: In the TurboModule @implementation, include: * `@synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED` */ if ([bridgeModule respondsToSelector:@selector(setViewRegistry_DEPRECATED:)]) { bridgeModule.viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED; } + + /** + * Attach the RCTBundleManager to this TurboModule, which allows this TurboModule to + * read from/write to the app's bundle URL. + * + * Usage: In the TurboModule @implementation, include: + * `@synthesize bundleManager = _bundleManager` + */ + if ([bridgeModule respondsToSelector:@selector(setBundleManager:)]) { + bridgeModule.bundleManager = _bundleManager; + } } - (std::shared_ptr)jsMessageThread