Group the standalone modules that live outside of the app targets under a
single Components folder. Updates the XcodeGen include, the Codecov ignore
path and the Sourcery output path used by the generate-sdk-mocks tool.
* Update Project Dependencies
* Run XcodeGen, update Package.resolved and Settings.bundle
* Run XcodeGen, update Package.resolved and Settings.bundle
* Opt out of PostHog's ridiculous new notification tracking.
Shouldn't be necessary given we have swizzling disabled, but just to be safe.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Element CI <ci@element.io>
Co-authored-by: Doug <douglase@element.io>
The shim is embedded but not linked, so nothing at build time proves it is
still there. If it stops being copied into the bundle, or the class is renamed,
dlopen simply fails at runtime and the user gets a blank map behind an error
alert. Nothing in CI would notice.
The test asserts the framework loads and the shim resolves, which is exactly
the pair that breaks if either side of the arrangement is disturbed.
MapLibre ships as a dynamic framework, so being named in the app's load
commands means dyld loads it before main runs on every launch: 7.3 MB paged in,
133 C++ static initialisers run and its classes registered, all for a map that
only appears once a location screen is opened.
Measured on an iPhone 17 Pro with two otherwise identical probe apps launched
alternately, linking MapLibre takes pre-main from 11.1 ms to 23.2 ms, and on a
cold launch from 32.9 ms to 60.7 ms. Loading it on demand brings pre-main back
to the 11.1 ms baseline and moves the roughly 11 ms it costs to dlopen to the
moment the map first appears.
MapLibreShim is now embedded but not linked, and the app resolves the shim
through the ObjC runtime after dlopen-ing it. MapLibre stays in the bundle as
an embed-only framework reference so the shim's load command can resolve
against it, expressed as an implicit framework because xcodegen can't describe
embed-without-link for a package product.
Timeline location messages already use the static tile view, which never
touched MapLibre, so the shim only loads for interactive maps.
Second step towards loading MapLibre on demand: everything that touches it now
lives in one framework, so that framework can later be left unlinked.
The interactive map view, its annotation view and the coordinate animator move
into MapLibreShim, which reaches the app through MapLibreShimProtocol. The app
side keeps its MapLibreMapView call site and becomes a thin wrapper that builds
a MapViewConfiguration, passing the app-only pieces (map style URLs, marker
views, tint colour) across as closures so the shim needs nothing from the app.
LocationAnnotation loses its MapLibre conformance and becomes a plain struct,
with the shim mapping it onto its own annotation type. MapLibre's log
forwarding moves into the shim as well, since TargetConfiguration can no longer
reach it.
Groundwork for loading MapLibre on demand. The map view is about to move into
its own framework, and both sides need to agree on the types that cross the
boundary, so ShowUserLocationMode and MapLibreError move out of the app into a
small framework that the app links.
* Adjust login flow to exclusively use the ServerSelectionScreen
* Move async code to server selection vm
* ServerSelection supports pro picker options
* Use homeserver address for both confirmation and picker modes
* rename ServerSelectionScreenMode
* remove ServerConfirmationScreen
It's been superseded by the ServerSelectionScreen
* rename userInput
* Update strings with latest design strings
* Add server input autocompletion
* Store previous servers in AppSettings and autofill on server signin
* Audit changes for logging
* Enforce lowercase server history storage
* Update tests
* Update Xcode project
* PR review fixups
* Add HomeserverHistoryManager
* Review fixups 2
* Review fixups 3
* Extract a shared helper for loading a media preview
The four screens that show a fullscreen avatar each had their own copy of the same
load-and-wrap logic. Move it to MediaPreviewItem.load, with the mime type as a
parameter defaulting to JPEG, and leave each screen's loading indicator where it is.
Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>
* Only dismiss a QuickLook preview that is still presented
UIKit forwards dismiss() up the presentation chain when the receiver has nothing
presented, so dismissing the avatar view was dismissing the profile details sheet
also.
Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>
* Allow tapping the avatar in the room member bottom sheet to view it fullscreen
Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>
---------
Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>
Indent the new method's blank lines to satisfy SwiftFormat's
indent-blank-lines rule, which failed the Tests CI jobs.
Also address review findings on the crop itself:
- Request a 256pt thumbnail box at both donation sites so cropping a
scaled (aspect-fit) thumbnail to its minor axis keeps enough
resolution for the share sheet's circle.
- Round the draw offsets to whole pixels so odd-sized crops blit
instead of resampling.
- Log when fetched avatar data can't be decoded rather than silently
swapping in the placeholder, and document the non-obvious
format.scale pinning.
The media repo serves thumbnails with the scale method, so avatars keep
their source aspect ratio. The system stretches whatever INImage we
donate to fill a circle, distorting any non-square avatar in the share
sheet's conversation suggestions (and notifications, which are donated
the same image).
Centre-crop donated avatars to a square before handing them to the
system, in both the timeline's send message intent donation and the
NSE's communication context.
* Support for waitingForAuth continuation sender during Link new device
* Stop automatically regenerating new QR codes when they expire.
This reverts part of commit e235e3ba81.
* Add a timeout after the Face/TouchID verification when linking a desktop computer.
---------
Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
testMediaEventsTimelineScreen timed out on CI after 2 minutes. The spindump
shows the runner parked inside XCUIApplication.terminate() with the app
process alive but completely idle, so the audits had already finished and the
teardown alone exhausted the remaining budget.
The test is also the heaviest one in the plan, 120s on CI against 88s for the
next slowest and only 19s locally, since everything runs with the address and
undefined behaviour sanitizers enabled. Doubling the allowance gives all of
them enough headroom.
The accessibility audit flagged the avatar node in AvatarSettingsButtonLabel
as having no description, since it carried an accessibility identifier but
never a label.
The avatar is purely decorative, both screens that use it wrap it in a button
that is already labelled with the Settings title, so it is now hidden from
accessibility and the identifier has moved up onto the buttons themselves,
where the UI and integration tests query it.