This guide will help you set up your development environment and build BitSleuth Wallet from source.
- Prerequisites
- Initial Setup
- Firebase Configuration
- iOS Setup
- Android Setup
- Running the App
- Building for Production
- Troubleshooting
Before you begin, ensure you have the following installed:
-
Node.js 20.18.0 or higher (required)
node --version # Should be v20.18.0 or higherNode 20+ is mandatory. Expo SDK 54 / React Native 0.81 ship a Metro config that uses
Array.prototype.toReversed(), which only exists in Node 20+. Older Node versions fail at build time withconfigs.toReversed is not a function. The pinned version lives in.nvmrcandpackage.json(engines.node) — runnvm useto match it. -
npm or bun package manager
npm --version # Should be v10.2.4 or higher -
Git
git --version
-
macOS (Monterey 12.0 or later)
-
Xcode 15.0 or later
- Install from the Mac App Store
- Install Xcode Command Line Tools:
xcode-select --install
-
CocoaPods
sudo gem install cocoapods pod --version
-
Android Studio with the following:
- Android SDK Platform 35 (Android 15)
- Android SDK Build-Tools 35.0.0
- Android SDK Platform-Tools
- Android Emulator (optional, for testing)
-
Java Development Kit (JDK) 17 or higher
java -version
-
Environment Variables (add to
~/.bashrc,~/.zshrc, or equivalent):export ANDROID_HOME=$HOME/Library/Android/sdk # macOS # OR export ANDROID_HOME=$HOME/Android/Sdk # Linux export PATH=$PATH:$ANDROID_HOME/emulator export PATH=$PATH:$ANDROID_HOME/platform-tools export PATH=$PATH:$ANDROID_HOME/tools export PATH=$PATH:$ANDROID_HOME/tools/bin
git clone https://github.com/BitSleuthAI/Wallet.git
cd Walletnpm install
# or
bun installThis will install all JavaScript dependencies including Expo, React Native, and other packages.
cd ios
pod install
cd ..This installs native iOS dependencies via CocoaPods.
IMPORTANT: You must set up your own Firebase project before running the app. The repository does not include Firebase configuration files for security reasons.
-
Create a Firebase Project
- Go to Firebase Console
- Click "Add project" or use an existing project
- Follow the wizard to create your project
- IMPORTANT: When asked about Google Analytics, select "Not now" or disable it (we don't use Analytics)
-
Add iOS App to Firebase
- In Firebase Console, click the iOS icon
- Enter iOS bundle ID:
com.bitsleuthwallet(or your custom bundle ID) - Download
GoogleService-Info.plist - Place it in two locations:
ios/BitSleuthWallet/GoogleService-Info.plist GoogleService-Info.plist (root directory)
-
Add Android App to Firebase
- In Firebase Console, click the Android icon
- Enter Android package name:
com.bitsleuthwallet(or your custom package name) - Download
google-services.json - Place it in two locations:
android/app/google-services.json google-services.json (root directory)
-
Enable Firebase Services
In the Firebase Console, enable the following services:
-
Crashlytics (for error reporting)
- Go to Crashlytics in the left sidebar
- Click "Enable Crashlytics"
- Follow the setup wizard
-
Performance Monitoring (for app performance)
- Go to Performance in the left sidebar
- Click "Get started"
- Follow the setup wizard
-
DISABLE Google Analytics (privacy requirement)
- Go to Project Settings > Integrations
- If Analytics is enabled, disable it
- This is a strict requirement for privacy compliance
-
-
Verify Configuration
Run the Firebase connectivity test:
node scripts/test-firebase-connectivity.js
You should see:
✅ Firebase is properly configured! ✅ Crashlytics is enabled ✅ Performance Monitoring is enabled ✅ Analytics is DISABLED (correct for privacy)
For detailed Firebase setup instructions, see FIREBASE_SETUP.md.
Open the iOS project in Xcode:
cd ios
open BitSleuthWallet.xcworkspace # Note: .xcworkspace, not .xcodeproj- In Xcode, select the project in the left sidebar
- Select the "BitSleuthWallet" target
- Go to "Signing & Capabilities" tab
- Select your development team
- Xcode will automatically manage provisioning profiles
If you encounter issues with pods:
cd ios
pod deintegrate
pod install
cd ..cd android
# Open this directory in Android StudioCreate android/local.properties:
sdk.dir=/Users/YOUR_USERNAME/Library/Android/sdk # macOS
# OR
sdk.dir=/home/YOUR_USERNAME/Android/Sdk # Linux
# OR
sdk.dir=C:\\Users\\YOUR_USERNAME\\AppData\\Local\\Android\\Sdk # Windowscd android
./gradlew clean
./gradlew assembleDebug
cd ..The repository includes a debug keystore (android/app/debug.keystore) for development builds. This uses standard Android debug credentials and is safe for development.
For production builds, you must generate your own keystore. See KEYSTORE_FILES.md for detailed instructions on:
- Creating production keystores
- Configuring signing for release builds
- Security best practices
Note: Never use the debug keystore for production releases.
In one terminal, start the Metro bundler:
npm startThis will show you a QR code and a menu of options.
In a new terminal:
npm run iosOr specify a device:
npx expo run:ios --device "iPhone 15 Pro"Make sure you have an Android emulator running, then:
npm run androidOr use a specific emulator:
npx expo run:android --device emulator-5554-
Start with tunnel mode for network access:
npm run start-tunnel
-
Install Expo Go app on your device
-
Scan the QR code shown in the terminal
Alternatively, for full native builds on physical devices:
# iOS (requires USB connection and device registered in Apple Developer)
npm run ios --device
# Android (requires USB debugging enabled)
npm run android --deviceHeads up — EAS cloud builds and Firebase config. The Firebase config files (
GoogleService-Info.plist,google-services.json) are intentionally gitignored and never committed to this open-source repo. EAS cloud builds only receive committed files, so a plaineas build --platform ioswill fail while resolving the iOS Firebase config withENOENT ... GoogleService-Info.plist. Use local builds (below), where your local Firebase files are present.If you do want to keep using EAS cloud builds, upload the Firebase files as EAS file environment variables / secrets (stored on EAS, not in git) and reference them from your config — see the Expo docs on environment variables and secrets.
Because the Firebase files stay on your machine, build locally and then submit the artifacts to Expo / the stores.
-
Install EAS CLI
npm install -g eas-cli
-
Login to Expo
eas login
-
Confirm your Firebase files are in place (see Firebase Configuration):
GoogleService-Info.plist(root andios/BitSleuthWallet/)google-services.json(root andandroid/app/)
-
Build locally with the
--localflag (uses your working tree, including the gitignored Firebase files, and your local Node):eas build --platform android --profile production --local eas build --platform ios --profile production --local
-
Submit the resulting binary to Expo / the stores:
eas submit --platform android --path <path-to-.aab> eas submit --platform ios --path <path-to-.ipa>
The project includes eas.json (which now pins Node 20.18.1 per profile). Cloud
builds work only once the Firebase files are provided via EAS file environment
variables/secrets as noted above:
eas build --platform ios --profile production
eas build --platform android --profile production
eas build --platform all --profile productionFor iOS:
cd ios
xcodebuild -workspace BitSleuthWallet.xcworkspace \
-scheme BitSleuthWallet \
-configuration Release \
-archivePath ./build/BitSleuthWallet.xcarchive \
archiveFor Android:
cd android
./gradlew bundleRelease
# APK will be at: android/app/build/outputs/bundle/release/app-release.aabImportant for Android Production Builds:
- You must configure a production keystore before building for release
- The current setup uses the debug keystore for both debug and release builds
- See KEYSTORE_FILES.md for step-by-step instructions on generating and configuring production keystores
- EAS Build can manage keystores automatically through the Expo dashboard
This means the build is running on Node < 20. Metro (Expo SDK 54 / RN 0.81) requires Node 20+.
node --version # must be >= 20.18.0
nvm use # switch to the version pinned in .nvmrcFor EAS builds, the Node version is pinned in eas.json (node: "20.18.1").
# Clear cache and restart
npx expo start -c# Reinstall pods
cd ios
pod deintegrate
pod install
cd ..
# Clean build folder in Xcode
# Product > Clean Build Folder (Shift + Cmd + K)# Clean Gradle build
cd android
./gradlew clean
cd ..
# Or with more aggressive cleaning
cd android
rm -rf .gradle
./gradlew clean
cd ..- Verify
google-services.jsonis inandroid/app/ - Verify
GoogleService-Info.plistis inios/BitSleuthWallet/ - Check that only Crashlytics is enabled (not Analytics)
- Run the connectivity test:
node scripts/test-firebase-connectivity.js
- iOS: Check
Info.plisthasNSFaceIDUsageDescription - Android: Check
AndroidManifest.xmlhas biometric permissions - Ensure device has biometrics enrolled
- Test with:
node scripts/test-biometric.js
# Regenerate TypeScript config
npx expo customize tsconfig.json
# Check for errors
npx tsc --noEmit# Remove and reinstall
rm -rf node_modules package-lock.json
npm install
# On iOS, also reinstall pods
cd ios
rm -rf Pods Podfile.lock
pod install
cd ..If you're still stuck:
- Check existing issues: GitHub Issues
- Search discussions: GitHub Discussions
- Create a new issue: Include:
- Your OS and version
- Node.js version
- Xcode/Android Studio version
- Complete error message
- Steps you've already tried
Once you have the app running:
- Read CONTRIBUTING.md for contribution guidelines
- Check docs/ARCHITECTURE.md to understand the codebase structure
- Review open issues labeled
good-first-issuefor beginner-friendly tasks - Join the discussion on GitHub Discussions
- React Native Documentation
- Expo Documentation
- Firebase Documentation
- bitcoinjs-lib Documentation
- BIP Standards
Happy building! 🚀