Refactor: Migrate to Expo Bare Workflow and Introduce src/ Architecture - #104
Refactor: Migrate to Expo Bare Workflow and Introduce src/ Architecture#104kapildadhich075 wants to merge 43 commits into
Conversation
…ce, expo-application
…@expo/vector-icons
…ve-documents/picker to expo variants
…ions to expo-notifications and expo-camera
…d add handoff documentation
…tection logic in fs module
…th expo equivalents - modules/fs.ts: use expo-file-system/legacy for cacheDirectory, EncodingType etc; use rn-qr-generator for QR detection - components/CameraScreen.tsx: migrate from react-native-camera-kit-no-google Camera to expo-camera CameraView - components/AddressInputScanButton.tsx: replace detectQRCodeInImage with RNQRGenerator.detect - hooks/useCompanionListeners.ts: replace RNFS with expo-file-system/legacy, replace detectQRCodeInImage with RNQRGenerator - tests/setup.js: update mocks to match new packages
…tification type casting
… to unblock EAS prebuild checks
…n and build settings
…AS build parsing error
…rgets to fix build loop
…and clean up pbxproj
…package not installed)
… disable QR generator dependency
| BlueprintIdentifier = "13B07F861A680F5B00A75B9A" | ||
| BuildableName = "Shroud.app" | ||
| BlueprintName = "Shroud" | ||
| BuildableName = "ShroudWallet.app" |
There was a problem hiding this comment.
app name is "Shroud" and not "ShroudWallet"
There was a problem hiding this comment.
Ah, good catch! During my hit-and-trial testing to get the EAS builds working, the PRODUCT_NAME in project.pbxproj was temporarily set to ShroudWallet, which caused the compiled binary to output as ShroudWallet.app. I will update the configuration so it correctly compiles as Shroud.app!
| BuildableName = "Shroud.app" | ||
| BlueprintName = "Shroud" | ||
| BuildableName = "ShroudWallet.app" | ||
| BlueprintName = "BlueWallet" |
There was a problem hiding this comment.
why do we have BlueWallet here?
There was a problem hiding this comment.
When migrating to Expo, the EAS cloud build pipeline kept failing because it was defaulting to look for the legacy BlueWallet Xcode scheme (it was throwing errors saying BlueWallet.xcscheme was corrupted). To quickly unblock the builds, I temporarily reverted the internal native target (PBXNativeTarget) back to BlueWallet. Because the native target was renamed, the BlueprintName had to match it to link properly. Now that I understand the proper configuration required for Expo, I'll completely eliminate the BlueWallet target name and rename everything back to Shroud.
…ports to expo-clipboard
d107565 to
ba41bd2
Compare
…ronment and crypto shim assignments
|
@theanmolsharma @kapildadhich075 Ran the numbers on this branch against today's master. It's 153 commits behind, and a test merge (git merge-tree) conflicts in 157 files. The "fully synced with upstream" note in the description was true in May. Since then the Settings/Currency/TransactionDetails redesigns, SP change addresses, network settings, and the dark-mode series have all landed, at root paths this PR moves into src/. The repeated hand-merges are also losing repo history. Four dependencies Shroud deliberately deleted are back, with zero imports: react-native-rate, react-native-watch-connectivity, react-native-draglist, and payjoin-client. I checked payjoin-client's one grep hit and it's a comment in hd-segwit-bech32-transaction.ts, not an import. 23 new deps in total on this branch, so CONTRIBUTING's rule about discussing new dependencies first applies here regardless of the Expo question. e898ef9 deserves its own look. It's labeled refactor: but changes app-start behavior: a missing INDEXER_BASE_URL used to throw, now it warns and boots without an indexer. Whether the app should fail fast there is a product call, not a refactor, and #146 has since handled indexer-unavailability on master its own way, so this hunk now fights newer code. The same commit removes the live require('crypto') from shim.js. That line existed to populate global.crypto before other modules load, so I'd want a device test proving nothing reads it at import time before deleting it. The NODE_ENV/babel-preset-expo note in that hunk is a good catch though, that one's real. On the bigger question. A restructure this size on a long-lived branch only lands if it's rebased right at the end under a merge freeze, otherwise it conflicts with everything merged before and after it. The last four months are the proof. If the maintainers want Expo + src/ (an issue settling that first would match how this repo works), I think the landable version looks like: Per-module dependency swaps (expo-clipboard, expo-haptics, ...), one small PR each, no restructure. |
Overview
This PR modernizes the Shroud Wallet codebase by migrating the project to Expo Bare Workflow (SDK 55) and restructuring the repository around a centralized
src/directory.The branch is fully synced with the latest
upstream/masterchanges and includes all required merge conflict resolutions.Expo SDK 55 Migration
expo-dev-clienteas.jsonExamples include:
expo-file-systemexpo-notificationsexpo-image-pickerexpo-hapticsexpo-clipboardThis improves native stability, simplifies future upgrades, and enables cloud builds through EAS.
Repository Restructure
All application source code has been consolidated into a dedicated
src/directory.Moved modules include:
componentsnavigationscreensmoduleshelpersutilstestsimgAdditional cleanup:
screen/→screens/This significantly reduces root-level clutter and improves project navigation.
Native & Build System Updates
rust_jsi_bridgeTooling & Configuration
Updated configuration and tooling to support the new structure:
metro.config.jstsconfig.jsonjest.config.js.detoxrc.jsonTesting and utility scripts were also updated accordingly.
Local Setup Requirements
Because the project uses a custom Rust-based JSI bridge (
rust_jsi_bridge), fresh clones require rebuilding the native Rust binaries before running iOS setup or native builds.Recommended setup flow:
This generates the required Rust native artifacts locally and ensures CocoaPods can correctly link the generated frameworks.
The compiled Rust binaries are intentionally excluded from Git:
ios/RustJsiBridge.xcframework/android/app/src/main/jniLibs/Important for Reviewers
Because of the repository restructure, Metro may cache outdated file paths.
After pulling the branch:
This clears Metro cache and rebuilds module resolution paths based on the new structure.
Validation Checklist
upstream/master