Skip to content

Commit

Permalink
Merge branch 'release/tchap_v1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
giomfo committed Mar 24, 2021
2 parents f87203f + e3ee3ce commit e14cdb3
Show file tree
Hide file tree
Showing 644 changed files with 29,511 additions and 17,545 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ DerivedData
*.ipa
*.xcuserstate
out/
.vscode/

# CocoaPods
#
Expand All @@ -32,4 +33,8 @@ Pods/
# Fastlane
fastlane/report.xml
fastlane/Reports
fastlane/README.md
fastlane/README.md
fastlane/Preview.html
fastlane/metadata/

provisioning_profiles/
47 changes: 1 addition & 46 deletions Btchap/Assets/Btchap-Defaults.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,18 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>permalinkSupportedHosts</key>
<array>
<string>beta.tchap.gouv.fr</string>
<string>www.beta.tchap.gouv.fr</string>
</array>
<key>permalinkPrefix</key>
<string>https://www.beta.tchap.gouv.fr</string>
<key>clientConfigURL</key>
<string>https://www.tchap.gouv.fr/client/config/preprod/ios</string>
<key>tacURL</key>
<string>https://www.tchap.gouv.fr/tac.html</string>
<key>appGroupId</key>
<string>group.fr.gouv.btchap</string>
<key>appLanguage</key>
<string>fr</string>
<key>serverUrlPrefix</key>
<string>https://matrix.</string>
<key>preferredIdentityServerNames</key>
<array>
<string>i.tchap.gouv.fr</string>
</array>
<key>otherIdentityServerNames</key>
<array>
<string>e.tchap.gouv.fr</string>
</array>
<key>pushGatewayURL</key>
<string>https://matrix.org/_matrix/push/v1/notify</string>
<key>pusherAppIdDev</key>
<string>fr.gouv.btchap.ios.dev</string>
<key>pusherAppIdProd</key>
<string>fr.gouv.btchap.ios.prod</string>
<key>pushKitAppIdProd</key>
<string>fr.gouv.btchap.ios.voip.prod</string>
<key>matrixApps</key>
<false/>
<key>integrationsUiUrl</key>
<string>https://scalar-staging.riot.im/scalar-web/</string>
<key>integrationsRestUrl</key>
<string>https://scalar-staging.riot.im/scalar/api</string>
<key>showAllEventsInRoomHistory</key>
<false/>
<key>showRedactionsInRoomHistory</key>
<false/>
<key>showUnsupportedEventsInRoomHistory</key>
<false/>
<key>sortRoomMembersUsingLastSeenTime</key>
<true/>
<false/>
<key>showLeftMembersInRoomMemberList</key>
<false/>
<key>syncLocalContacts</key>
Expand All @@ -59,15 +24,5 @@
<false/>
<key>maxAllowedMediaCacheSize</key>
<integer>1073741824</integer>
<key>bugReportEndpointUrlSuffix</key>
<string>/bugreports</string>
<key>bugReportDefaultHost</key>
<string>i.tchap.gouv.fr</string>
<key>bugReportApp</key>
<string>btchap-ios</string>
<key>roomDirectoryServers</key>
<array>
<string>i.tchap.gouv.fr</string>
</array>
</dict>
</plist>
29 changes: 29 additions & 0 deletions Btchap/Config/Btchap-Common.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// 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.
//

// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

BUNDLE_DISPLAY_NAME = Btchap

BASE_BUNDLE_IDENTIFIER = fr.gouv.btchap

APPLICATION_GROUP_IDENTIFIER = group.$(BASE_BUNDLE_IDENTIFIER)

KEYCHAIN_ACCESS_GROUP = $(AppIdentifierPrefix)$(BASE_BUNDLE_IDENTIFIER).keychain.shared

//Make Xcode 12 and fastlane(xcodebuild) happy while some pods are not updated
EXCLUDED_ARCHS[sdk=iphonesimulator*] = arm64
243 changes: 243 additions & 0 deletions Btchap/Config/BuildSettings.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,243 @@
//
// 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

import MatrixKit

/// BuildSettings provides settings computed at build time.
/// In future, it may be automatically generated from xcconfig files
@objcMembers
final class BuildSettings: NSObject {

// MARK: - Bundle Settings
static var bundleDisplayName: String {
guard let bundleDisplayName = Bundle.app.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String else {
fatalError("CFBundleDisplayName should be defined")
}
return bundleDisplayName
}

static var applicationGroupIdentifier: String {
guard let applicationGroupIdentifier = Bundle.app.object(forInfoDictionaryKey: "applicationGroupIdentifier") as? String else {
fatalError("applicationGroupIdentifier should be defined")
}
return applicationGroupIdentifier
}

static var baseBundleIdentifier: String {
guard let baseBundleIdentifier = Bundle.app.object(forInfoDictionaryKey: "baseBundleIdentifier") as? String else {
fatalError("baseBundleIdentifier should be defined")
}
return baseBundleIdentifier
}

static var keychainAccessGroup: String {
guard let keychainAccessGroup = Bundle.app.object(forInfoDictionaryKey: "keychainAccessGroup") as? String else {
fatalError("keychainAccessGroup should be defined")
}
return keychainAccessGroup
}

static var pushKitAppIdProd: String {
return baseBundleIdentifier + ".ios.voip.prod"
}

static var pushKitAppIdDev: String {
return baseBundleIdentifier + ".ios.voip.dev"
}

static var pusherAppIdProd: String {
return baseBundleIdentifier + ".ios.prod"
}

static var pusherAppIdDev: String {
return baseBundleIdentifier + ".ios.dev"
}

static var pushKitAppId: String {
#if DEBUG
return pushKitAppIdDev
#else
return pushKitAppIdProd
#endif
}

static var pusherAppId: String {
#if DEBUG
return pusherAppIdDev
#else
return pusherAppIdProd
#endif
}

// Tchap servers
static let serverUrlPrefix = "https://matrix."
static let preferredIdentityServerNames = [
"i.tchap.gouv.fr"
]
static let otherIdentityServerNames: [String] = [
"e.tchap.gouv.fr"
]

// Tchap-Web instance for the app
static let applicationWebAppUrlString = "https://www.beta.tchap.gouv.fr"


// MARK: - Server configuration
// TODO: replace m.org with https://sygnal.tchap.gouv.fr
static let serverConfigSygnalAPIUrlString = "https://matrix.org/_matrix/push/v1/notify"


// MARK: - Legal URLs
static let applicationTermsConditionsUrlString = "https://www.tchap.gouv.fr/tac.html"
static let clientConfigURL = "https://www.tchap.gouv.fr/client/config/preprod/ios"


// MARk: - Matrix permalinks
static let permalinkSupportedHosts: [String] = [
"beta.tchap.gouv.fr",
"www.beta.tchap.gouv.fr"
]
static let permalinkPrefix = "https://www.beta.tchap.gouv.fr"


// MARK: - VoIP
static var allowVoIPUsage: Bool {
#if canImport(JitsiMeet)
return true
#else
return false
#endif
}
static let stunServerFallbackUrlString: String? = nil


// MARK: - Public rooms Directory
// List of homeservers for the public rooms directory
static let publicRoomsDirectoryServers = [
"i.tchap.gouv.fr"
]


// MARK: - Analytics
static let analyticsServerUrl: String? = nil
static let analyticsAppId: String? = nil


// MARK: - Bug report
static let bugReportDefaultHost = "i.tchap.gouv.fr"
static let bugReportEndpointUrlSuffix = "/bugreports"
// Use the name allocated by the bug report server
static let bugReportApplicationId = "btchap-ios"


// MARK: - Integrations
static let integrationsUiUrlString = "https://scalar.vector.im/"
static let integrationsRestApiUrlString = "https://scalar.vector.im/api"
// 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"
]
// Jitsi server used outside integrations to create conference calls from the call button in the timeline
static let jitsiServerUrl = NSURL(string: "https://jitsi.riot.im")


// MARK: - Features

/// Setting to force protection by pin code
static let forcePinProtection: Bool = false

/// Max allowed time to continue using the app without prompting PIN
static let pinCodeGraceTimeInSeconds: TimeInterval = 0

/// Force non-jailbroken app usage
static let forceNonJailbrokenUsage: Bool = true

static let allowSendingStickers: Bool = false

static let allowLocalContactsAccess: Bool = true

// MARK: - Feature Specifics

/// Not allowed pin codes. User won't be able to select one of the pin in the list.
static let notAllowedPINs: [String] = []

/// Maximum number of allowed pin failures when unlocking, before force logging out the user. Defaults to `3`
static let maxAllowedNumberOfPinFailures: Int = 3

/// 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`
static let maxAllowedNumberOfBiometricsFailures: Int = 5

/// 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

// MARK: - General Settings Screen

// 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
// 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

// MARK: - Timeline settings
static let roomInputToolbarCompressionMode = MXKRoomInputToolbarCompressionModePrompt

// 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

// MARK: - Message
static let messageDetailsAllowShare: Bool = true
static let messageDetailsAllowPermalink: Bool = true
static let messageDetailsAllowViewSource: Bool = false
static let messageDetailsAllowSave: Bool = true
static let messageDetailsAllowCopyMedia: Bool = true
static let messageDetailsAllowPasteMedia: Bool = true

// 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] = [:]


// MARK: - Authentication Screen
// static let authScreenShowRegister = true
// static let authScreenShowPhoneNumber = true
// static let authScreenShowForgotPassword = true
// static let authScreenShowCustomServerOptions = true
}
Loading

0 comments on commit e14cdb3

Please sign in to comment.