- Let's begin in the native layer. Open the EmbeddedApp native app in Xcode via the .xcworkspace file. We'll first add imports to ViewController.m:
#import "ViewController.h"#import "EmbeddedViewController.h"#import <React/RCTRootView.h>#import <React/RCTBridge.h>#import <React/RCTEventDispatcher.h>
- As we did in the last recipe, we need to add a reference to the React Native bridge via the ViewController interface, providing a bridge between the native controller and the React Native code:
@interface ViewController () <RCTBridgeDelegate> { EmbeddedViewController *embeddedViewController; RCTBridge *_bridge; BOOL isRNRunning;}
- We will also need a @property reference of userNameField that we will use in a later step to wire ...