Closed birkir closed 2 years ago
@birkir - How will it work if we are using Expo bare workflow and need to make the changes above for AppDelegate?
I am getting this error
Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
Also my app goes to a white blank screen on load.
@birkir Only GridTemplate works, i tried MapTemplate and other templates but they didn't work
Here is the walkthrough
Using SceneDelegate with React Native
We will be swapping out the ObjC AppDelegate code with an Swift variant for SceneDelegate.
The Project name in this example is
Example
, which you should replace with your own project name.1. Remove previous ObjC files
main.m
AppDelegate.h
andAppDelegate.mm
2. Create the new Swift AppDelegate
Create a new
AppDelegate.swift
file, once prompted, click Create bridging headers for Swift.Paste the following code to the
AppDelegate.swift
, it includes Flipper code.Paste the following to your bridging header file
Example-Bridging-Header.h
:3. Add flags for Swift compiler in debug mode
Go to XCode project, hit
Build Settings
, search forSwift Compiler - Custom Flags
and then underActive Compilation Conditions
, add the following flags toDebug
only:4. Create Phone Scene
Add a new Swift file called
PhoneScene.swift
:5. Create Car Scene
Add a new Swift file called
CarScene.swift
6. Update the manifest in Info.plist
Add the following ApplicationScene manifest to your
Info.plist
file.