On this page
mobile/BUILD-IOS.md
iPhone build
Aegion on iPhone and iPad
Aegion (the Aegis app) is the same Kivy app as on Android and the desktop, built with kivy-ios through buildozer. The home-screen name is Aegion (title and ios.plist.CFBundleDisplayName in buildozer.spec); the bundle id stays online.mindflux.aegis and the Xcode project keeps the package name aegis. Nothing here can be built or tested on the Ubuntu laptop: an iOS build needs a Mac with Xcode, and installing needs an Apple ID.
What works on iOS
| Feature | iOS |
|---|---|
| Ask, Library, Tutorials, Markets, Shield of Zeus (while the app is open) | yes, same code |
| Weather, exchange rates, city times, sports, companies | yes (needs internet) |
| Read-aloud | AVSpeechSynthesizer (engine/plat_ios.py) |
| Voice questions, Artemis wake word | AVAudioRecorder + SFSpeechRecognizer (engine/plat_ios.py) |
| Links | UIApplication openURL:options:completionHandler: |
| Laptop link, Sync now | yes, over the same Wi-Fi (pairing code from the laptop's Handshake page) |
| Signal Walk | view only: walks arrive by Sync now, or Finder file sharing into Documents/aegismobile/walks/walks.db |
| Auto-train in the background | no: iOS has no long-running service; it runs while the app is open |
| Restart after a style change | no: iOS apps can't relaunch themselves; the new style applies on the next launch |
| Guardian scan, SignalDub Studio | no (Linux / desktop only) |
Apple does not let apps scan Wi-Fi, cell towers or classic Bluetooth. A Signal Walk recorder for iOS would need a native Swift module (BLE + GPS only); that is a separate project.
1. On the Mac (one time)
xcode-select --install # command-line tools; install Xcode from the App Store too
brew install autoconf automake libtool pkg-config
python3.11 -m venv ~/aegis-ios/.venv && source ~/aegis-ios/.venv/bin/activate
pip install buildozer "Cython<3" kivy-ios
Copy the mobile/ folder to the Mac (for example the extracted build page, or git clone). The knowledge pack assets/aegis-pack.sqlite must be in it (it is git-ignored; copy it, or use Settings > LAPTOP LINK > Sync now later to download a fresh one).
2. Build
cd ~/aegis-ios/mobile
buildozer --profile ios ios debug # [app@ios] adds pyobjus to the requirements
python3 ios-plist.py # copy the ios.plist.* usage strings into Info.plist
python3 ios-plist.py --check # must print "Info.plist has every ios.plist key"
open .buildozer/ios/platform/kivy-ios/aegis-ios/aegis.xcodeproj
The first build compiles Python, SDL2 and Kivy for arm64 and takes 30-60 minutes. Without the usage strings iOS closes the app the moment Voice is tapped, so run ios-plist.py after every buildozer ios that recreates the project.
3. Sign and install
In Xcode: select the aegis target, Signing & Capabilities, tick Automatically manage signing, pick your team (your Apple ID), keep the bundle id online.mindflux.aegis (change it if Xcode says it is taken). Plug in the iPhone, trust the computer, choose it as the run destination and press Run. On the phone: Settings > General > VPN & Device Management > trust your developer certificate.
- Free Apple ID: the app runs for 7 days, then must be installed again from Xcode.
- Apple Developer Program (paid): a year per install, TestFlight and the App Store.
4. First run checks
- The header sits below the notch and the tab bar above the home indicator (44 dp and 34 dp:
SAFE_DPinengine/plat.py). - Ask "what is 45 * 78", "what time is it in Tokyo" and "weather in Reno".
- Voice: iOS asks for the microphone and speech recognition once; a question is heard and answered. Speak reads it aloud and Stop cuts it off.
- Settings > LAPTOP LINK: the laptop's address (
http://192.168.x.x:8000) and pairing code, then Sync now. The laptop's backend must listen on the LAN (--host 0.0.0.0: see "Link to the Aegis laptop" inRUN-DESKTOP.md); other computers always need the code. - Choose > Signal Walk opens the viewer once a walk has been synced.
Troubleshooting
| Symptom | Fix |
|---|---|
No recipe named sqlite3 | kivy-ios's python3 already has sqlite3: remove it from [app@ios] requirements. |
pyobjus build errors | pip install -U kivy-ios, then buildozer ios clean (or toolchain clean pyobjus). |
| The app closes when Voice is tapped | Info.plist lacks the usage strings: python3 ios-plist.py, rebuild in Xcode. |
| Sync now: "not reachable" | Same Wi-Fi; backend listening on 0.0.0.0 (RUN-DESKTOP.md); allow Local Network for Aegion in iOS Settings > Privacy. |
| Sync now: "pairing code is missing or wrong" | Copy the code from the laptop's Handshake page, Settings, Phone link. |
| "Signing requires a development team" | Xcode > Settings > Accounts: add your Apple ID, then pick it as the team. |
| Read-aloud is silent | Ring/silent switch, or no voice for the language: Settings > Accessibility > Spoken Content > Voices. |