2020-07-30 08:02:02 +00:00
|
|
|
//
|
|
|
|
// Copyright 2020 Vector Creations Ltd
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
/// BuildSettings provides settings computed at build time.
|
|
|
|
/// In future, it may be automatically generated from xcconfig files
|
|
|
|
@objcMembers
|
|
|
|
final class BuildSettings: NSObject {
|
|
|
|
|
2020-07-31 07:15:57 +00:00
|
|
|
// MARK: - Bundle Settings
|
2020-07-30 08:10:42 +00:00
|
|
|
static var applicationGroupIdentifier: String {
|
2020-11-30 13:05:30 +00:00
|
|
|
guard let applicationGroupIdentifier = Bundle.app.object(forInfoDictionaryKey: "applicationGroupIdentifier") as? String else {
|
|
|
|
fatalError("applicationGroupIdentifier should be defined")
|
|
|
|
}
|
|
|
|
return applicationGroupIdentifier
|
2020-07-30 08:10:42 +00:00
|
|
|
}
|
|
|
|
|
2020-08-05 14:11:06 +00:00
|
|
|
static var baseBundleIdentifier: String {
|
2020-11-30 13:05:30 +00:00
|
|
|
guard let baseBundleIdentifier = Bundle.app.object(forInfoDictionaryKey: "baseBundleIdentifier") as? String else {
|
|
|
|
fatalError("baseBundleIdentifier should be defined")
|
|
|
|
}
|
|
|
|
return baseBundleIdentifier
|
2020-08-05 14:11:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static var keychainAccessGroup: String {
|
2020-11-30 13:05:30 +00:00
|
|
|
guard let keychainAccessGroup = Bundle.app.object(forInfoDictionaryKey: "keychainAccessGroup") as? String else {
|
|
|
|
fatalError("keychainAccessGroup should be defined")
|
|
|
|
}
|
|
|
|
return keychainAccessGroup
|
2020-08-05 14:11:06 +00:00
|
|
|
}
|
|
|
|
|
2020-12-18 17:22:46 +00:00
|
|
|
static var applicationURLScheme: String? {
|
|
|
|
guard let urlTypes = Bundle.app.object(forInfoDictionaryKey: "CFBundleURLTypes") as? [AnyObject],
|
|
|
|
let urlTypeDictionary = urlTypes.first as? [String: AnyObject],
|
|
|
|
let urlSchemes = urlTypeDictionary["CFBundleURLSchemes"] as? [AnyObject],
|
|
|
|
let externalURLScheme = urlSchemes.first as? String else {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return externalURLScheme
|
|
|
|
}
|
|
|
|
|
2020-08-05 14:11:06 +00:00
|
|
|
static var pushKitAppIdProd: String {
|
2020-08-06 07:51:39 +00:00
|
|
|
return baseBundleIdentifier + ".ios.voip.prod"
|
2020-08-05 14:11:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static var pushKitAppIdDev: String {
|
2020-08-06 07:51:39 +00:00
|
|
|
return baseBundleIdentifier + ".ios.voip.dev"
|
2020-08-05 14:11:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static var pusherAppIdProd: String {
|
2020-08-06 07:51:39 +00:00
|
|
|
return baseBundleIdentifier + ".ios.prod"
|
2020-08-05 14:11:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static var pusherAppIdDev: String {
|
2020-08-06 07:51:39 +00:00
|
|
|
return baseBundleIdentifier + ".ios.dev"
|
2020-08-05 14:11:06 +00:00
|
|
|
}
|
|
|
|
|
2020-08-10 15:16:07 +00:00
|
|
|
static var pushKitAppId: String {
|
|
|
|
#if DEBUG
|
|
|
|
return pushKitAppIdDev
|
|
|
|
#else
|
|
|
|
return pushKitAppIdProd
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
static var pusherAppId: String {
|
|
|
|
#if DEBUG
|
|
|
|
return pusherAppIdDev
|
|
|
|
#else
|
|
|
|
return pusherAppIdProd
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2020-07-31 09:44:12 +00:00
|
|
|
// Element-Web instance for the app
|
|
|
|
static let applicationWebAppUrlString = "https://app.element.io"
|
|
|
|
|
2022-03-28 15:52:07 +00:00
|
|
|
|
|
|
|
// MARK: - Localization
|
|
|
|
|
|
|
|
/// Whether to allow the app to use a right to left layout or force left to right for all languages
|
|
|
|
static let disableRightToLeftLayout = true
|
|
|
|
|
2020-07-31 06:29:22 +00:00
|
|
|
|
2020-07-31 10:12:05 +00:00
|
|
|
// MARK: - Server configuration
|
2020-07-31 10:47:28 +00:00
|
|
|
|
|
|
|
// Default servers proposed on the authentication screen
|
2020-08-03 13:07:39 +00:00
|
|
|
static let serverConfigDefaultHomeserverUrlString = "https://matrix.org"
|
|
|
|
static let serverConfigDefaultIdentityServerUrlString = "https://vector.im"
|
2020-07-31 10:47:28 +00:00
|
|
|
|
2020-08-03 13:07:39 +00:00
|
|
|
static let serverConfigSygnalAPIUrlString = "https://matrix.org/_matrix/push/v1/notify"
|
2020-07-31 10:12:05 +00:00
|
|
|
|
|
|
|
|
2020-07-31 07:15:57 +00:00
|
|
|
// MARK: - Legal URLs
|
2021-03-31 17:04:00 +00:00
|
|
|
|
|
|
|
// Note: Set empty strings to hide the related entry in application settings
|
2020-07-31 06:29:22 +00:00
|
|
|
static let applicationCopyrightUrlString = "https://element.io/copyright"
|
|
|
|
static let applicationPrivacyPolicyUrlString = "https://element.io/privacy"
|
|
|
|
static let applicationTermsConditionsUrlString = "https://element.io/terms-of-service"
|
2021-06-06 23:54:50 +00:00
|
|
|
static let applicationHelpUrlString =
|
|
|
|
"https://element.io/help"
|
2020-07-31 06:37:27 +00:00
|
|
|
|
|
|
|
|
2021-11-04 16:22:58 +00:00
|
|
|
// MARK: - Permalinks
|
|
|
|
// Hosts/Paths for URLs that will considered as valid permalinks. Those permalinks are opened within the app.
|
|
|
|
static let permalinkSupportedHosts: [String: [String]] = [
|
2020-07-31 10:08:15 +00:00
|
|
|
"app.element.io": [],
|
|
|
|
"staging.element.io": [],
|
|
|
|
"develop.element.io": [],
|
2020-08-06 08:05:15 +00:00
|
|
|
"mobile.element.io": [""],
|
2020-07-31 10:08:15 +00:00
|
|
|
// Historical ones
|
|
|
|
"riot.im": ["/app", "/staging", "/develop"],
|
|
|
|
"www.riot.im": ["/app", "/staging", "/develop"],
|
|
|
|
"vector.im": ["/app", "/staging", "/develop"],
|
|
|
|
"www.vector.im": ["/app", "/staging", "/develop"],
|
|
|
|
// Official Matrix ones
|
|
|
|
"matrix.to": ["/"],
|
|
|
|
"www.matrix.to": ["/"],
|
2021-10-29 10:07:22 +00:00
|
|
|
// Client Permalinks (for use with `BuildSettings.clientPermalinkBaseUrl`)
|
2021-11-04 12:29:49 +00:00
|
|
|
// "example.com": ["/"],
|
|
|
|
// "www.example.com": ["/"],
|
2020-07-31 10:08:15 +00:00
|
|
|
]
|
|
|
|
|
2021-10-29 10:07:22 +00:00
|
|
|
// For use in clients that use a custom base url for permalinks rather than matrix.to.
|
|
|
|
// This baseURL is used to generate permalinks within the app (E.g. timeline message permalinks).
|
2021-11-04 12:29:49 +00:00
|
|
|
// Optional String that when set is used as permalink base, when nil matrix.to format is used.
|
|
|
|
// Example value would be "https://www.example.com", note there is no trailing '/'.
|
2021-11-05 11:08:51 +00:00
|
|
|
static let clientPermalinkBaseUrl: String? = nil
|
2020-07-31 10:08:15 +00:00
|
|
|
|
2020-07-31 07:15:57 +00:00
|
|
|
// MARK: - VoIP
|
2020-07-31 06:49:30 +00:00
|
|
|
static var allowVoIPUsage: Bool {
|
2021-02-09 09:34:45 +00:00
|
|
|
#if canImport(JitsiMeetSDK)
|
2020-07-31 06:49:30 +00:00
|
|
|
return true
|
|
|
|
#else
|
|
|
|
return false
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
static let stunServerFallbackUrlString: String? = "stun:turn.matrix.org"
|
|
|
|
|
2020-07-31 13:14:26 +00:00
|
|
|
// MARK: - Public rooms Directory
|
2020-07-31 07:02:35 +00:00
|
|
|
// List of homeservers for the public rooms directory
|
2020-08-03 13:07:39 +00:00
|
|
|
static let publicRoomsDirectoryServers = [
|
2021-04-19 19:09:45 +00:00
|
|
|
"matrix.org",
|
|
|
|
"gitter.im"
|
2020-07-31 07:02:35 +00:00
|
|
|
]
|
|
|
|
|
2021-04-13 17:21:07 +00:00
|
|
|
// MARK: - Rooms Screen
|
|
|
|
static let roomsAllowToJoinPublicRooms: Bool = true
|
2020-07-31 07:02:35 +00:00
|
|
|
|
2020-07-31 09:28:57 +00:00
|
|
|
// MARK: - Analytics
|
2022-02-24 15:46:18 +00:00
|
|
|
|
|
|
|
/// A type that represents how to set up the analytics module in the app.
|
|
|
|
///
|
|
|
|
/// **Note:** Analytics are disabled by default for forks.
|
|
|
|
/// If you are maintaining a fork, set custom configurations.
|
|
|
|
struct AnalyticsConfiguration {
|
|
|
|
/// Whether or not analytics should be enabled.
|
|
|
|
let isEnabled: Bool
|
|
|
|
/// The host to use for PostHog analytics.
|
|
|
|
let host: String
|
|
|
|
/// The public key for submitting analytics.
|
|
|
|
let apiKey: String
|
|
|
|
/// The URL to open with more information about analytics terms.
|
|
|
|
let termsURL: URL
|
|
|
|
}
|
|
|
|
|
2021-12-09 16:20:22 +00:00
|
|
|
#if DEBUG
|
2022-02-24 15:46:18 +00:00
|
|
|
/// The configuration to use for analytics during development. Set `isEnabled` to false to disable analytics in debug builds.
|
|
|
|
static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: BuildSettings.baseBundleIdentifier.starts(with: "im.vector.app"),
|
2022-04-11 10:48:55 +00:00
|
|
|
host: "https://posthog.element.dev",
|
|
|
|
apiKey: "phc_VtA1L35nw3aeAtHIx1ayrGdzGkss7k1xINeXcoIQzXN",
|
2022-02-24 15:46:18 +00:00
|
|
|
termsURL: URL(string: "https://element.io/cookie-policy")!)
|
2021-12-09 16:20:22 +00:00
|
|
|
#else
|
2022-02-24 15:46:18 +00:00
|
|
|
/// The configuration to use for analytics. Set `isEnabled` to false to disable analytics.
|
|
|
|
static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: BuildSettings.baseBundleIdentifier.starts(with: "im.vector.app"),
|
|
|
|
host: "https://posthog.hss.element.io",
|
|
|
|
apiKey: "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
|
|
|
|
termsURL: URL(string: "https://element.io/cookie-policy")!)
|
2021-12-09 16:20:22 +00:00
|
|
|
#endif
|
|
|
|
|
2020-07-31 07:15:57 +00:00
|
|
|
|
|
|
|
// MARK: - Bug report
|
2020-07-31 06:37:27 +00:00
|
|
|
static let bugReportEndpointUrlString = "https://riot.im/bugreports"
|
|
|
|
// Use the name allocated by the bug report server
|
|
|
|
static let bugReportApplicationId = "riot-ios"
|
2022-03-11 16:47:08 +00:00
|
|
|
static let bugReportUISIId = "element-auto-uisi"
|
2020-07-31 09:28:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
// MARK: - Integrations
|
|
|
|
static let integrationsUiUrlString = "https://scalar.vector.im/"
|
|
|
|
static let integrationsRestApiUrlString = "https://scalar.vector.im/api"
|
2020-07-31 09:36:56 +00:00
|
|
|
// Widgets in those paths require a scalar token
|
|
|
|
static let integrationsScalarWidgetsPaths = [
|
|
|
|
"https://scalar.vector.im/_matrix/integrations/v1",
|
|
|
|
"https://scalar.vector.im/api",
|
|
|
|
"https://scalar-staging.vector.im/_matrix/integrations/v1",
|
|
|
|
"https://scalar-staging.vector.im/api",
|
|
|
|
"https://scalar-staging.riot.im/scalar/api",
|
|
|
|
]
|
2022-03-21 14:18:47 +00:00
|
|
|
// Jitsi server used outside integrations to create conference calls from the call button in the timeline.
|
|
|
|
// Setting this to nil effectively disables Jitsi conference calls (given that there is no wellknown override).
|
2022-03-22 14:38:53 +00:00
|
|
|
// Note: this will not remove the conference call button, use roomScreenAllowVoIPForNonDirectRoom setting.
|
2022-03-21 14:18:47 +00:00
|
|
|
static let jitsiServerUrl: URL? = URL(string: "https://jitsi.riot.im")
|
2020-07-31 06:29:22 +00:00
|
|
|
|
|
|
|
|
2020-07-31 07:15:57 +00:00
|
|
|
// MARK: - Features
|
|
|
|
|
2020-07-30 12:15:29 +00:00
|
|
|
/// Setting to force protection by pin code
|
|
|
|
static let forcePinProtection: Bool = false
|
|
|
|
|
2020-09-07 10:41:52 +00:00
|
|
|
/// Max allowed time to continue using the app without prompting PIN
|
|
|
|
static let pinCodeGraceTimeInSeconds: TimeInterval = 0
|
|
|
|
|
2020-07-30 12:15:29 +00:00
|
|
|
/// Force non-jailbroken app usage
|
|
|
|
static let forceNonJailbrokenUsage: Bool = true
|
|
|
|
|
2020-08-03 13:07:39 +00:00
|
|
|
static let allowSendingStickers: Bool = true
|
2020-07-31 06:29:22 +00:00
|
|
|
|
2020-07-30 12:15:29 +00:00
|
|
|
static let allowLocalContactsAccess: Bool = true
|
|
|
|
|
2021-04-01 13:02:43 +00:00
|
|
|
static let allowInviteExernalUsers: Bool = true
|
|
|
|
|
2022-01-18 22:13:10 +00:00
|
|
|
// MARK: - Side Menu
|
2021-06-06 23:54:50 +00:00
|
|
|
static let enableSideMenu: Bool = true
|
2022-01-18 22:13:10 +00:00
|
|
|
static let sideMenuShowInviteFriends: Bool = true
|
|
|
|
|
2021-08-04 09:12:50 +00:00
|
|
|
/// Whether to read the `io.element.functional_members` state event and exclude any service members when computing a room's name and avatar.
|
2021-08-06 09:42:18 +00:00
|
|
|
static let supportFunctionalMembers: Bool = true
|
2021-08-04 09:12:50 +00:00
|
|
|
|
2020-09-17 11:01:29 +00:00
|
|
|
// MARK: - Feature Specifics
|
|
|
|
|
2020-09-17 12:55:41 +00:00
|
|
|
/// Not allowed pin codes. User won't be able to select one of the pin in the list.
|
|
|
|
static let notAllowedPINs: [String] = []
|
2020-07-31 06:29:22 +00:00
|
|
|
|
2020-09-28 15:12:56 +00:00
|
|
|
/// Maximum number of allowed pin failures when unlocking, before force logging out the user. Defaults to `3`
|
|
|
|
static let maxAllowedNumberOfPinFailures: Int = 3
|
|
|
|
|
2020-09-29 13:57:46 +00:00
|
|
|
/// Maximum number of allowed biometrics failures when unlocking, before fallbacking the user to the pin if set or logging out the user. Defaults to `5`
|
2020-09-28 15:12:56 +00:00
|
|
|
static let maxAllowedNumberOfBiometricsFailures: Int = 5
|
|
|
|
|
2020-09-29 13:57:46 +00:00
|
|
|
/// Indicates should the app log out the user when number of PIN failures reaches `maxAllowedNumberOfPinFailures`. Defaults to `false`
|
|
|
|
static let logOutUserWhenPINFailuresExceeded: Bool = false
|
|
|
|
|
|
|
|
/// Indicates should the app log out the user when number of biometrics failures reaches `maxAllowedNumberOfBiometricsFailures`. Defaults to `false`
|
|
|
|
static let logOutUserWhenBiometricsFailuresExceeded: Bool = false
|
|
|
|
|
2021-08-05 08:30:01 +00:00
|
|
|
static let showNotificationsV2: Bool = true
|
|
|
|
|
2021-04-19 16:53:32 +00:00
|
|
|
// MARK: - Main Tabs
|
|
|
|
|
|
|
|
static let homeScreenShowFavouritesTab: Bool = true
|
|
|
|
static let homeScreenShowPeopleTab: Bool = true
|
|
|
|
static let homeScreenShowRoomsTab: Bool = true
|
|
|
|
static let homeScreenShowCommunitiesTab: Bool = true
|
|
|
|
|
2020-08-18 10:05:56 +00:00
|
|
|
// MARK: - General Settings Screen
|
2020-08-03 13:07:39 +00:00
|
|
|
|
|
|
|
static let settingsScreenShowUserFirstName: Bool = false
|
|
|
|
static let settingsScreenShowUserSurname: Bool = false
|
|
|
|
static let settingsScreenAllowAddingEmailThreepids: Bool = true
|
|
|
|
static let settingsScreenAllowAddingPhoneThreepids: Bool = true
|
|
|
|
static let settingsScreenShowThreepidExplanatory: Bool = true
|
|
|
|
static let settingsScreenShowDiscoverySettings: Bool = true
|
|
|
|
static let settingsScreenAllowIdentityServerConfig: Bool = true
|
2021-08-16 16:48:26 +00:00
|
|
|
static let settingsScreenShowConfirmMediaSize: Bool = true
|
2020-08-03 13:07:39 +00:00
|
|
|
static let settingsScreenShowAdvancedSettings: Bool = true
|
|
|
|
static let settingsScreenShowLabSettings: Bool = true
|
|
|
|
static let settingsScreenAllowChangingRageshakeSettings: Bool = true
|
|
|
|
static let settingsScreenAllowChangingCrashUsageDataSettings: Bool = true
|
|
|
|
static let settingsScreenAllowBugReportingManually: Bool = true
|
|
|
|
static let settingsScreenAllowDeactivatingAccount: Bool = true
|
2021-04-01 12:16:06 +00:00
|
|
|
static let settingsScreenShowChangePassword:Bool = true
|
|
|
|
static let settingsScreenShowEnableStunServerFallback: Bool = true
|
2021-04-29 15:53:18 +00:00
|
|
|
static let settingsScreenShowNotificationDecodedContentOption: Bool = true
|
|
|
|
static let settingsScreenShowNsfwRoomsOption: Bool = true
|
2021-04-01 12:16:06 +00:00
|
|
|
static let settingsSecurityScreenShowSessions:Bool = true
|
|
|
|
static let settingsSecurityScreenShowSetupBackup:Bool = true
|
|
|
|
static let settingsSecurityScreenShowRestoreBackup:Bool = true
|
|
|
|
static let settingsSecurityScreenShowDeleteBackup:Bool = true
|
|
|
|
static let settingsSecurityScreenShowCryptographyInfo:Bool = true
|
|
|
|
static let settingsSecurityScreenShowCryptographyExport:Bool = true
|
|
|
|
static let settingsSecurityScreenShowAdvancedUnverifiedDevices:Bool = true
|
2022-04-07 07:38:21 +00:00
|
|
|
/// A setting to enable the presence configuration settings section.
|
|
|
|
static let settingsScreenPresenceAllowConfiguration: Bool = false
|
2021-04-01 12:16:06 +00:00
|
|
|
|
2020-10-26 09:24:40 +00:00
|
|
|
// MARK: - Timeline settings
|
2022-03-28 16:53:34 +00:00
|
|
|
static let roomInputToolbarCompressionMode: MediaCompressionMode = .prompt
|
|
|
|
|
|
|
|
enum MediaCompressionMode {
|
|
|
|
case prompt, small, medium, large, none
|
|
|
|
}
|
2020-10-26 09:24:40 +00:00
|
|
|
|
2021-04-02 13:54:21 +00:00
|
|
|
// MARK: - Room Creation Screen
|
|
|
|
|
2021-04-06 08:47:54 +00:00
|
|
|
static let roomCreationScreenAllowEncryptionConfiguration: Bool = true
|
2021-04-06 08:51:07 +00:00
|
|
|
static let roomCreationScreenRoomIsEncrypted: Bool = true
|
2021-04-06 08:47:54 +00:00
|
|
|
static let roomCreationScreenAllowRoomTypeConfiguration: Bool = true
|
|
|
|
static let roomCreationScreenRoomIsPublic: Bool = false
|
2021-04-19 18:39:07 +00:00
|
|
|
|
|
|
|
// MARK: - Room Screen
|
|
|
|
|
|
|
|
static let roomScreenAllowVoIPForDirectRoom: Bool = true
|
2021-04-20 08:36:05 +00:00
|
|
|
static let roomScreenAllowVoIPForNonDirectRoom: Bool = true
|
2021-04-20 12:57:31 +00:00
|
|
|
static let roomScreenAllowCameraAction: Bool = true
|
|
|
|
static let roomScreenAllowMediaLibraryAction: Bool = true
|
2021-04-20 12:54:53 +00:00
|
|
|
static let roomScreenAllowStickerAction: Bool = true
|
|
|
|
static let roomScreenAllowFilesAction: Bool = true
|
2022-01-03 17:16:49 +00:00
|
|
|
|
|
|
|
// Timeline style
|
2022-02-03 18:05:37 +00:00
|
|
|
static let roomScreenAllowTimelineStyleConfiguration: Bool = true
|
2022-01-04 16:53:15 +00:00
|
|
|
static let roomScreenTimelineDefaultStyleIdentifier: RoomTimelineStyleIdentifier = .plain
|
2022-01-31 13:43:06 +00:00
|
|
|
static var isRoomScreenEnableMessageBubblesByDefault: Bool {
|
2022-01-04 16:53:15 +00:00
|
|
|
return self.roomScreenTimelineDefaultStyleIdentifier == .bubble
|
2022-01-03 17:16:49 +00:00
|
|
|
}
|
2022-03-04 14:48:59 +00:00
|
|
|
static let roomScreenUseOnlyLatestUserAvatarAndName: Bool = false
|
2021-11-19 15:40:52 +00:00
|
|
|
|
2021-10-12 17:06:56 +00:00
|
|
|
/// Allow split view detail view stacking
|
|
|
|
static let allowSplitViewDetailsScreenStacking: Bool = true
|
|
|
|
|
2021-04-29 15:03:34 +00:00
|
|
|
// MARK: - Room Contextual Menu
|
|
|
|
|
|
|
|
static let roomContextualMenuShowMoreOptionForMessages: Bool = true
|
|
|
|
static let roomContextualMenuShowMoreOptionForStates: Bool = true
|
|
|
|
static let roomContextualMenuShowReportContentOption: Bool = true
|
2021-04-20 12:54:53 +00:00
|
|
|
|
|
|
|
// MARK: - Room Info Screen
|
|
|
|
|
2021-04-20 12:57:31 +00:00
|
|
|
static let roomInfoScreenShowIntegrations: Bool = true
|
2021-04-02 13:54:21 +00:00
|
|
|
|
2020-08-18 10:05:56 +00:00
|
|
|
// MARK: - Room Settings Screen
|
|
|
|
|
|
|
|
static let roomSettingsScreenShowLowPriorityOption: Bool = true
|
|
|
|
static let roomSettingsScreenShowDirectChatOption: Bool = true
|
|
|
|
static let roomSettingsScreenAllowChangingAccessSettings: Bool = true
|
|
|
|
static let roomSettingsScreenAllowChangingHistorySettings: Bool = true
|
|
|
|
static let roomSettingsScreenShowAddressSettings: Bool = true
|
|
|
|
static let roomSettingsScreenShowFlairSettings: Bool = true
|
|
|
|
static let roomSettingsScreenShowAdvancedSettings: Bool = true
|
2021-04-14 13:52:25 +00:00
|
|
|
static let roomSettingsScreenAdvancedShowEncryptToVerifiedOption: Bool = true
|
|
|
|
|
2021-04-29 13:38:19 +00:00
|
|
|
// MARK: - Room Member Screen
|
|
|
|
|
|
|
|
static let roomMemberScreenShowIgnore: Bool = true
|
|
|
|
|
2020-07-31 07:15:57 +00:00
|
|
|
// MARK: - Message
|
2020-08-03 13:07:39 +00:00
|
|
|
static let messageDetailsAllowShare: Bool = true
|
|
|
|
static let messageDetailsAllowPermalink: Bool = true
|
|
|
|
static let messageDetailsAllowViewSource: Bool = true
|
2020-08-14 11:55:06 +00:00
|
|
|
static let messageDetailsAllowSave: Bool = true
|
2020-10-13 22:01:29 +00:00
|
|
|
static let messageDetailsAllowCopyMedia: Bool = true
|
2020-10-13 22:01:47 +00:00
|
|
|
static let messageDetailsAllowPasteMedia: Bool = true
|
2020-07-30 12:15:29 +00:00
|
|
|
|
2021-07-09 14:00:03 +00:00
|
|
|
// MARK: - Notifications
|
|
|
|
static let decryptNotificationsByDefault: Bool = true
|
|
|
|
|
2020-08-20 08:29:23 +00:00
|
|
|
// MARK: - HTTP
|
|
|
|
/// Additional HTTP headers will be sent by all requests. Not recommended to use request-specific headers, like `Authorization`.
|
|
|
|
/// Empty dictionary by default.
|
|
|
|
static let httpAdditionalHeaders: [String: String] = [:]
|
|
|
|
|
2020-07-31 06:29:22 +00:00
|
|
|
|
2020-07-31 07:15:57 +00:00
|
|
|
// MARK: - Authentication Screen
|
2020-07-30 16:07:16 +00:00
|
|
|
static let authScreenShowRegister = true
|
2020-08-19 15:24:39 +00:00
|
|
|
static let authScreenShowPhoneNumber = true
|
|
|
|
static let authScreenShowForgotPassword = true
|
2020-07-30 16:07:16 +00:00
|
|
|
static let authScreenShowCustomServerOptions = true
|
2022-01-18 22:36:50 +00:00
|
|
|
static let authScreenShowSocialLoginSection = true
|
2021-04-20 08:31:04 +00:00
|
|
|
|
2021-12-09 17:28:56 +00:00
|
|
|
// MARK: - Authentication Options
|
2022-01-31 00:28:31 +00:00
|
|
|
static let authEnableRefreshTokens = false
|
2021-12-09 17:28:56 +00:00
|
|
|
|
2022-02-24 17:24:04 +00:00
|
|
|
// MARK: - Onboarding
|
2022-03-15 11:51:17 +00:00
|
|
|
static let onboardingShowAccountPersonalization = false
|
2022-02-24 17:24:04 +00:00
|
|
|
|
2021-07-12 20:51:56 +00:00
|
|
|
// MARK: - Unified Search
|
2021-04-20 08:31:04 +00:00
|
|
|
static let unifiedSearchScreenShowPublicDirectory = true
|
2021-07-12 20:51:56 +00:00
|
|
|
|
|
|
|
// MARK: - Secrets Recovery
|
|
|
|
static let secretsRecoveryAllowReset = true
|
2021-11-19 15:40:52 +00:00
|
|
|
|
2022-03-11 16:47:08 +00:00
|
|
|
// MARK: - UISI Autoreporting
|
2022-03-16 17:47:41 +00:00
|
|
|
static let cryptoUISIAutoReportingEnabled = false
|
2022-03-11 16:47:08 +00:00
|
|
|
|
2021-11-19 15:40:52 +00:00
|
|
|
// MARK: - Polls
|
|
|
|
|
|
|
|
static var pollsEnabled: Bool {
|
|
|
|
guard #available(iOS 14, *) else {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
return true
|
|
|
|
}
|
2021-12-17 12:27:43 +00:00
|
|
|
|
|
|
|
// MARK: - Location Sharing
|
|
|
|
|
2022-01-27 11:58:43 +00:00
|
|
|
static let tileServerMapStyleURL = URL(string: "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx")!
|
2021-12-22 12:12:42 +00:00
|
|
|
|
|
|
|
static var locationSharingEnabled: Bool {
|
|
|
|
guard #available(iOS 14, *) else {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
2022-01-13 15:25:36 +00:00
|
|
|
return true
|
2021-12-22 12:12:42 +00:00
|
|
|
}
|
2022-03-02 13:39:30 +00:00
|
|
|
|
|
|
|
static var liveLocationSharingEnabled: Bool {
|
|
|
|
guard #available(iOS 14, *) else {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
guard self.locationSharingEnabled else {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// Do not enable live location sharing atm
|
|
|
|
return false
|
|
|
|
}
|
2020-07-30 08:02:02 +00:00
|
|
|
}
|