- Clear step-by-step guide for building in Xcode GUI - Command-line alternative provided - Troubleshooting tips for common issues - Architecture overview included
2.6 KiB
2.6 KiB
Building Bagsy on iOS
Current Status ✅
- ✅ All dependencies installed via CocoaPods
- ✅ Xcode workspace ready (
Bagsy.xcworkspace) - ✅ iPhone 16 detected and connected
- ✅ Compatibility patches applied (Expo 54 + React Native 0.75)
- ✅ ~5GB free disk space available
Building in Xcode (GUI) - RECOMMENDED
This is the most reliable way to build and debug:
-
Open the workspace:
open /Users/barnabasbodily/shop/apps/mobile/ios/Bagsy.xcworkspace -
In Xcode:
- Select Bagsy scheme (top menu)
- Select JDB iphone16 device (top menu, next to scheme)
- Click Play button (or
Cmd+R)
-
First build will take 5-10 minutes (codegen runs automatically)
- Watch the build log for progress
- React Native codegen compiles natively
- Hermes JavaScript engine builds
-
Subsequent builds are much faster (1-2 minutes)
Building via Command Line
If you prefer CLI:
cd /Users/barnabasbodily/shop/apps/mobile/ios
# For physical device (recommended)
xcodebuild -workspace Bagsy.xcworkspace \
-scheme Bagsy \
-configuration Debug \
-destination 'id=00008140-000E71921EE3801C' \
build
Troubleshooting
Build still fails with codegen errors
- Try:
Cmd+Shift+Kin Xcode to clean build folder - Then:
Cmd+Bto rebuild - Codegen should regenerate automatically
Disk space errors
We already cleared ~2GB of caches. If you get low disk warnings:
# Remove old Xcode archives
rm -rf ~/Library/Developer/Xcode/Archives/*
# Remove old DerivedData
rm -rf ~/Library/Developer/Xcode/DerivedData/*
Slow builds
- First build: Normal (compiles all native code)
- Enable ccache for faster rebuilds:
USE_CCACHE=1 xcodebuild ... - Or in Xcode settings: Enable "Use Clang module caches"
After Build
Once the app builds successfully:
- It will automatically run on your iPhone 16
- Look for "Bagsy" app on home screen
- App opens to a blank "Home" screen (default template)
- No backend connectivity yet (API not fully implemented)
Next Steps
- Implement backend API - See
apps/api/for Next.js API routes - Connect to backend - Update
EXPO_PUBLIC_API_URLin.env - Implement UI screens - See
apps/mobile/app/for routing
Architecture Notes
- Framework: React Native (Expo) + Hermes engine
- Bundler: Metro
- Native: Swift/Objective-C via CocoaPods
- Code generation: React Native Codegen (auto-runs during build)
Current device: iPhone 16 (connected as JDB iphone16)
Workspace: /Users/barnabasbodily/shop/apps/mobile/ios/Bagsy.xcworkspace