Files
BizGaze_Remote/mobile
Sravan f63aba0ed1 feat(ios): native CallKit + PushKit VoIP calling plugin + web bridge
The native call feature (iOS). Backward-compatible: without the plugin (current
builds) nativeCallOn() is false and every CallKit branch is skipped, so web/older
builds behave exactly as before.

Native (mobile/plugins/native-call, a local Capacitor plugin like audio-route):
- PushKit: registers for VoIP pushes, reports the VoIP token to JS (-> /api/v1/devices
  'ios-voip'). On an incoming VoIP push, reports a CallKit incoming call (full-screen
  ring, works when the app is force-killed).
- CallKit: answer/decline/end -> events to JS; configures the call AVAudioSession on
  didActivate so the WebView's WebRTC audio rides a call-priority session (background).
- Outgoing calls register with CallKit too (reportOutgoingCall) so they get the same
  active-call background-audio context.
- NativeCall.podspec (frameworks CallKit/PushKit/AVFoundation); added to mobile deps;
  ios-patch.sh now sets UIBackgroundModes = [audio, voip] (voip required for PushKit).

Web bridge (home.html): setupNativeCall() registers the VoIP token, joins on CallKit
answer, leaves/declines on CallKit end; on CallKit devices the in-app call-invite popup
+ WebAudio ring are suppressed (the system rings instead); outgoing calls are reported
to CallKit; call-end events dismiss the CallKit call. calls.js threads a stable call
uuid through the dm-call/group-call WS events + start responses so both sides can match
the CallKit call.

Needs a Codemagic build to compile the plugin; first on-device iteration expected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-28 22:34:27 +05:30
..

Biz Connect — Mobile app (Capacitor)

A Capacitor shell that loads the live Connect web UI (server.url in capacitor.config.json) and adds native push, camera/mic, and store distribution. See the overall plan in ../CLIENTS.md.

Android: follow the step-by-step in ANDROID_SETUP.md (project generation, icons/splash, permissions, Firebase/FCM, run, and Play Store build).

Prerequisites

  • Node + npm install here.
  • Android: Android Studio + SDK.
  • iOS: macOS + Xcode (+ an Apple Developer account to run on device / ship).

Setup

npm install
npm run assets           # generate app icons + splash from resources/
npx cap add android
npx cap add ios          # macOS only
npx cap sync

Run / build

npx cap open android     # build & run from Android Studio
npx cap open ios         # build & run from Xcode

Server origin

The app loads server.url from capacitor.config.json (default https://remote.bizgaze.com). For a local device test against a dev server, set it to your machine's LAN URL (and allow cleartext for plain http).

Native push (next step)

Native push uses the Capacitor Push Notifications plugin (FCM on Android, APNs on iOS) and a server endpoint to register device tokens — tracked in ../CLIENTS.md Phase B. This is separate from the existing Web Push (VAPID) the PWA already uses. Needs Google/Apple credentials to test end-to-end.

Shipping (gated on accounts)

  • Google Play: one-time $25; upload an AAB; signing key.
  • App Store: Apple Developer $99/yr; archive via Xcode; App Store Connect listing.