mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Use XcodeGen files for app variants and setup Enterprise submodule. (#2976)
- Create an app.yml with the base app variant. - Override app.yml contents on Nightly/PR builds. - Add AppHooks mechanism. - Add Enterprise submodule. - Conditionally import Enterprise/fastlane/Fastfile if available.
This commit is contained in:
@@ -29,6 +29,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
||||
private let appMediator: AppMediator
|
||||
private let appSettings: AppSettings
|
||||
private let appDelegate: AppDelegate
|
||||
private let appHooks: AppHooks
|
||||
private let elementCallService: ElementCallServiceProtocol
|
||||
|
||||
/// Common background task to continue long-running tasks in the background.
|
||||
@@ -65,10 +66,13 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
||||
@Consumable private var storedAppRoute: AppRoute?
|
||||
|
||||
init(appDelegate: AppDelegate) {
|
||||
let appHooks = AppHooks()
|
||||
appHooks.configure()
|
||||
|
||||
windowManager = WindowManager(appDelegate: appDelegate)
|
||||
appMediator = AppMediator(windowManager: windowManager)
|
||||
|
||||
let appSettings = AppSettings()
|
||||
let appSettings = appHooks.runAppSettingsHook(AppSettings())
|
||||
|
||||
MXLog.configure(logLevel: appSettings.logLevel)
|
||||
|
||||
@@ -83,6 +87,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
||||
|
||||
self.appDelegate = appDelegate
|
||||
self.appSettings = appSettings
|
||||
self.appHooks = appHooks
|
||||
appRouteURLParser = AppRouteURLParser(appSettings: appSettings)
|
||||
|
||||
elementCallService = ElementCallService()
|
||||
|
||||
@@ -74,6 +74,14 @@ final class AppSettings {
|
||||
store = userDefaults
|
||||
}
|
||||
|
||||
// MARK: - Hooks
|
||||
|
||||
func override(defaultHomeserverAddress: String? = nil) {
|
||||
if let defaultHomeserverAddress {
|
||||
self.defaultHomeserverAddress = defaultHomeserverAddress
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Application
|
||||
|
||||
/// Whether or not the app is a development build that isn't in production.
|
||||
@@ -94,7 +102,7 @@ final class AppSettings {
|
||||
|
||||
/// The default homeserver address used. This is intentionally a string without a scheme
|
||||
/// so that it can be passed to Rust as a ServerName for well-known discovery.
|
||||
let defaultHomeserverAddress = "matrix.org"
|
||||
private(set) var defaultHomeserverAddress = "matrix.org"
|
||||
|
||||
/// An override of the homeserver's Sliding Sync proxy URL. This allows development against servers
|
||||
/// that don't yet have an officially trusted proxy configured in their well-known.
|
||||
|
||||
Reference in New Issue
Block a user