Skip to content
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

feat: use runtime in the example app #6

Merged
merged 5 commits into from
Jan 10, 2025

Conversation

jeanregisser
Copy link

@jeanregisser jeanregisser commented Jan 8, 2025

Description

This updates the example app to use the runtime.

Similar to what was done in the prototype: https://github.com/mobilestack-xyz/app-expo
Except I've left out firebase for now.

The app now builds and runs on iOS and Android.
Though there's a crash in the setting due to Statsig not being configured. This is being addressed in valora-inc#6403.

Next: make e2e tests work with the example app.

Part of RET-1279

@@ -53,6 +53,7 @@
"generate-release-notes": "ts-node ./scripts/generate-release-notes.ts",
"deploy:update-disclaimer": "yarn licenses generate-disclaimer --prod > src/account/LicenseDisclaimer.txt && ./scripts/copy_license_to_android_assets.sh",
"//postinstall": "patch-package && yarn keys:decrypt && ./scripts/copy_license_to_android_assets.sh",
"postinstall": "cp secrets.json.template secrets.json",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will overwrite secrets.json every time someone runs yarn install, for instance, to install new dependencies updated in the repo. is that okay?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes because secrets will be handled by end apps.
This is just a stop gap solution to fix compilation in the runtime which currently imports that file.


const SEARCH_STRING = 'defaultConfig {'

// Temporary plugin to fix the camera build issue on Android

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can switch to expo-camera in the future

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes 👍

Copy link

@bakoushin bakoushin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

jeanregisser added a commit that referenced this pull request Jan 10, 2025
…#4)

### Description 

This PR introduces an example app using Expo, generated with the
following command:

```bash
npx create-expo-app@latest --template blank-typescript apps/example
```

While setting up this app, compatibility issues arose between Expo's use
of `[email protected]` and our runtime's use of
`[email protected]`. These were resolved by:

1. **Moving the runtime's native dependencies to `peerDependencies`**:
- This follows best practices for libraries that have native deps,
enabling auto-linking in the final app.
- Reference:
[react-native-community/cli#870](react-native-community/cli#870)
(still unresolved but relevant).

2. **Adding root resolutions**:
- Ensures only one version of `react-native` and related dependencies is
used.

Additionally, changes were made to the runtime tests due to differences
in how the `<Modal />` component renders in tests with the new
`react-native` version. Specifically, `<Modal />` now renders as `null`
when not visible.

Note: the example app doesn't yet consume the runtime, see #6 for that.

Part of RET-1279
Base automatically changed from jeanregisser/example-app to main January 10, 2025 16:13
@jeanregisser jeanregisser force-pushed the jeanregisser/example-with-runtime branch from d03a3ab to a7b94cd Compare January 10, 2025 16:15
@jeanregisser jeanregisser enabled auto-merge (squash) January 10, 2025 16:18
@jeanregisser jeanregisser merged commit 46110c3 into main Jan 10, 2025
8 checks passed
@jeanregisser jeanregisser deleted the jeanregisser/example-with-runtime branch January 10, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants