* Move CallKit and VoIP pushes into a new Element Call manager
The new app-wide ElementCallManager owns PushKit, CallKit, the ring and busy rules, the native watchdog and the ongoing and ringing call state. ElementCallService keeps the session's side: the room watch for a ringing call (also when it was requested before the session), declines, the ongoing room and the native call stack, and relays the call screens' calls up with a set-up handshake. AppCoordinator listens to the manager through its actions. No behaviour change.
* Let ManualClock cancel only the cancelling task's sleep
A task cancelled before it started sleeping ran its cancellation handler on arrival and removed whatever sleep was pending, even another task's. A test that cancels one timer while another starts could then wait forever, which showed up as a flaky answered-call watchdog test. Each sleep now has an identifier and cancelling only removes its own.
* Drop answered calls that never open and keep web mutes out of CallKit
A web call answered with no call screen to take it now stops blocking later calls after 30 seconds, like the native path, and dropAnsweredCall(roomID:) is there for the coming call coordinator. Web calls were never tracked by CallKit, so relaying their mutes there only logged errors.
* Keep CallKit and call package types out of the Element Call service
The service now speaks app-owned CallEndReason and NativeCallEvent types: the manager maps them to CallKit's end reasons, and NativeCallSystem maps them to and from the call package's types.
* Apply review suggestions to the Element Call manager split
- Add a TODO on AppCoordinator's app-wide ElementCallService, which goes once each account's UserSession has its own.
- Remove CallScreenViewModelTests.
- Rename the tests this branch adds to short subject + outcome names, with Given/When/Then where a name alone loses context.
- Drop the caller-role MARKs from the service, its protocol and its tests, and add Helpers MARKs to the test files.
- Build NativeCallSystemTests' mock and system once, in init.
Thumbs Up and Light Bulb were never translated during verification. The app
built the string key from the SDK's English description differently from the
SAS strings generator, so two-word descriptions missed.
The SDK already sends each emoji's index in the spec's emoji table and
recommends it for translations, which is what Element X Android uses. Key
SAS.strings by that index, look translations up with the SDK's indices and
fall back to the SDK's description when there's no translation. This also
stops translations spelled like their old key (e.g. Croatian "banana") from
being skipped.
Like L10n, the lookup now also ignores the doubled key the pseudolanguage
test mode returns for a missing string, so languages without SAS strings fall
through to English in the pseudo snapshots.
Found in #6419 by Bardi Harborow.
Signing out, a soft logout or clearing the cache replace the session's screens, which stops the tab coordinator. Its stop() only tore down its tabs, so a call screen in its overlay (and anything in its sheet or full-screen cover) was never stopped: the web call stayed ongoing and, with the missed-while-busy rule, every later call showed as missed until the app restarted. stop() now also tears down its sheet, full-screen cover and overlay, as the stack and split coordinators already do for what they present.
* Simply ClientProxy to have a single createRoom method with parameters.
Matches the underlying Client from the SDK.
* Add new hook points.
* Update the Enterprise submodule.
* Remove the timeline's pill view flushing
MessageTextView is created with UIKit's factory initialiser, which skips
Swift's stored-property initialisers, so its pill view table was always nil
and flushPills never did anything. UIKit already removes old attachment
views when the text is replaced (checked on iOS 18.5, 26.5 and 27).
The rich text composer does leave old pill views behind, so it keeps
registering them. The timeline and the plain composer now implement
registration as a no-op and drop their unused pill view tables.
* Stop adding a timestamp spacer whenever a mention's name loads
When a mention pill's display text changed, MessageText copied the rendered
text, spacer included, back into its source, so another invisible timestamp
spacer was appended and the bubble could grow a line. The text comparison in
updateUIView also never matched while a spacer was reserved (a new spacer is
built every time), so every update rebuilt the text and its pills.
Rebuild the text only when its inputs change, and only invalidate the cached
size when a pill resizes.
SwiftFormat 0.64.4 flags `else { if … }` blocks with its nestedIf rule,
which fails the lint check in the pre-commit hook and on CI. Flatten the
five remaining cases into `else if` chains. No behaviour change.
Drop -test-repetition-relaunch-enabled from the run-tests command. With
it, xcodebuild re-runs the whole test selection after any failure, even
though Swift Testing (6.4+) already retries just the failing test case
in-process. The tradeoff is that a runner crash is no longer retried.
Set diagnosticCollectionPolicy to Never in the UnitTests and
PreviewTests plans. On any recorded issue xcodebuild otherwise tries to
collect simulator diagnostics, which locally timed out after 600
seconds. IntegrationTests keeps its Always policy.
The ignore and unignore tests waited for isProcessingIgnoreRequest to
transition through [true, false]. The mocked client call returns almost
immediately, so under load the observation can coalesce and only ever
see false, making the test time out after 10 seconds and triggering a
CI retry.
Wait on the durable outcome instead (the recipient's ignored state, or
the alert on failure) and assert only that, dropping the processing
state checks which no longer cover anything.
Load the picked screenshot with .task(id:) instead of an unstructured Task
so that picking a new item or removing the screenshot cancels any load in
progress. Previously a slow load could finish after removal and re-attach
the screenshot, or overwrite a newer pick.
Clear the picker selection once each load finishes, successful or not, so
picking the same item again always triggers a new load.
The PhotosPicker selection binding was never cleared when removing the
screenshot, so the picker kept showing the item as selected and picking
it again didn't change the binding, meaning onChange never fired and the
image couldn't be attached again. Reset the selection on removal.
Fixes#6258
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Fix custom titles covering the toolbar after a cancelled swipe back
On iOS 26 and 27, cancelling the interactive pop gesture leaves a custom
navigation title view (e.g. the room header) at its full width, so it
covers the trailing toolbar buttons until the screen is left. UIKit
restores the title's container but never lays the title out inside it
again.
Work around it by observing both pop gestures and laying out the title
view's container again when the pop is cancelled. It's only applied on
iOS 26+ and marked with a TODO to remove once Apple fixes the bug.
* Make singletons a last resort in AGENTS.md
Add a Dependency Injection rule: use a shared singleton only as a last
resort.
* Apply the cancelled swipe back title fix only to room header screens
Review feedback: hooking every navigation stack does more introspection
than needed. The bug only shows up when RoomHeaderView is the title, so
move the workaround next to it and apply it to the 4 screens that use
it: room, thread, space and join room (knocked).
Checked on the simulator: with the fix removed, a cancelled swipe back
leaves the title too wide on the room, thread and join room screens;
with the fix applied, the room, thread, join room and space titles stay
truncated.
Re-record the SpaceScreen preview snapshots. Wrapping that screen in
any if/else changes how the snapshot test renders it, even when the
workaround itself doesn't run. The app isn't affected.
* Move mapTilerConfiguration into `AccountSettings`.
* Re-order notification tone setting into the Configuration section.
* Update the Enterprise submodule.
The notification extension increments the app badge for every
notification it delivers, without the app knowing about it. The app
used to correct this drift by setting the badge from the room list on
every update, but since #6337 the NotificationService only publishes
the badge count when it changes.
Publish the badge count on every room list update again so the
NotificationManager always resets the app badge.
Brings in a fix for rooms that kept back-paginating in the background
while looking for their latest event, which started with 26.10.20.
The SDK mocks are regenerated for the new optional request config
parameter on the raw send methods.
matrix-rust-sdk: 8de215a0aa0026afa5754ae5f05a6d168d1a1d60
* Fix a crash when opening the camera while it's unavailable.
The app set the image picker's source to the camera without checking it
could be used. iOS throws when it can't: when Screen Time or a device
management profile blocks the camera, or while it's already in use.
Check AppMediator.isCameraAvailable when Camera or Take photo is tapped in
the room and thread composers, profile editing, room editing and room
creation. If it's unavailable, show a toast instead of opening the picker.
Also handle Cancel in the camera picker so the sheet closes through the
coordinator, like the photo library and document pickers.
Sentry: ELEMENT-X-IOS-SP
* Update the Enterprise submodule.
Picks up the create room hook test fix that passes the new appMediator argument.
* Use the Localazy string for the camera unavailable toast.
The copy is now in Localazy as error_camera_unavailable ("The camera is
not available"), so it replaces the untranslated string.
* Order appMediator consistently with CommonFlowParameters.
Move appMediator before analytics and userIndicatorController in the create room, room details edit and user details edit screens, their call sites and tests.
Co-authored-by: Velin92 <34335419+Velin92@users.noreply.github.com>
* Update the Enterprise submodule.
Picks up the create room hook test passing appMediator before analytics, to
match the new init order.
* Update the Enterprise submodule.
Points at Enterprise main now that element-ios-enterprise#42 is merged.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Replaces the shared CodeHyphenationLayoutManagerDelegate with an
NSLayoutManagerDelegate conformance on MessageTextView, as it's already
the delegate for its gesture recognizers and pills. The layout manager
only holds its delegate weakly and the text view owns the layout manager,
so no shared instance or stored property is needed.
The code block test now uses a <pre> without a nested <code>, so it
actually covers the CodeBlock check rather than passing through the
InlineCode one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When a word in inline code (or a code block) is too long for the line,
TextKit breaks it with an inserted hyphen, so commit hashes, UUIDs and
identifiers render with characters that aren't part of the code.
Disabling hyphenation through the paragraph style has no effect on this
fallback, so MessageText now sets an NSLayoutManagerDelegate that refuses
to hyphenate before any character marked as code. Code wraps by character
instead while regular message text keeps its existing behaviour.
The delegate is a shared instance rather than a stored property on
MessageTextView: UITextView(usingTextLayoutManager:) skips the subclass's
stored property initialisers, so such a property would be nil.
Fixes#5725
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Multi-select forwarding is ready to ship, so Forward from the message menu now
always starts a selection in the room, thread, focused and pinned timelines.
Media timelines still forward the single item straight away.
Removes the messageMultiSelectEnabled setting and its developer option, the
selection state's isEnabled gate and the publisher that kept it in sync, the two
unit tests that only covered the flag, and the preview setup that switched it on.
Like Android, a call that comes in while another one rings, or while a web view call runs, no longer rings: it's reported to CallKit as missed so it shows in Recents. An ongoing native call is left alone, since CallKit tracks it and offers its own call waiting. A second push for the ring that's already ringing is reported as handled, without a missed entry.
An answered call that never opens (e.g. its room isn't joined) is dropped when its call session is torn down, so it can't block later calls. The unanswered timeout is now cancelled as soon as a call is answered, rather than a second later, when it may already belong to a call that rang since.
CompoundIcon already scales its size with Dynamic Type, but the chevron
was given a size that was itself a @ScaledMetric, so it scaled twice:
the button reached about 202pt at the largest accessibility size, more
than twice the composer's mic button.
Pass the base icon size and scale the icon, its padding and the badge
once, relative to headingLG like the composer buttons. The button now
keeps its proportions at every size (72pt at the largest, mic 88pt)
and is unchanged at the default size.
Only the first image was checked for GPS before stripping, so a file
whose later images carried a location, but not its first, was sent
unchanged with that location. Every image is checked now.
GPS stored only in XMP was already caught, because ImageIO reports it
in the image's GPS properties.
Spatial photos pair their images in a stereo group. ImageIO only writes
that group from the properties each image is added with, so re-encoding
a photo to remove its location dropped the pairing, and the photo was
sent as a flat one with hidden extra images.
Each image is now added with its stereo group again, read from the
source's container properties, so the left, right and monoscopic images
keep their roles along with the group's disparity adjustment. ImageIO
ignores the group's image index keys and anything it can't write, so the
group is passed on as it is.
Brings in event cache fixes: no automatic back-pagination for spaces
and non-joined rooms, and rooms shrink again after background
back-pagination.
matrix-rust-sdk: 56bc59112822e7eb25943a95e02502855cdeef2d
Create account sent prompt=consent, the same as Sign in, so MAS opened its
sign-in page and new users were asked for a password they didn't have.
The create prompt was turned off because MAS used to sign you straight into
an existing browser session (element-hq/matrix-authentication-service#3429).
MAS v0.15.0 fixed that by always showing its consent page, so send
prompt=create again for registration, but only when the server advertises it.
The eye button shows what tapping it will do, so a hidden key shows the
open eye. This restores Compound's original icon order.
Re-record the recovery key screen and the encryption settings out-of-sync
UI test snapshots for the new field.
The recovery key field now uses Compound's secure text field style, which
adds the show/hide button Android already has. Autocapitalisation and
autocorrection are off so a revealed key isn't altered while typing.
Compound's eye icon now shows a crossed eye while the text is hidden and an
open eye while it's shown, matching Android and Compound web.
Expiry was only checked when a location update arrived. A phone that
doesn't move gets none, so an expired share kept GPS, the location
indicator and the room banner on.
Each account's service now schedules one task for the next share to
expire, rescheduled whenever its shares change and re-armed if the wall
clock lags behind the sleep. Shares that expired while the app wasn't
running are dropped when the service starts. Time comes from an
injected TimeProvider so the tests drive it with ManualClock.
Closes#6367
Core Location reports CLError.locationUnknown when it can't get a fix
straight away and keeps trying, but didFailWithError stopped every
account's shares on any error. Ignore that one error and keep stopping
on real failures such as .denied.
Closes#6366
* Remove the homeserver parameter from user hooks.
* Split the OAuthPresenter hook into two.
With one living directly on the UserHooks.
* Add developerOptionsScreenHook to the UserHooks.
* Remove appHooks from the flowParameters.