- Let's start by updating the ViewController.m implementation file in the native layer. Be sure to open the project in Xcode via the .xcworkspace file in the EmbeddedApp, which we placed in the /ios/EmbeddApp directory of the project in the previous recipe. We'll start with the imports:
#import "ViewController.h"#import "EmbeddedViewController.h"#import <React/RCTRootView.h>#import <React/RCTBridge.h>#import <React/RCTEventDispatcher.h>
- The next step is to add a reference to the React Native bridge via the ViewController interface, effectively linking the native controller with the React Native code:
@interface ViewController () <RCTBridgeDelegate> { EmbeddedViewController *embeddedViewController; RCTBridge *_bridge; BOOL ...