Mauro 7a87b5f04c Fix a crash when opening the camera while it's unavailable. (#6388)
* 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>
2026-10-23 17:22:22 +02:00
2026-07-20 11:16:11 +02:00
2026-07-20 11:16:11 +02:00
2026-10-21 05:50:56 -07:00
2024-09-06 16:34:30 +03:00
2026-10-21 05:50:56 -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 152 MiB
Languages
Swift 99.7%
Python 0.1%