Documentation
iOS App
Build, sign, and ship the Syrus iOS shell to TestFlight with signing material supplied from your own environment.
iOS App
The Syrus iOS app is a native shell that loads your Syrus instance in a web view, receives push notifications, and includes a Share extension. The project lives under ios/ in the Syrus repository and is generated from ios/project.yml with XcodeGen.
Sharing into a chat
Choose Syrus in another app's share sheet to send selected text, web links, screenshots and images, documents, or supported log/source files. Pick a server configured in the main app and optionally a recently visited chat. Syrus stages at most 10 items (5 MB each and 20 MB total) in its App Group, opens the main app, and lets you finish composing in the existing web chat composer.
The extension does not receive cookies, make network requests, or upload in the background. Only server origins and recent chat display metadata are shared; authentication and uploads remain in the main app. Staged items expire after 24 hours and are removed after the composer confirms import.
Inside the iOS app, the chat composer’s attachment menu also offers Take photo, Choose photos, Scan document, and Choose from Files. Photos are re-encoded without source metadata, and a multi-page document scan is normalized into one PDF. The same attachment type, 10-item, 5 MB-per-file, and 20 MB-total limits are enforced before upload. Uploaded draft references survive a temporary web-view reload without uploading the staged bytes twice. If camera access is denied, the composer explains how to enable it in iOS Settings; cancelling a system picker leaves the draft unchanged.
When the video_walkthroughs plugin is enabled, the attachment menu also offers Record this iPhone or iPad. Choose screen-only recording or include microphone narration explicitly; iOS keeps its system recording indicator visible during capture. After stopping, preview or trim the QuickTime movie in the native editor, then use it to create the normal walkthrough draft. The existing walkthrough rules still apply: one video per message, a 15-minute and 500 MB limit, visible upload and analysis progress, retry support, and temporary raw-video retention. Cancelling or discarding removes the temporary recording.
Simulator builds
Simulator builds and tests are unsigned and need no Apple account:
cd ios
make generate
make test
Signing and TestFlight
No signing material is committed to the repository. The bundle identifier defaults to app.syrus.ios; your Apple team, an optional bundle-id override, and an App Store Connect API key come from your own environment.
- Create a main App ID with Push Notifications and App Groups, a second
<base bundle id>.share App ID for the extension, and the group.app.syrus.ios App Group assigned to both. Create an App Store Connect API key (App Manager access) and the app record.
- Export your settings:
export SYRUS_IOS_TEAM_ID=ABCDE12345
export ASC_KEY_PATH=$HOME/.appstoreconnect/AuthKey_XXXX.p8
export ASC_KEY_ID=XXXXXXXXXX
export ASC_ISSUER_ID=00000000-0000-0000-0000-000000000000
# optional: SYRUS_IOS_BUNDLE_ID, SYRUS_IOS_BUILD_NUMBER
- Run
make archiveto produce a signed Release archive,make exportfor
an .ipa, or make upload to send the build to TestFlight.
Debug builds use the APNs sandbox environment and Release builds use production. Automatic signing provisions both the app and embedded extension; the release archive fails if either target cannot use the shared App Group. The app bundles a privacy manifest declaring no tracking. For configuring the server side of push delivery (APNs key and team), see ios/README.md in the repository.
After the web app loads, App settings in the navigation drawer's account menu opens the native controls for reload, notifications, diagnostics, current server information, and server switching. During loading or connection failure, the native ⋯ menu keeps those recovery controls available without depending on the web page. The native Server settings screen shows the exact origin currently in use and lets you select or enter another Syrus server. Switching origins removes the old server's local web session and push registration, reconnects the web view, and repeats registration after you sign in. Credentials and all other Syrus settings remain in the web application.
Universal links and server routing
Signed builds can open HTTPS links to Jobs, chats, Epics, Workflows, repositories, approvals, and notifications in the existing web view. Links to the selected server open directly. The app asks before switching to another known server, and offers to add an unknown server with a fresh web session. Unsupported paths continue in Safari, and the app strips query parameters that are not allowlisted for the destination.
Configure both halves before distributing the build:
- Enable Associated Domains for the App ID and profile. Set the build setting
SYRUS_IOS_ASSOCIATED_DOMAIN to applinks:your.syrus.example or a wildcard such as applinks:*.syrus.example for several server subdomains.
- Set
SYRUS_IOS_ASSOCIATED_APP_IDSon each Syrus web server to the signed
application's TEAMID.bundle.identifier (comma-separate multiple apps). The server then publishes /.well-known/apple-app-site-association without authentication. It returns 404 while no app identifier is configured.
- Use a publicly reachable, trusted HTTPS origin for Apple's association-file
fetch, and reinstall the app after entitlement changes.
If linked servers use unrelated domains, add each applinks: entry to the Debug and Release entitlement arrays before signing.
Native search and Spotlight
Open Search from the native app controls to enter a canonical Job, Epic, Workflow, or Chat identifier, a pull request number, a repository name, or free text. Exact identifiers open their authenticated web pages; other terms continue to the existing authenticated Syrus search. Results use the same universal-link routing and server-switch confirmation as links opened outside the app.
Syrus keeps a local, 14-day Spotlight index of at most 50 recently visited Jobs, Epics, Workflows, Chats, and configured repositories. Stored metadata is limited to the server origin, entity kind and canonical identifier, allowlisted path, display name, and visit/expiration dates. Chat titles, prompts, message bodies, Job and Epic titles, diffs, searches, secrets, credentials, attachment names, and attachment content are never indexed. Signing out of or removing a server deletes its entries; an expired system result cannot silently add a removed server again.
Notification actions
Notifications can offer Open Job and View PR when those destinations are available. When the signed-in operator is currently allowed to approve or retry a Job, the notification can also open that Job's confirmation surface; the notification itself never performs the consequential action. Actions are validated against the selected server and current server-side eligibility. Older app builds continue to handle the same notifications as ordinary tap deep links, and devices from older builds receive that legacy payload until they register again.
On devices that support Live Activities, Job pages in the iOS shell offer an explicit Follow on Lock Screen action. The Lock Screen and Dynamic Island show only the Job number, coarse phase, elapsed time, and terminal or blocked outcome; taps return to the existing Job route. Syrus limits each account to three active activities, expires stale activities after eight hours, and ends them when changing servers. Job titles, prompts, and repository content are never included in ActivityKit payloads.
The app also provides small and medium home-screen widgets for running/recent Jobs and unread approvals, operator questions, or failures. Widget data is a bounded snapshot refreshed through the signed-in web view whenever the app has an opportunity; the extension stores no credentials and performs no background network request. Each widget labels its Syrus server and opens the existing Job page. Snapshots older than an hour show their age and offline marker. Before the first successful sign-in, or after authentication is removed, the widget asks the operator to open Syrus instead of showing account data.
Pushes are grouped consistently by Job, chat, or repository. On foreground and after opening a notification, the app asks the selected authenticated server for its current unread count, corrects the badge, marks the opened notification read, and removes superseded or already-read delivered alerts. Alerts from other configured servers are left alone. If the server is offline, signed out, or the web session is not ready, reconciliation waits for later page activity instead of discarding local alerts. Up to 100 opened alerts per server are retained and marked read together when reconciliation recovers; older servers safely drain the queue one opened alert at a time.
Versioning and release automation
The marketing version is set in ios/project.yml; the build number defaults to the commit count of the checked-out ref (override with SYRUS_IOS_BUILD_NUMBER), so the same commit always produces the same number. Pull requests that touch ios/ run an unsigned simulator build and test job on macOS. Authorized operators can trigger the iOS Release GitHub Actions workflow to archive, export, or upload to TestFlight, with signing credentials supplied as repository secrets. Build logs are retained as artifacts; secrets are never printed. To roll back, expire the build in App Store Connect and re-release the last good commit with a higher build number.
Device signing also requires the App Group capability for the app and widget extension identifiers. The default group is group.app.syrus.ios; a custom SYRUS_IOS_BUNDLE_ID derives the matching group.<bundle-id> group.
When something goes wrong
The shell tells you whether a problem belongs to the network, the server, your session, or the app itself, and offers a matching recovery action:
| Source | Examples | Recovery |
|---|---|---|
| Network problem | offline, timeout, DNS or host unreachable | Retries automatically when connectivity returns or the app returns to the foreground; Retry |
| Server problem | untrusted certificate, TLS failure, dropped connection | Retry (not offered for certificate errors) and Open Settings |
| App problem | the web content process was killed repeatedly | Retry |
Reachable HTTP error and sign-in pages remain in the web application. While offline with a page already loaded, a banner is shown instead of replacing the page. Attachments and other non-renderable responses are downloaded and opened in the share sheet. Pull-to-refresh keeps its spinner until the reload finishes, and the web view resizes when the keyboard appears. Errors are announced to VoiceOver, and the error screen scales with Dynamic Type.