Create a Bridging Header for the iOS Share Extension
masterTo allow the Share Extension to interact with React Native, you must create an Objective-C bridging header.
- Right-click your Share Extension folder in Xcode and select
New File.... - Select Objective-C and ensure the target is set to your Share Extension.
- When prompted, allow Xcode to create a Bridging Header.
- Delete the automatically created
.mfile. - Add the following imports to your new
Bridging-Header.hfile:
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTBridgeDelegate.h>
#import <React/RCTRootView.h>