-
Notifications
You must be signed in to change notification settings - Fork 39
feat: add example Rock app #338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
f1f25bc
5d9d1e9
573c9ef
eea8a8a
9941fb2
f42f300
f17a7ab
096cd08
e5a6e38
f3ebb73
8fc61fb
e8e9f23
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,7 @@ We use [changesets](https://github.com/changesets/changesets) to make it easier | |
| - `build:example:ios-consumer:expo55` - builds the `Brownfield Apple App (ExpoApp55)` target via scheme **Brownfield Apple App Expo 55** (`Release`) | ||
| - `build:example:ios-consumer:expo54` - builds the `Brownfield Apple App (ExpoApp54)` target via scheme **Brownfield Apple App Expo 54** (`Release`) | ||
| - `build:example:ios-consumer:vanilla` - builds the `Brownfield Apple App (RNApp)` target via scheme **Brownfield Apple App Vanilla** (`Release Vanilla`) | ||
| - `build:example:ios-consumer:rock` - builds the `Brownfield Apple App (Rock)` target via scheme **Brownfield Apple App Vanilla** (`Release Rock`) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs adjustment. I'm also wondering if just for clarity we should not just duplicate the Release Vanilla to Release Rock + update for coherence. WDYT @hurali97 ?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is fine either way. There is already separate scheme for both Vanilla and Rock but they only share the configuration, which I think is not that big a deal. So if we also duplicate and have separate Rock configuration, it's also fine 👍 |
||
|
|
||
| ## Running demo apps | ||
|
|
||
|
|
@@ -91,6 +92,7 @@ Per example app (run from the repo root): | |
| | `yarn workspace @callstack/brownfield-example-rn-app test` | Plain React Native (`apps/RNApp`) | | ||
| | `yarn workspace @callstack/brownfield-example-expo-app-54 test` | Expo SDK 54 (`apps/ExpoApp54`) | | ||
| | `yarn workspace @callstack/brownfield-example-expo-app-55 test` | Expo SDK 55 (`apps/ExpoApp55`) | | ||
| | `yarn workspace @callstack/brownfield-example-rock-app test` | Rock (`apps/RockApp`) | | ||
|
|
||
| Package-level scripts (`yarn test` inside `apps/RNApp`, `apps/ExpoApp54`, or `apps/ExpoApp55`) invoke Jest with each app’s `jest.config.js`. | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package com.callstack.brownfield.android.example | ||
|
|
||
| typealias BrownfieldStore = com.callstack.rnbrownfield.demo.rockapp.BrownfieldStore | ||
| typealias User = com.callstack.rnbrownfield.demo.rockapp.User |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| package com.callstack.brownfield.android.example | ||
|
|
||
| object ReactNativeConstants { | ||
| const val MAIN_MODULE_NAME = "RockApp" | ||
| const val APP_NAME = "Android" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package com.callstack.brownfield.android.example | ||
|
|
||
| import android.content.res.Configuration | ||
|
|
||
| typealias ReactNativeHostManager = com.callstack.rnbrownfield.demo.rockapp.ReactNativeHostManager | ||
|
|
||
| fun ReactNativeHostManager.onConfigurationChanged(application: android.app.Application, newConfig: Configuration) { | ||
| // no-op that is prepared to match of the Expo ReactNativeHostManager | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Juozas-Petkelis shouldn't we use the Rock CLI for packaging it + installing Pods?