Skip to content

callstack-internal/rock-brownfield-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rock Brownfield example

This is a simple example of how to use Brownfield with React Native. The app was initialized with npm create rock@latest command with brownfield-ios plugin.

Features

The About Me app is a SwiftUI app displaying four tabs, with second tab "Story" displaying the HelloBrownfield React Native app, while the other tabs are native SwiftUI views.

Demo video

Running the apps

The About Me app includes 3 framework files generated from the HelloBrownfield project:

  • hermes.xcframework - JavaScript runtime
  • ReactBrownfield.xcframework - React Native Brownfield library
  • HelloBrownfieldReact.xcframework - Your framework target

These frameworks are located in the HelloBrownfield/.rock/cache/ios/package directory, which is populated by Rock framework, and you'll need to build them first before consuming the app.

Package React Native app as a framework

Make sure to install depedencies in the HelloBrownfield directory:

npm install

and then package the app using the following command:

npm run package:ios

Run the SwiftUI app

Once the frameworks are generated, you can open the About Me app in Xcode and run the project.

About

Example of Rock Brownfield with a SwiftUI app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published