Use this path when you want to tweak the app, sign with your own Apple Developer account for a year-long install, or just don't want to trust a CI-built IPA. You need a Mac with Xcode 15 or newer, an Apple ID, and an iPhone running iOS 16+.
Prerequisites
macOS with Xcode 15+ installed from the App Store.
CocoaPods: sudo gem install cocoapods (or via brew).
A free Apple ID (7-day signing) or a paid Apple Developer Program account (1-year signing).
An iPhone with Developer Mode enabled: Settings -> Privacy & Security -> Developer Mode.
Step 1 - clone and install dependencies
git clone https://github.com/chartmann1590/family-guardian.git
cd family-guardian/ios-app
npm install
Step 2 - Expo prebuild
The repo keeps the Expo "managed" layout; the native ios/ folder is generated on demand. Run prebuild to materialise the Xcode project:
npx expo prebuild --platform ios --clean
This creates ios/FamilyGuardian.xcworkspace, the Podfile, and an Info.plist with the right background-modes / location-usage strings already filled in. Re-run with --clean any time you change app.json or add a native module.
Step 3 - install CocoaPods
cd ios
pod install
cd ..
Subsequent prebuilds run pod install automatically; the first one usually doesn't.
Step 4 - open in Xcode and sign
open ios/FamilyGuardian.xcworkspace
In Xcode:
Select the FamilyGuardian target.
Open Signing & Capabilities.
Tick Automatically manage signing.
Pick your Team. Free Apple IDs appear here once you add them under Xcode -> Settings -> Accounts.
If you see a "Failed to register bundle identifier" error, change Bundle Identifier to something unique to you (e.g. com.<yourname>.familyguardian). Free Apple IDs cannot reuse a bundle ID already claimed by someone else.
Step 5 - install on the iPhone
Plug your iPhone in over USB and tap Trust when prompted.
In Xcode's top toolbar, pick your phone from the device dropdown.
Hit the Run button (or Cmd+R). Xcode builds, signs, and installs the app.
The first launch fails with "Untrusted Developer". On the iPhone, go to Settings -> General -> VPN & Device Management, tap your developer profile, and tap Trust. Re-open the app.
Tip: for wireless deploys, in Xcode go to Window -> Devices and Simulators, pick your iPhone, and tick Connect via network. After the first wired pair, you can build and install over Wi-Fi.
Step 6 - first-run configuration
Open Family Guardian on the iPhone.
Enter the server URL: http://YOUR-LAN-IP:8080 (replace with the LAN IP of the box running docker compose).
Sign in with the credentials you bootstrapped on the server, or join with an invite code from the admin.
Grant location permissions. Pick Always if you want background reporting.
Grant notification permission so SOS / geofence alerts can wake the device.
Re-signing cadence
Signature expiry:
Free Apple ID: the install certificate is valid for 7 days. After that, iOS refuses to open the app. Rebuild and re-run from Xcode (Cmd+R) to refresh.
Paid Apple Developer Program ($99/yr): certificates last 1 year. You can also distribute via TestFlight if you want over-the-air updates.
Updating to a new release
cd family-guardian
git pull
cd ios-app
npm install
npx expo prebuild --platform ios --clean
cd ios && pod install && cd ..
open ios/FamilyGuardian.xcworkspace
# Cmd+R in Xcode
Troubleshooting
"Multiple commands produce..." - run npx expo prebuild --platform ios --clean to start from a clean ios/ folder.
"Sandbox: rsync deny" - in Xcode, Build Settings -> User Script Sandboxing -> set to No.
App won't connect to the LAN server - by default iOS allows cleartext HTTP for local networks, but check ios-app/app.json -> ios.infoPlist.NSAppTransportSecurity is preserved across prebuilds.
Background GPS stops after a few hours - iOS aggressively suspends apps. Make sure Location -> Always is granted and Background App Refresh is on for Family Guardian.
What you get
The build-from-source path produces the same binary as the unsigned-IPA path (same Expo app, same React Native runtime, same features) but signed with your own identity. You get:
Real background GPS via expo-location.
Local notifications for SOS, geofence, speeding, low-battery, and offline alerts.
Real-time WebSocket updates while the app is open.
Map view, member list, chat, places, check-ins, and the SOS button.