mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Rebrand as HealthChat and pin the account provider to healthchat.ch
Applies the HealthChat product identity through the fork seams upstream already provides, so no upstream logic files are touched and merges stay clean. - Variants/HealthChat/healthchat.yml holds the identity scalars (display name, bundle id ch.healthchat.element, app group, development team) and is included permanently from project.yml. APP_NAME stays ElementX so the module name and @testable import ElementX keep working. - ElementX/Sources/AppHooks/HealthChat/ registers an AppSettings hook pinning accountProviders to healthchat.ch with other providers disabled, push through sygnal.healthchat.ch and a custom-scheme OIDC redirect; plus a Compound hook recolouring the accent token family to the HealthChat blue. - Entitlements are edited directly in ElementX/SupportingFiles/target.yml rather than in the variant, because XcodeGen concatenates arrays on include-merge and a variant can override scalars but cannot remove array entries. Drops the Element Classic app group and keychain group, and narrows associated domains to app.healthchat.ch, keeping matrix.to for permalinks. - Info.plist CFBundleName now follows APP_DISPLAY_NAME — it, not CFBundleDisplayName, is what the web authentication sign-in alert shows. - App logo and app icon assets swapped in place; the onboarding welcome title moves to a new screen_onboarding_welcome_title_ios untranslated string.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// Copyright 2026 Novaloop AG
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
/// Pins HealthChat's server, OIDC and push configuration by overriding `AppSettings` at startup.
|
||||
///
|
||||
/// - `accountProviders` / `allowOtherAccountProviders` lock every user to `healthchat.ch` (the server name;
|
||||
/// `.well-known` delegates to `matrix.healthchat.ch`) and hide the change-server / create-account UI.
|
||||
/// - `oAuthRedirectURL` uses the app's own URL scheme so the OIDC/MAS callback needs no associated domain.
|
||||
/// - Legacy `element.io` help/encryption/copyright URLs are passed through unchanged for now.
|
||||
struct HealthChatAppSettingsHook: AppSettingsHookProtocol {
|
||||
func configure(_ appSettings: AppSettings) -> AppSettings {
|
||||
appSettings.override(accountProviders: ["healthchat.ch"],
|
||||
allowOtherAccountProviders: false,
|
||||
hideBrandChrome: false,
|
||||
pushGatewayBaseURL: "https://sygnal.healthchat.ch",
|
||||
oAuthRedirectURL: "ch.healthchat.element:/oauth/callback",
|
||||
websiteURL: "https://healthchat.ch",
|
||||
logoURL: "https://app.healthchat.ch/themes/element/img/logos/element-logo.png",
|
||||
copyrightURL: appSettings.copyrightURL,
|
||||
acceptableUseURL: "https://www.healthchat.ch/datenschutz",
|
||||
privacyURL: "https://www.healthchat.ch/datenschutz",
|
||||
encryptionURL: appSettings.encryptionURL,
|
||||
deviceVerificationURL: appSettings.deviceVerificationURL,
|
||||
chatBackupDetailsURL: appSettings.chatBackupDetailsURL,
|
||||
identityPinningViolationDetailsURL: appSettings.identityPinningViolationDetailsURL,
|
||||
historySharingDetailsURL: appSettings.historySharingDetailsURL,
|
||||
elementWebHosts: ["app.healthchat.ch"],
|
||||
accountProvisioningHost: appSettings.accountProvisioningHost,
|
||||
bugReportApplicationID: appSettings.bugReportApplicationID,
|
||||
analyticsTermsURL: appSettings.analyticsTermsURL,
|
||||
mapTilerConfiguration: AppSettings.bundledMapTilerConfiguration)
|
||||
return appSettings
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user