Jared L cff46137b9 Report user presence on app lifecycle transitions (#5838)
* Report user presence on app lifecycle transitions

Adds a PresenceReporter driven by the app lifecycle handlers and the sharePresence setting: online when foreground-active and sharing, unavailable when backgrounded and sharing, offline when not sharing. Sends are immediate, deduped, and serialized latest-wins. Background app refresh and the NSE seed the process presence to offline so their sync requests carry no presence side effect. Presence rides on the SDK's process-global state, so every sync path is covered without touching sync lifecycle.

Signed-off-by: Jared L <48422312+lhjt@users.noreply.github.com>

* Add presence reporter tests

Pins the presence reporter invariants: the never-online sweep with sharing off, an immediate online send on foreground-active, dedupe of repeated states, latest-wins ordering of serialized sends, and the NSE offline seed.

Signed-off-by: Jared L <48422312+lhjt@users.noreply.github.com>

* wip: address review comments

Signed-off-by: Jared L <48422312+lhjt@users.noreply.github.com>

* refactor: remove obsolete presence heartbeat

Remove the shared activity snapshot, heartbeat refresh, and notification-extension freshness policy while retaining the session-scoped presence service and its serialized lifecycle reporting. Restore the NSE's intermediate one-time offline seed so the cleanup remains buildable ahead of the final sync-presence correction.

Signed-off-by: Jared L <48422312+lhjt@users.noreply.github.com>

* fix: make notification extension presence-neutral

Configure the built NSE client with offline sync presence without sending an immediate presence update. Keep notification setup non-fatal when presence configuration fails and remove the temporary production test seam.

Signed-off-by: Jared L <48422312+lhjt@users.noreply.github.com>

* chore: restore application lifecycle logging

Restore the pre-existing foreground lifecycle diagnostics that were removed during the presence refactor. Keep presence reporting session-scoped and clarify that background refresh configures the client's sync presence without an immediate update.

Signed-off-by: Jared L <48422312+lhjt@users.noreply.github.com>

---------

Signed-off-by: Jared L <48422312+lhjt@users.noreply.github.com>
2026-07-22 15:23:36 +01:00
2026-07-20 11:16:11 +02:00
2026-07-20 11:16:11 +02:00
2026-06-18 17:55:31 +02:00
2026-07-20 11:16:11 +02:00
2026-07-20 11:16:11 +02:00
2026-07-20 11:16:11 +02:00
2026-07-20 11:16:11 +02:00
2026-07-02 17:12:39 +02:00
2026-07-15 06:36:17 -07:00
…

Element iOS Matrix room #element-x-ios:matrix.org GitHub

Build Status GitHub release (latest by date)

codecov

Element X iOS

Element X iOS is the next-generation Matrix client provided by Element.

Compared to the previous-generation Element Classic, it is a total rewrite using the Matrix Rust SDK underneath and targeting devices running iOS 18+.

Rust SDK

Element X leverages the Matrix Rust SDK through an FFI layer exposed as a swift package that the final client can directly import and use. We're doing this as a way to share code between platforms, with Element X Android using the same SDK.

Status

This project is actively developed and supported. New users are recommended to use Element X instead of the previous-generation app.

Contributing

Please see our contribution guide.

Come chat with the community in the dedicated Matrix room.

Build instructions

Please refer to the setting up a development environment section from the contribution guide.

Support

When you are experiencing an issue on Element X iOS, please first search in GitHub issues and then in #element-x-ios:matrix.org. If after your research you still have a question, ask at #element-x-ios:matrix.org. Otherwise feel free to create a GitHub issue if you encounter a bug or a crash, by explaining clearly in detail what happened. You can also perform bug reporting (Rageshake) from the Element application by going to the application settings. This is especially recommended when you encounter a crash.

Forking

Please read our forking guide.

Copyright (c) 2025 - 2026 Element Creations Ltd. Copyright (c) 2022 - 2025 New Vector Ltd.

This software is dual licensed by Element Creations Ltd (Element). It can be used either:

(1) for free under the terms of the GNU Affero General Public License (as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version); OR

(2) under the terms of a paid-for Element Commercial License agreement between you and Element (the terms of which may vary depending on what you and Element have agreed to).

Unless required by applicable law or agreed to in writing, software distributed under the Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses.

S
Description
No description provided
Readme AGPL-3.0 143 MiB
Languages
Swift 99.8%