Since this project uses Capacitor to wrap the Django web application, the build process for iOS involves a few steps to sync your code and then use Xcode for the final build.
- macOS with the latest version of Xcode installed.
- Node.js and npm installed.
- CocoaPods installed (
sudo gem install cocoapods).
Ensure your Django application is running and accessible. The Capacitor app is configured to load the URL specified in mobile/capacitor.config.json (currently https://trackmyrupee.com).
Navigate to the mobile directory and sync the Capacitor bridge. This ensures all plugins and configurations are correctly copied to the iOS project.
cd mobile
npm install
npm run ios:syncYou can open the iOS project directly in Xcode using the helper script:
npm run ios:openAlternatively, open mobile/ios/App/App.xcworkspace in Xcode manually.
Once Xcode is open:
- Select Target: Select the App target and a destination (either a physical device or "Any iOS Device (arm64)").
- Signing & Capabilities: Ensure you have a valid Development Team selected under the Signing & Capabilities tab.
- Build: Press
Cmd + Bto build the project. - Archive: To create a build for distribution (App Store or TestFlight), go to Product > Archive.
- Distribute: Once the archive is complete, the Organizer window will open. Click Distribute App and follow the prompts.
If you see a "Communication with Apple failed" error in Xcode's Signing & Capabilities tab even after connecting your device:
- Select the Correct Run Destination: In the top bar of Xcode (next to the Play button), click the device name and ensure your physical iPhone is explicitly selected under the "iOS Devices" section. Xcode won't provision the device unless it's the active target.
- Change the Bundle Identifier: This is a very common fix.
com.trackmyrupee.appmight be restricted or already partially registered.- Go to the General tab in Xcode.
- Change Bundle Identifier to something unique, like
com.yourname.trackmyrupeeorcom.tmr.finance.[random-string]. - Try clicking Try Again after changing it.
- Check Apple Account:
- Go to Xcode > Settings (or Preferences) > Accounts.
- Ensure your Apple ID is logged in.
- Select your ID and click Manage Certificates... to ensure a "Development" certificate exists.
- VPN/Network Check: Ensure you are not on a VPN, as it often blocks communication with Apple's signing servers.
- Restart Xcode: Sometimes Xcode doesn't refresh the device status properly. Close Xcode, unplug your device, plug it back in, and reopen the project.
If you see errors related to Podfile, run:
cd mobile/ios/App
pod installThe ₹8,700/year cost is for the Apple Developer Program, which is only required if you want to:
- Publish your app to the App Store.
- Use TestFlight for beta testing.
- Use advanced services like iCloud, Apple Pay, or Push Notifications.
You can develop and test on your own iPhone for FREE using a regular Apple ID:
- Xcode > Settings > Accounts: Add your regular Apple ID.
- Signing & Capabilities: Select your "Personal Team" name.
- Limitations:
- App expires on your phone after 7 days (you just need to re-run it from Xcode to renew).
- Limit of 3 active apps per device.
- No App Store distribution.
When you first install the app using a free "Personal Team" account, iOS will prevent it from opening with an "Untrusted Developer" error.
To verify the app:
- On your iPhone, open Settings.
- Go to General > VPN & Device Management (or Profiles & Device Management on older versions).
- Under "Developer App", tap on your Apple ID.
- Tap Trust "[Your Apple ID]".
If you tap Trust or Verify and nothing happens (or it just spins), try these steps:
- Internet Connection: Ensure your iPhone has a stable Wi-Fi or Cellular connection. iOS needs to contact
ppq.apple.comto verify the certificate. - Turn off VPN/AdBlock: If you have a VPN, AdGuard, or any custom DNS active on your iPhone, turn it off temporarily. These often block Apple's verification servers.
- Set Date & Time to Automatic: Go to Settings > General > Date & Time and ensure Set Automatically is enabled.
- Re-install Strategy:
- Delete the app from your iPhone.
- Restart your iPhone.
- Restart Xcode.
- Run the app from Xcode again.
- Check for iOS Update: Sometimes a pending iOS update can interfere with the verification system.