diff --git a/Btchap/Config/BuildSettings.swift b/Btchap/Config/BuildSettings.swift index e75c3b93d2..be8ca52768 100644 --- a/Btchap/Config/BuildSettings.swift +++ b/Btchap/Config/BuildSettings.swift @@ -123,7 +123,8 @@ final class BuildSettings: NSObject { static let applicationHelpUrlString = "https://www.beta.tchap.gouv.fr/faq" static let applicationServicesStatusUrlString = "https://status.tchap.numerique.gouv.fr/" static let applicationAcceptableUsePolicyUrlString = "" - + static let proConnectInfoUrlString = "https://proconnect.gouv.fr/" + // MARK: - Matrix permalinks // Hosts/Paths for URLs that will considered as valid permalinks. Those permalinks are opened within the app. static let permalinkSupportedHosts: [String: [String]] = [ diff --git a/Config/AppIdentifiers.xcconfig b/Config/AppIdentifiers.xcconfig index b779271afd..12467ebbd4 100644 --- a/Config/AppIdentifiers.xcconfig +++ b/Config/AppIdentifiers.xcconfig @@ -1,5 +1,5 @@ // -// Copyright 2021 Vector Creations Ltd +// Copyright 2022 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. @@ -18,11 +18,11 @@ DEVELOPMENT_TEAM = NVMQD635C6 // Provisioning profiles -TCHAP_PROVISIONING_PROFILE_SPECIFIER = Tchap App Store -TCHAP_PROVISIONING_PROFILE = ab6bd8d7-4490-470d-b76d-2b3744150e5a +TCHAP_PROVISIONING_PROFILE_SPECIFIER = DevTchap App Store +TCHAP_PROVISIONING_PROFILE = 2e6b85aa-f6b6-4be0-b061-809b53f557df -NSE_PROVISIONING_PROFILE_SPECIFIER = Tchap NSE App Store -NSE_PROVISIONING_PROFILE = fbf70dfb-92e7-4eee-9098-d6c798074fff +NSE_PROVISIONING_PROFILE_SPECIFIER = DevTchap NSE App Store +NSE_PROVISIONING_PROFILE = e0ff349d-d05d-48f0-b2a2-c3314b1f074d -SHARE_EXTENSION_PROVISIONING_PROFILE_SPECIFIER = Tchap Share Extension App Store -SHARE_EXTENSION_PROVISIONING_PROFILE = 9419786e-8533-468d-99fe-5e46101af01a +SHARE_EXTENSION_PROVISIONING_PROFILE_SPECIFIER = DevTchap Share Extension App Store +SHARE_EXTENSION_PROVISIONING_PROFILE = 180b64b6-bc93-46e7-b531-65f3f8363ba7 diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index c100b8d9c4..0ace1d242d 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index f8313b5403..7fc1d38e63 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index e84f9b420a..19dfa4eef5 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 3e70abf952..ca1f56baf2 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index 259a9f2c35..f9e8738014 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index 0f22418f3c..ee80e4c1ea 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index f8313b5403..fb9c7c10a8 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index 4ed8d1c787..7ab2061c2d 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index f196b7a48e..f8f0974215 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png index c5d7d1dcae..990ef31cf2 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png index ea9b8abdd2..bad9646cac 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index f196b7a48e..c643436c1e 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index b6714dca95..36c640caab 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png index 78f8e0f9ba..2d639a46a7 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png index 4ef08bc3ef..842999f68d 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index 08a0e10cb0..28b4953416 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index c8a54a002b..26a0e8b9cf 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index 8169a5880b..094cf22d12 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png index 1b4fe5bd94..4b3d0be92a 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png index 0f8081781e..93af77f660 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png index 19ea05e2f4..ae326bb563 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/TchapLogo.imageset/tchap_logo.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/TchapLogo.imageset/tchap_logo.png index 258ce54114..bbe4ea952f 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/TchapLogo.imageset/tchap_logo.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/TchapLogo.imageset/tchap_logo.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/TchapLogo.imageset/tchap_logo@2x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/TchapLogo.imageset/tchap_logo@2x.png index 1d26c83d7c..1779a7ed21 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/TchapLogo.imageset/tchap_logo@2x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/TchapLogo.imageset/tchap_logo@2x.png differ diff --git a/DevTchap/Assets/DevTchapSharedImages.xcassets/TchapLogo.imageset/tchap_logo@3x.png b/DevTchap/Assets/DevTchapSharedImages.xcassets/TchapLogo.imageset/tchap_logo@3x.png index 0b01f38e68..11dc73da54 100644 Binary files a/DevTchap/Assets/DevTchapSharedImages.xcassets/TchapLogo.imageset/tchap_logo@3x.png and b/DevTchap/Assets/DevTchapSharedImages.xcassets/TchapLogo.imageset/tchap_logo@3x.png differ diff --git a/DevTchap/Config/BuildSettings.swift b/DevTchap/Config/BuildSettings.swift index 9798d09178..5df485d5af 100644 --- a/DevTchap/Config/BuildSettings.swift +++ b/DevTchap/Config/BuildSettings.swift @@ -97,7 +97,7 @@ final class BuildSettings: NSObject { static let serverUrlPrefix = "https://matrix." static let preferredIdentityServerNames = [ "dev01.tchap.incubateur.net", - "dev02.tchap.incubateur.net" +// "dev02.tchap.incubateur.net" ] static let otherIdentityServerNames: [String] = [ "ext01.tchap.incubateur.net" @@ -123,7 +123,7 @@ final class BuildSettings: NSObject { static let applicationHelpUrlString = "https://www.tchap.incubateur.net/faq" static let applicationServicesStatusUrlString = "https://status.tchap.numerique.gouv.fr/" static let applicationAcceptableUsePolicyUrlString = "" - + static let proConnectInfoUrlString = "https://proconnect.gouv.fr/" // MARK: - Matrix permalinks // Hosts/Paths for URLs that will considered as valid permalinks. Those permalinks are opened within the app. diff --git a/Podfile.lock b/Podfile.lock index 3ea7cb1e53..96ede696a1 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -20,7 +20,7 @@ PODS: - Down (0.11.0) - DSBottomSheet (0.3.0) - DSWaveformImage (6.1.1) - - FLEX (4.5.0) + - FLEX (5.22.10) - FlowCommoniOS (1.12.2) - GBDeviceInfo (7.1.0): - GBDeviceInfo/Core (= 7.1.0) @@ -39,9 +39,9 @@ PODS: - LoggerAPI (1.9.200): - Logging (~> 1.1) - Logging (1.4.0) - - MatrixSDK (0.27.10): - - MatrixSDK/Core (= 0.27.10) - - MatrixSDK/Core (0.27.10): + - MatrixSDK (0.27.11): + - MatrixSDK/Core (= 0.27.11) + - MatrixSDK/Core (0.27.11): - AFNetworking (~> 4.0.0) - GZIP (~> 1.3.0) - libbase58 (~> 0.1.4) @@ -49,7 +49,7 @@ PODS: - OLMKit (~> 3.2.5) - Realm (= 10.27.0) - SwiftyBeaver (= 1.9.5) - - MatrixSDK/JingleCallStack (0.27.10): + - MatrixSDK/JingleCallStack (0.27.11): - JitsiMeetSDKLite (= 8.1.2-lite) - MatrixSDK/Core - MatrixSDKCrypto (0.4.2) @@ -96,7 +96,7 @@ DEPENDENCIES: - Down (~> 0.11.0) - DSBottomSheet (~> 0.3) - DSWaveformImage (~> 6.1.1) - - FLEX (~> 4.5.0) + - FLEX (~> 5.22.10) - FlowCommoniOS (~> 1.12.0) - GBDeviceInfo (~> 7.1.0) - Introspect (~> 0.1) @@ -179,7 +179,7 @@ SPEC CHECKSUMS: Down: b6ba1bc985c9d2f4e15e3b293d2207766fa12612 DSBottomSheet: ca0ac37eb5af2dd54663f86b84382ed90a59be2a DSWaveformImage: 3c718a0cf99291887ee70d1d0c18d80101d3d9ce - FLEX: e51461dd6f0bfb00643c262acdfea5d5d12c596b + FLEX: f21ee4f498eed3f8a1eded66b21939fd3b7a22ce FlowCommoniOS: ca92071ab526dc89905495a37844fd7e78d1a7f2 GBDeviceInfo: 5d62fa85bdcce3ed288d83c28789adf1173e4376 GZIP: 3c0abf794bfce8c7cb34ea05a1837752416c8868 @@ -193,7 +193,7 @@ SPEC CHECKSUMS: libPhoneNumber-iOS: 0a32a9525cf8744fe02c5206eb30d571e38f7d75 LoggerAPI: ad9c4a6f1e32f518fdb43a1347ac14d765ab5e3d Logging: beeb016c9c80cf77042d62e83495816847ef108b - MatrixSDK: c805f9306d60955215f4b15043ed0f96fd4867b3 + MatrixSDK: 7c29e5cc8934cfc1f81f83fcfa17cd652612086d MatrixSDKCrypto: 736069ee0a5ec12852ab3498bf2242acecc443fc OLMKit: da115f16582e47626616874e20f7bb92222c7a51 PostHog: 660ec6c9d80cec17b685e148f17f6785a88b597d @@ -215,6 +215,6 @@ SPEC CHECKSUMS: zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5 -PODFILE CHECKSUM: 971cd7529e2d127b237469afa2c18e6dced151ec +PODFILE CHECKSUM: 4c754458cc7f3e4e8d97c36fe5692f5b82807db2 COCOAPODS: 1.14.3 diff --git a/Riot.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Riot.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index c90d47d46f..0000000000 --- a/Riot.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,104 +0,0 @@ -{ - "pins" : [ - { - "identity" : "devicekit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/devicekit/DeviceKit", - "state" : { - "revision" : "d37e70cb2646666dcf276d7d3d4a9760a41ff8a6", - "version" : "4.9.0" - } - }, - { - "identity" : "dtcoretext", - "kind" : "remoteSourceControl", - "location" : "https://github.com/Cocoanetics/DTCoreText", - "state" : { - "revision" : "b664664825da565b4c2b7a17dbe2369f68ae43d9", - "version" : "1.6.26" - } - }, - { - "identity" : "dtfoundation", - "kind" : "remoteSourceControl", - "location" : "https://github.com/Cocoanetics/DTFoundation.git", - "state" : { - "revision" : "76062513434421cb6c8a1ae1d4f8368a7ebc2da3", - "version" : "1.7.18" - } - }, - { - "identity" : "maplibre-gl-native-distribution", - "kind" : "remoteSourceControl", - "location" : "https://github.com/maplibre/maplibre-gl-native-distribution", - "state" : { - "revision" : "d761956e81e74d8bdbfba31e0ec3a75616190658", - "version" : "5.12.2" - } - }, - { - "identity" : "matrix-analytics-events", - "kind" : "remoteSourceControl", - "location" : "https://github.com/matrix-org/matrix-analytics-events", - "state" : { - "revision" : "de0cac487e5e7f607ee17045882204c91585461f", - "version" : "0.23.1" - } - }, - { - "identity" : "matrix-rich-text-editor-swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/matrix-org/matrix-rich-text-editor-swift", - "state" : { - "revision" : "21c0dd6e9c0b38d19d97af8e3e99fe01df56825d", - "version" : "2.37.3" - } - }, - { - "identity" : "ogg-swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/vector-im/ogg-swift.git", - "state" : { - "revision" : "9d82ed838404f10b607a1a1689f404563e9115c3", - "version" : "0.8.3" - } - }, - { - "identity" : "opus-swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/vector-im/opus-swift", - "state" : { - "revision" : "11f1887767cbc87c4b64b789ee830b779cc744cb", - "version" : "0.8.4" - } - }, - { - "identity" : "posthog-ios", - "kind" : "remoteSourceControl", - "location" : "https://github.com/PostHog/posthog-ios", - "state" : { - "revision" : "8b2508444962d67aa5f8770074f32d493383dafd", - "version" : "3.2.5" - } - }, - { - "identity" : "swift-collections", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-collections", - "state" : { - "revision" : "94cf62b3ba8d4bed62680a282d4c25f9c63c2efb", - "version" : "1.1.0" - } - }, - { - "identity" : "swift-ogg", - "kind" : "remoteSourceControl", - "location" : "https://github.com/element-hq/swift-ogg", - "state" : { - "branch" : "0.0.1", - "revision" : "e9a9e7601da662fd8b97d93781ff5c60b4becf88" - } - } - ], - "version" : 2 -} diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Contents.json b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Contents.json index 70e75fd61b..8cae15f226 100755 --- a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Contents.json +++ b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Contents.json @@ -1,158 +1,158 @@ { - "images" : [ - { - "filename" : "Icon-App-20x20@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "filename" : "Icon-App-20x20@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "filename" : "Icon-App-29x29@1x.png", - "idiom" : "iphone", - "scale" : "1x", - "size" : "29x29" - }, - { - "filename" : "Icon-App-29x29@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "filename" : "Icon-App-29x29@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "filename" : "Icon-App-40x40@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "Icon-App-40x40@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "filename" : "Icon-App-57x57@1x.png", - "idiom" : "iphone", - "scale" : "1x", - "size" : "57x57" - }, - { - "filename" : "Icon-App-57x57@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "57x57" - }, - { - "filename" : "Icon-App-60x60@2x.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "filename" : "Icon-App-60x60@3x.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "filename" : "Icon-App-20x20@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "filename" : "Icon-App-20x20@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "filename" : "Icon-App-29x29@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "filename" : "Icon-App-29x29@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "filename" : "Icon-App-40x40@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "filename" : "Icon-App-40x40@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "Icon-Small-50x50@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "50x50" - }, - { - "filename" : "Icon-Small-50x50@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "50x50" - }, - { - "filename" : "Icon-App-72x72@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "72x72" - }, - { - "filename" : "Icon-App-72x72@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "72x72" - }, - { - "filename" : "Icon-App-76x76@1x.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "76x76" - }, - { - "filename" : "Icon-App-76x76@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "filename" : "Icon-App-83.5x83.5@2x.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "filename" : "ItunesArtwork@2x.png", - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" + "images":[ + { + "idiom":"iphone", + "size":"20x20", + "scale":"2x", + "filename":"Icon-App-20x20@2x.png" + }, + { + "idiom":"iphone", + "size":"20x20", + "scale":"3x", + "filename":"Icon-App-20x20@3x.png" + }, + { + "idiom":"iphone", + "size":"29x29", + "scale":"1x", + "filename":"Icon-App-29x29@1x.png" + }, + { + "idiom":"iphone", + "size":"29x29", + "scale":"2x", + "filename":"Icon-App-29x29@2x.png" + }, + { + "idiom":"iphone", + "size":"29x29", + "scale":"3x", + "filename":"Icon-App-29x29@3x.png" + }, + { + "idiom":"iphone", + "size":"40x40", + "scale":"2x", + "filename":"Icon-App-40x40@2x.png" + }, + { + "idiom":"iphone", + "size":"40x40", + "scale":"3x", + "filename":"Icon-App-40x40@3x.png" + }, + { + "idiom":"iphone", + "size":"57x57", + "scale":"1x", + "filename":"Icon-App-57x57@1x.png" + }, + { + "idiom":"iphone", + "size":"57x57", + "scale":"2x", + "filename":"Icon-App-57x57@2x.png" + }, + { + "idiom":"iphone", + "size":"60x60", + "scale":"2x", + "filename":"Icon-App-60x60@2x.png" + }, + { + "idiom":"iphone", + "size":"60x60", + "scale":"3x", + "filename":"Icon-App-60x60@3x.png" + }, + { + "idiom":"ipad", + "size":"20x20", + "scale":"1x", + "filename":"Icon-App-20x20@1x.png" + }, + { + "idiom":"ipad", + "size":"20x20", + "scale":"2x", + "filename":"Icon-App-20x20@2x.png" + }, + { + "idiom":"ipad", + "size":"29x29", + "scale":"1x", + "filename":"Icon-App-29x29@1x.png" + }, + { + "idiom":"ipad", + "size":"29x29", + "scale":"2x", + "filename":"Icon-App-29x29@2x.png" + }, + { + "idiom":"ipad", + "size":"40x40", + "scale":"1x", + "filename":"Icon-App-40x40@1x.png" + }, + { + "idiom":"ipad", + "size":"40x40", + "scale":"2x", + "filename":"Icon-App-40x40@2x.png" + }, + { + "size" : "50x50", + "idiom" : "ipad", + "filename" : "Icon-Small-50x50@1x.png", + "scale" : "1x" + }, + { + "size" : "50x50", + "idiom" : "ipad", + "filename" : "Icon-Small-50x50@2x.png", + "scale" : "2x" + }, + { + "idiom":"ipad", + "size":"72x72", + "scale":"1x", + "filename":"Icon-App-72x72@1x.png" + }, + { + "idiom":"ipad", + "size":"72x72", + "scale":"2x", + "filename":"Icon-App-72x72@2x.png" + }, + { + "idiom":"ipad", + "size":"76x76", + "scale":"1x", + "filename":"Icon-App-76x76@1x.png" + }, + { + "idiom":"ipad", + "size":"76x76", + "scale":"2x", + "filename":"Icon-App-76x76@2x.png" + }, + { + "idiom":"ipad", + "size":"83.5x83.5", + "scale":"2x", + "filename":"Icon-App-83.5x83.5@2x.png" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "ItunesArtwork@2x.png", + "scale" : "1x" + } + ], + "info":{ + "version":1, + "author":"makeappicon" } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } } diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png index cb7b524192..c100b8d9c4 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png index 9fc1fae03d..f8313b5403 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png index e6afff4f61..e84f9b420a 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png index 418c89e883..3e70abf952 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png index c8ebd7a93b..259a9f2c35 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png index 5cbf47956b..0f22418f3c 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png index 9fc1fae03d..f8313b5403 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png index 1b67e22da7..4ed8d1c787 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png index df491ba114..f196b7a48e 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png index a09e7bfe0c..c5d7d1dcae 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png index b05c5e9d08..ea9b8abdd2 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png index df491ba114..f196b7a48e 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png index 00874fbcf6..b6714dca95 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png index 0ebcf86a83..78f8e0f9ba 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png index 8621cc4a50..4ef08bc3ef 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png index ee09c6b19c..08a0e10cb0 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png index c1bf9e18a6..c8a54a002b 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png index 73270176f2..8169a5880b 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png index 76dcd79646..1b4fe5bd94 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@1x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png index b8ce80e160..0f8081781e 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/Icon-Small-50x50@2x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png index fbbd99cb7d..19ea05e2f4 100644 Binary files a/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png and b/Riot/Assets/SharedImages.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/TchapLogo.imageset/tchap_logo.png b/Riot/Assets/SharedImages.xcassets/TchapLogo.imageset/tchap_logo.png index ad91b62fbb..258ce54114 100644 Binary files a/Riot/Assets/SharedImages.xcassets/TchapLogo.imageset/tchap_logo.png and b/Riot/Assets/SharedImages.xcassets/TchapLogo.imageset/tchap_logo.png differ diff --git a/Riot/Assets/SharedImages.xcassets/TchapLogo.imageset/tchap_logo@2x.png b/Riot/Assets/SharedImages.xcassets/TchapLogo.imageset/tchap_logo@2x.png index bc67dd5f30..1d26c83d7c 100644 Binary files a/Riot/Assets/SharedImages.xcassets/TchapLogo.imageset/tchap_logo@2x.png and b/Riot/Assets/SharedImages.xcassets/TchapLogo.imageset/tchap_logo@2x.png differ diff --git a/Riot/Assets/SharedImages.xcassets/TchapLogo.imageset/tchap_logo@3x.png b/Riot/Assets/SharedImages.xcassets/TchapLogo.imageset/tchap_logo@3x.png index 158b53d010..0b01f38e68 100644 Binary files a/Riot/Assets/SharedImages.xcassets/TchapLogo.imageset/tchap_logo@3x.png and b/Riot/Assets/SharedImages.xcassets/TchapLogo.imageset/tchap_logo@3x.png differ diff --git a/Riot/Modules/Authentication/AuthenticationCoordinator.swift b/Riot/Modules/Authentication/AuthenticationCoordinator.swift index b47c20b3bc..09277ab3ff 100644 --- a/Riot/Modules/Authentication/AuthenticationCoordinator.swift +++ b/Riot/Modules/Authentication/AuthenticationCoordinator.swift @@ -32,7 +32,9 @@ final class AuthenticationCoordinator: NSObject, AuthenticationCoordinatorProtoc enum EntryPoint { case registration - case login + // Tchap: allow override home server's preferred login mode +// case login + case login(LoginMode? = nil) } // MARK: - Properties @@ -88,9 +90,17 @@ final class AuthenticationCoordinator: NSObject, AuthenticationCoordinatorProtoc // MARK: - Public + // Tchap: allow override home server's preferred login mode func start() { + start(forcedAuthenticationMode: nil) + } + + // Tchap: allow override home server's preferred login mode + func start(forcedAuthenticationMode: LoginMode? = nil) { Task { @MainActor in - await startAuthenticationFlow() + // Tchap: allow override home server's preferred login mode +// await startAuthenticationFlow() + await startAuthenticationFlow(forcedAuthenticationMode: forcedAuthenticationMode) callback?(.didStart) authenticationService.delegate = self } @@ -114,7 +124,9 @@ final class AuthenticationCoordinator: NSObject, AuthenticationCoordinatorProtoc // MARK: - Private /// Starts the authentication flow. - @MainActor private func startAuthenticationFlow() async { + // Tchap: allow override home server's preferred login mode +// @MainActor private func startAuthenticationFlow() async { + @MainActor private func startAuthenticationFlow(forcedAuthenticationMode: LoginMode? = nil) async { if let softLogoutCredentials = authenticationService.softLogoutCredentials, let homeserverAddress = softLogoutCredentials.homeServer { do { @@ -129,7 +141,15 @@ final class AuthenticationCoordinator: NSObject, AuthenticationCoordinatorProtoc return } - let flow: AuthenticationFlow = initialScreen == .login ? .login : .register + // Tchap: allow override home server's preferred login mode + // let flow: AuthenticationFlow = initialScreen == .login ? .login : .register + let flow: AuthenticationFlow = { + if case .login(_) = initialScreen { + return .login + } else { + return .register + } + }() // Check if the user must select a server if BuildSettings.forceHomeserverSelection, authenticationService.provisioningLink?.homeserverUrl == nil { @@ -137,14 +157,15 @@ final class AuthenticationCoordinator: NSObject, AuthenticationCoordinatorProtoc return } - do { - // Start the flow (if homeserverAddress is nil, the default server will be used). - try await authenticationService.startFlow(flow) - } catch { - MXLog.error("[AuthenticationCoordinator] start: Failed to start, showing server selection.") - showServerSelectionScreen(for: flow) - return - } + // Tchap: Don't use default home server +// do { +// // Start the flow (if homeserverAddress is nil, the default server will be used). +// try await authenticationService.startFlow(flow) +// } catch { +// MXLog.error("[AuthenticationCoordinator] start: Failed to start, showing server selection.") +// showServerSelectionScreen(for: flow) +// return +// } switch initialScreen { case .registration: @@ -153,13 +174,15 @@ final class AuthenticationCoordinator: NSObject, AuthenticationCoordinatorProtoc } else { // Tchap: force email registration mode // showRegistrationScreen() - TchapShowVerifyEmailScreen() + await TchapShowVerifyEmailScreen() } case .login: if authenticationService.state.homeserver.needsLoginFallback { showFallback(for: flow) } else { - showLoginScreen() + // Tchap: allow override home server's preferred login mode +// showLoginScreen() + showLoginScreen(forcedAuthenticationMode: forcedAuthenticationMode) } } } @@ -262,13 +285,17 @@ final class AuthenticationCoordinator: NSObject, AuthenticationCoordinatorProtoc // MARK: - Login /// Shows the login screen. - @MainActor private func showLoginScreen() { + // Tchap: allow override home server's preferred login mode +// @MainActor private func showLoginScreen() { + @MainActor private func showLoginScreen(forcedAuthenticationMode: LoginMode? = nil) { MXLog.debug("[AuthenticationCoordinator] showLoginScreen") let homeserver = authenticationService.state.homeserver let parameters = AuthenticationLoginCoordinatorParameters(navigationRouter: navigationRouter, authenticationService: authenticationService, - loginMode: homeserver.preferredLoginMode) + // Tchap: allow override home server's preferred login mode + // loginMode: homeserver.preferredLoginMode) + loginMode: forcedAuthenticationMode ?? homeserver.preferredLoginMode) let coordinator = AuthenticationLoginCoordinator(parameters: parameters) coordinator.callback = { [weak self, weak coordinator] result in guard let self = self, let coordinator = coordinator else { return } @@ -383,9 +410,12 @@ final class AuthenticationCoordinator: NSObject, AuthenticationCoordinatorProtoc // Tchap: start Registration with VerifyEmail screen /// Shows the login screen. - @MainActor private func TchapShowVerifyEmailScreen() { + @MainActor private func TchapShowVerifyEmailScreen() async { MXLog.debug("[AuthenticationCoordinator] TchapShowVerifyEmailScreen") + // Call `startFlow` here to get `registrationWizard` initialized. + try? await authenticationService.startFlow(.register) + guard let registrationWizard = authenticationService.registrationWizard else { MXLog.failure("[AuthenticationCoordinator] showStage: Missing the RegistrationWizard needed to complete the stage.") displayError(message: VectorL10n.errorCommonMessage) diff --git a/Riot/Modules/LaunchLoading/LaunchLoadingView.swift b/Riot/Modules/LaunchLoading/LaunchLoadingView.swift index c4cdee4224..fe880f573c 100644 --- a/Riot/Modules/LaunchLoading/LaunchLoadingView.swift +++ b/Riot/Modules/LaunchLoading/LaunchLoadingView.swift @@ -56,14 +56,33 @@ final class LaunchLoadingView: UIView, NibLoadable, Themable { animationTimeline.play() self.animationTimeline = animationTimeline + // Tchap: setup custom loading view. + tchapSetupLoadingView() + progressContainer.isHidden = true } + // Tchap: replace Element logo loadng animation by a simple UIActivityIndicatorView. + private func tchapSetupLoadingView() { + let tchapAnimationView = UIActivityIndicatorView(style: .large) + self.addSubview(tchapAnimationView) + tchapAnimationView.translatesAutoresizingMaskIntoConstraints = false + tchapAnimationView.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true + tchapAnimationView.centerYAnchor.constraint(equalTo: self.centerYAnchor).isActive = true + tchapAnimationView.startAnimating() + + // Hide Element aninmated logo. + animationView.isHidden = true + } + // MARK: - Public func update(theme: Theme) { self.backgroundColor = theme.backgroundColor self.animationView.backgroundColor = theme.backgroundColor + + // Tchap: Set progress view to Tchap color. + progressView.progressTintColor = theme.tintColor } } diff --git a/Riot/Modules/Onboarding/OnboardingCoordinator.swift b/Riot/Modules/Onboarding/OnboardingCoordinator.swift index 3fb1d711a6..0faead4112 100644 --- a/Riot/Modules/Onboarding/OnboardingCoordinator.swift +++ b/Riot/Modules/Onboarding/OnboardingCoordinator.swift @@ -107,7 +107,9 @@ final class OnboardingCoordinator: NSObject, OnboardingCoordinatorProtocol { } startLoading() if BuildSettings.onboardingEnableNewAuthenticationFlow { - beginAuthentication(with: .login) { [weak self] in + // Tchap: allow override home server's preferred login mode +// beginAuthentication(with: .login) { [weak self] in + beginAuthentication(with: .login()) { [weak self] in self?.stopLoading() } } else { @@ -167,9 +169,12 @@ final class OnboardingCoordinator: NSObject, OnboardingCoordinatorProtocol { // showUseCaseSelectionScreen() beginAuthentication(with: .registration, onStart: coordinator.stop) - case .login: + // Tchap: allow override home server's preferred login mode +// case .login: + case let .login(mode): if BuildSettings.onboardingEnableNewAuthenticationFlow { - beginAuthentication(with: .login, onStart: coordinator.stop) +// beginAuthentication(with: .login, onStart: coordinator.stop) + beginAuthentication(with: .login(mode), onStart: coordinator.stop) } else { coordinator.stop() showLegacyAuthenticationScreen() @@ -243,7 +248,15 @@ final class OnboardingCoordinator: NSObject, OnboardingCoordinatorProtocol { authenticationCoordinator = coordinator add(childCoordinator: coordinator) - coordinator.start() + + // Tchap: allow override home server's preferred login mode +// coordinator.start() + if case let .login(forcedAuthenticationMode) = initialScreen { + coordinator.start(forcedAuthenticationMode: forcedAuthenticationMode) + } + else { + coordinator.start() + } } /// Show the legacy authentication screen. Any parameters that have been set in previous screens are be applied. diff --git a/RiotNSE/BuildSettings.swift b/RiotNSE/BuildSettings.swift index 2b3b90bab5..fcbc3c92ba 100644 --- a/RiotNSE/BuildSettings.swift +++ b/RiotNSE/BuildSettings.swift @@ -1,5 +1,5 @@ // -// Copyright 2020 Vector Creations Ltd +// Copyright 2022 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. @@ -96,45 +96,31 @@ final class BuildSettings: NSObject { // Tchap servers static let serverUrlPrefix = "https://matrix." static let preferredIdentityServerNames = [ - "agent.externe.tchap.gouv.fr", - "agent.collectivites.tchap.gouv.fr", - "agent.tchap.gouv.fr", - "agent.elysee.tchap.gouv.fr", - "agent.pm.tchap.gouv.fr", - "agent.ssi.tchap.gouv.fr", - "agent.finances.tchap.gouv.fr", - "agent.social.tchap.gouv.fr", - "agent.interieur.tchap.gouv.fr", - "agent.agriculture.tchap.gouv.fr", - "agent.justice.tchap.gouv.fr", - "agent.diplomatie.tchap.gouv.fr", - "agent.intradef.tchap.gouv.fr", - "agent.dinum.tchap.gouv.fr", - "agent.culture.tchap.gouv.fr", - "agent.dev-durable.tchap.gouv.fr", - "agent.education.tchap.gouv.fr" + "dev01.tchap.incubateur.net", +// "dev02.tchap.incubateur.net" + ] + static let otherIdentityServerNames: [String] = [ + "ext01.tchap.incubateur.net" ] - static let otherIdentityServerNames: [String] = [] // Tchap-Web instance for the app - static let applicationWebAppUrlString = "https://www.tchap.gouv.fr" + static let applicationWebAppUrlString = "https://www.tchap.incubateur.net" /// Whether to allow the app to use a right to left layout or force left to right for all languages static let disableRightToLeftLayout = true // MARK: - Server configuration // Tchap sygnal server url - static let serverConfigSygnalAPIUrlString = "https://sygnal.tchap.gouv.fr/_matrix/push/v1/notify" + static let serverConfigSygnalAPIUrlString = "https://sygnal.tchap.incubateur.net/_matrix/push/v1/notify" /// Force the user to set a homeserver instead of using the default one static let forceHomeserverSelection = false - // MARK: - Legal URLs // Note: Set empty strings to hide the related entry in application settings - static let applicationTermsConditionsUrlString = "https://www.tchap.gouv.fr/tac.html" - static let clientConfigURL = "https://www.tchap.gouv.fr/client/config/agent/ios" - static let applicationHelpUrlString = "https://www.tchap.gouv.fr/faq" + static let applicationTermsConditionsUrlString = "https://www.tchap.incubateur.net/tac.html" + static let clientConfigURL = "https://www.tchap.incubateur.net/client/config/agent/ios" + static let applicationHelpUrlString = "https://www.tchap.incubateur.net/faq" static let applicationServicesStatusUrlString = "https://status.tchap.numerique.gouv.fr/" static let applicationAcceptableUsePolicyUrlString = "" @@ -142,11 +128,10 @@ final class BuildSettings: NSObject { // MARK: - Matrix permalinks // Hosts/Paths for URLs that will considered as valid permalinks. Those permalinks are opened within the app. static let permalinkSupportedHosts: [String: [String]] = [ - "matrix.to": ["/"], - "tchap.gouv.fr": ["/"], - "www.tchap.gouv.fr": ["/"] + "tchap.incubateur.net": ["/"], + "www.tchap.incubateur.net": ["/"], ] - static let clientPermalinkBaseUrl: String? = "https://tchap.gouv.fr" + static let clientPermalinkBaseUrl: String? = "https://www.tchap.incubateur.net" // MARK: - VoIP @@ -163,29 +148,15 @@ final class BuildSettings: NSObject { // MARK: - Public rooms Directory // List of homeservers for the public rooms directory static let publicRoomsDirectoryServers = [ - "agent.collectivites.tchap.gouv.fr", - "agent.tchap.gouv.fr", - "agent.elysee.tchap.gouv.fr", - "agent.pm.tchap.gouv.fr", - "agent.ssi.tchap.gouv.fr", - "agent.finances.tchap.gouv.fr", - "agent.social.tchap.gouv.fr", - "agent.interieur.tchap.gouv.fr", - "agent.agriculture.tchap.gouv.fr", - "agent.justice.tchap.gouv.fr", - "agent.diplomatie.tchap.gouv.fr", - "agent.intradef.tchap.gouv.fr", - "agent.dinum.tchap.gouv.fr", - "agent.culture.tchap.gouv.fr", - "agent.dev-durable.tchap.gouv.fr", - "agent.education.tchap.gouv.fr" + "dev01.tchap.incubateur.net", + "dev02.tchap.incubateur.net" ] // MARK: - Rooms Screen static let roomsAllowToJoinPublicRooms: Bool = true // MARK: - Analytics - + /// A type that represents how to set up the analytics module in the app. /// /// **Note:** Analytics are disabled by default for forks. @@ -203,24 +174,24 @@ final class BuildSettings: NSObject { #if DEBUG /// The configuration to use for analytics during development. Set `isEnabled` to false to disable analytics in debug builds. - static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: false, - host: "", - apiKey: "", - termsURL: URL(string: "https://")!) + static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: true, // Tchap: enable PostHog analytics on DEBUG + host: "https://us.i.posthog.com", // Tchap: dev posthog, + apiKey: "phc_eQOeaQiaIxdX9kaQmqYTD7RJLyFubYmGYKUI9czqqQD", // Tchap: dev posthog, + termsURL: URL(string: "https://tchap.beta.gouv.fr/politique-de-confidentialite")!) // Tchap: dev posthog, #else /// The configuration to use for analytics. Set `isEnabled` to false to disable analytics. static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: false, host: "", apiKey: "", - termsURL: URL(string: "https://")!) + termsURL: URL(string: "")!) #endif // MARK: - Bug report static let bugReportEndpointUrlString = "" - static let bugReportDefaultHost = "agent.tchap.gouv.fr" + static let bugReportDefaultHost = "dev01.tchap.incubateur.net" static let bugReportEndpointUrlSuffix = "/bugreports" // Use the name allocated by the bug report server - static let bugReportApplicationId = "tchap-ios" + static let bugReportApplicationId = "devtchap-ios" // MARK: - Integrations @@ -266,41 +237,12 @@ final class BuildSettings: NSObject { // "" : [ tchapFeatureAnyHomeServer ] to allow a feature to any instance static let tchapFeatureNotificationByEmail = "tchapFeatureNotificationByEmail" static let tchapFeatureVoiceOverIP = "tchapFeatureVoiceOverIP" - static let tchapFeatureVideoOverIP = "tchapFeatureVideoOverIP" + static let tchapFeatureVideoOverIP = "tchapFeatureVideoOverIP" // Tchap: in Dev, allow any feature to any instance. static let tchapFeatureGeolocationSharing = "tchapFeatureGeolocationSharing" // linked to `locationSharingEnabled` property (see above) static var tchapFeaturesAllowedHomeServersForFeature: [String: [String]] = [ - tchapFeatureNotificationByEmail: [ - tchapFeatureAnyHomeServer - ], - // Audio calls for all in Tchap Production. - tchapFeatureVoiceOverIP: [ - "agent.externe.tchap.gouv.fr", - "agent.collectivites.tchap.gouv.fr", - "agent.tchap.gouv.fr", - "agent.elysee.tchap.gouv.fr", - "agent.pm.tchap.gouv.fr", - "agent.ssi.tchap.gouv.fr", - "agent.finances.tchap.gouv.fr", - "agent.social.tchap.gouv.fr", - "agent.interieur.tchap.gouv.fr", - "agent.agriculture.tchap.gouv.fr", - "agent.justice.tchap.gouv.fr", - "agent.diplomatie.tchap.gouv.fr", - "agent.intradef.tchap.gouv.fr", - "agent.dinum.tchap.gouv.fr", - "agent.culture.tchap.gouv.fr", - "agent.dev-durable.tchap.gouv.fr", - "agent.education.tchap.gouv.fr" - ], - // No activation of video calls actually in Tchap Production. -// tchapFeatureVideoOverIP: [ -// "agent.dinum.tchap.gouv.fr" -// ], - tchapFeatureGeolocationSharing: [ - tchapFeatureAnyHomeServer - ] + tchapFeatureAnyFeature: [ tchapFeatureAnyHomeServer ] ] - + // MARK: - Side Menu static let enableSideMenu: Bool = true && !newAppLayoutEnabled static let sideMenuShowInviteFriends: Bool = true @@ -338,14 +280,14 @@ final class BuildSettings: NSObject { static let settingsScreenShowUserFirstName: Bool = false static let settingsScreenShowUserSurname: Bool = false - static let settingsScreenAllowAddingEmailThreepids: Bool = false - static let settingsScreenAllowAddingPhoneThreepids: Bool = false - static let settingsScreenShowThreepidExplanatory: Bool = false - static let settingsScreenShowDiscoverySettings: Bool = false - static let settingsScreenAllowIdentityServerConfig: 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 settingsScreenShowConfirmMediaSize: Bool = true static let settingsScreenShowAdvancedSettings: Bool = true - static let settingsScreenShowLabSettings: Bool = false + static let settingsScreenShowLabSettings: Bool = true static let settingsScreenAllowChangingRageshakeSettings: Bool = true static let settingsScreenAllowChangingCrashUsageDataSettings: Bool = true static let settingsScreenAllowBugReportingManually: Bool = true @@ -353,14 +295,14 @@ final class BuildSettings: NSObject { static let settingsScreenShowChangePassword: Bool = true static let settingsScreenShowEnableStunServerFallback: Bool = true static let settingsScreenShowNotificationDecodedContentOption: Bool = true - static let settingsScreenShowNsfwRoomsOption: Bool = false + static let settingsScreenShowNsfwRoomsOption: Bool = true 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 = false + static let settingsSecurityScreenShowAdvancedUnverifiedDevices: Bool = true /// A setting to enable the presence configuration settings section. static let settingsScreenPresenceAllowConfiguration: Bool = false @@ -368,8 +310,8 @@ final class BuildSettings: NSObject { static let roomInputToolbarCompressionMode: MediaCompressionMode = .prompt enum MediaCompressionMode { - case prompt, small, medium, large, none - } + case prompt, small, medium, large, none + } // MARK: - Room Creation Screen diff --git a/RiotNSE/Common.xcconfig b/RiotNSE/Common.xcconfig index 19b42ed0c8..8b7652642d 100644 --- a/RiotNSE/Common.xcconfig +++ b/RiotNSE/Common.xcconfig @@ -1,5 +1,5 @@ // -// Copyright 2020 Vector Creations Ltd +// Copyright 2022 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. @@ -17,12 +17,9 @@ // Configuration settings file format documentation can be found at: // https://help.apple.com/xcode/#/dev745c5c974 -#include "Tchap/SupportingFiles/App-Common.xcconfig" +#include "DevTchap/SupportingFiles/DevTchap-App-Common.xcconfig" - -// Tchap: Customize TchapNSE user-agent for back-end logs. -// PRODUCT_NAME = RiotNSE -PRODUCT_NAME = TchapNSE +PRODUCT_NAME = RiotNSE PRODUCT_BUNDLE_IDENTIFIER = $(BASE_BUNDLE_IDENTIFIER).nse INFOPLIST_FILE = RiotNSE/Info.plist @@ -30,8 +27,5 @@ INFOPLIST_FILE = RiotNSE/Info.plist CODE_SIGN_ENTITLEMENTS = RiotNSE/RiotNSE.entitlements SKIP_INSTALL = YES - -// Tchap: Customize TchapNSE user-agent for back-end logs. -// SWIFT_OBJC_BRIDGING_HEADER = $(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/RiotNSE-Bridging-Header.h -SWIFT_OBJC_BRIDGING_HEADER = $(SRCROOT)/RiotNSE/SupportingFiles/RiotNSE-Bridging-Header.h +SWIFT_OBJC_BRIDGING_HEADER = $(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/RiotNSE-Bridging-Header.h diff --git a/RiotShareExtension/BuildSettings.swift b/RiotShareExtension/BuildSettings.swift index 2911cd2259..fcbc3c92ba 100644 --- a/RiotShareExtension/BuildSettings.swift +++ b/RiotShareExtension/BuildSettings.swift @@ -1,5 +1,5 @@ // -// Copyright 2020 Vector Creations Ltd +// Copyright 2022 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. @@ -96,45 +96,31 @@ final class BuildSettings: NSObject { // Tchap servers static let serverUrlPrefix = "https://matrix." static let preferredIdentityServerNames = [ - "agent.externe.tchap.gouv.fr", - "agent.collectivites.tchap.gouv.fr", - "agent.tchap.gouv.fr", - "agent.elysee.tchap.gouv.fr", - "agent.pm.tchap.gouv.fr", - "agent.ssi.tchap.gouv.fr", - "agent.finances.tchap.gouv.fr", - "agent.social.tchap.gouv.fr", - "agent.interieur.tchap.gouv.fr", - "agent.agriculture.tchap.gouv.fr", - "agent.justice.tchap.gouv.fr", - "agent.diplomatie.tchap.gouv.fr", - "agent.intradef.tchap.gouv.fr", - "agent.dinum.tchap.gouv.fr", - "agent.culture.tchap.gouv.fr", - "agent.dev-durable.tchap.gouv.fr", - "agent.education.tchap.gouv.fr" + "dev01.tchap.incubateur.net", +// "dev02.tchap.incubateur.net" + ] + static let otherIdentityServerNames: [String] = [ + "ext01.tchap.incubateur.net" ] - static let otherIdentityServerNames: [String] = [] // Tchap-Web instance for the app - static let applicationWebAppUrlString = "https://www.tchap.gouv.fr" + static let applicationWebAppUrlString = "https://www.tchap.incubateur.net" /// Whether to allow the app to use a right to left layout or force left to right for all languages static let disableRightToLeftLayout = true // MARK: - Server configuration // Tchap sygnal server url - static let serverConfigSygnalAPIUrlString = "https://sygnal.tchap.gouv.fr/_matrix/push/v1/notify" + static let serverConfigSygnalAPIUrlString = "https://sygnal.tchap.incubateur.net/_matrix/push/v1/notify" /// Force the user to set a homeserver instead of using the default one static let forceHomeserverSelection = false - // MARK: - Legal URLs // Note: Set empty strings to hide the related entry in application settings - static let applicationTermsConditionsUrlString = "https://www.tchap.gouv.fr/tac.html" - static let clientConfigURL = "https://www.tchap.gouv.fr/client/config/agent/ios" - static let applicationHelpUrlString = "https://www.tchap.gouv.fr/faq" + static let applicationTermsConditionsUrlString = "https://www.tchap.incubateur.net/tac.html" + static let clientConfigURL = "https://www.tchap.incubateur.net/client/config/agent/ios" + static let applicationHelpUrlString = "https://www.tchap.incubateur.net/faq" static let applicationServicesStatusUrlString = "https://status.tchap.numerique.gouv.fr/" static let applicationAcceptableUsePolicyUrlString = "" @@ -142,11 +128,10 @@ final class BuildSettings: NSObject { // MARK: - Matrix permalinks // Hosts/Paths for URLs that will considered as valid permalinks. Those permalinks are opened within the app. static let permalinkSupportedHosts: [String: [String]] = [ - "matrix.to": ["/"], - "tchap.gouv.fr": ["/"], - "www.tchap.gouv.fr": ["/"] + "tchap.incubateur.net": ["/"], + "www.tchap.incubateur.net": ["/"], ] - static let clientPermalinkBaseUrl: String? = "https://tchap.gouv.fr" + static let clientPermalinkBaseUrl: String? = "https://www.tchap.incubateur.net" // MARK: - VoIP @@ -163,29 +148,15 @@ final class BuildSettings: NSObject { // MARK: - Public rooms Directory // List of homeservers for the public rooms directory static let publicRoomsDirectoryServers = [ - "agent.collectivites.tchap.gouv.fr", - "agent.tchap.gouv.fr", - "agent.elysee.tchap.gouv.fr", - "agent.pm.tchap.gouv.fr", - "agent.ssi.tchap.gouv.fr", - "agent.finances.tchap.gouv.fr", - "agent.social.tchap.gouv.fr", - "agent.interieur.tchap.gouv.fr", - "agent.agriculture.tchap.gouv.fr", - "agent.justice.tchap.gouv.fr", - "agent.diplomatie.tchap.gouv.fr", - "agent.intradef.tchap.gouv.fr", - "agent.dinum.tchap.gouv.fr", - "agent.culture.tchap.gouv.fr", - "agent.dev-durable.tchap.gouv.fr", - "agent.education.tchap.gouv.fr" + "dev01.tchap.incubateur.net", + "dev02.tchap.incubateur.net" ] // MARK: - Rooms Screen static let roomsAllowToJoinPublicRooms: Bool = true // MARK: - Analytics - + /// A type that represents how to set up the analytics module in the app. /// /// **Note:** Analytics are disabled by default for forks. @@ -203,24 +174,24 @@ final class BuildSettings: NSObject { #if DEBUG /// The configuration to use for analytics during development. Set `isEnabled` to false to disable analytics in debug builds. - static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: false, - host: "", - apiKey: "", - termsURL: URL(string: "https://")!) + static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: true, // Tchap: enable PostHog analytics on DEBUG + host: "https://us.i.posthog.com", // Tchap: dev posthog, + apiKey: "phc_eQOeaQiaIxdX9kaQmqYTD7RJLyFubYmGYKUI9czqqQD", // Tchap: dev posthog, + termsURL: URL(string: "https://tchap.beta.gouv.fr/politique-de-confidentialite")!) // Tchap: dev posthog, #else /// The configuration to use for analytics. Set `isEnabled` to false to disable analytics. static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: false, host: "", apiKey: "", - termsURL: URL(string: "https://")!) + termsURL: URL(string: "")!) #endif // MARK: - Bug report static let bugReportEndpointUrlString = "" - static let bugReportDefaultHost = "agent.tchap.gouv.fr" + static let bugReportDefaultHost = "dev01.tchap.incubateur.net" static let bugReportEndpointUrlSuffix = "/bugreports" // Use the name allocated by the bug report server - static let bugReportApplicationId = "tchap-ios" + static let bugReportApplicationId = "devtchap-ios" // MARK: - Integrations @@ -266,41 +237,12 @@ final class BuildSettings: NSObject { // "" : [ tchapFeatureAnyHomeServer ] to allow a feature to any instance static let tchapFeatureNotificationByEmail = "tchapFeatureNotificationByEmail" static let tchapFeatureVoiceOverIP = "tchapFeatureVoiceOverIP" - static let tchapFeatureVideoOverIP = "tchapFeatureVideoOverIP" + static let tchapFeatureVideoOverIP = "tchapFeatureVideoOverIP" // Tchap: in Dev, allow any feature to any instance. static let tchapFeatureGeolocationSharing = "tchapFeatureGeolocationSharing" // linked to `locationSharingEnabled` property (see above) static var tchapFeaturesAllowedHomeServersForFeature: [String: [String]] = [ - tchapFeatureNotificationByEmail: [ - tchapFeatureAnyHomeServer - ], - // Audio calls for all except Finances in Tchap Production. - tchapFeatureVoiceOverIP: [ - "agent.externe.tchap.gouv.fr", - "agent.collectivites.tchap.gouv.fr", - "agent.tchap.gouv.fr", - "agent.elysee.tchap.gouv.fr", - "agent.pm.tchap.gouv.fr", - "agent.ssi.tchap.gouv.fr", -// "agent.finances.tchap.gouv.fr", - "agent.social.tchap.gouv.fr", - "agent.interieur.tchap.gouv.fr", - "agent.agriculture.tchap.gouv.fr", - "agent.justice.tchap.gouv.fr", - "agent.diplomatie.tchap.gouv.fr", - "agent.intradef.tchap.gouv.fr", - "agent.dinum.tchap.gouv.fr", - "agent.culture.tchap.gouv.fr", - "agent.dev-durable.tchap.gouv.fr", - "agent.education.tchap.gouv.fr" - ], - // No activation of video calls actually in Tchap Production. -// tchapFeatureVideoOverIP: [ -// "agent.dinum.tchap.gouv.fr" -// ], - tchapFeatureGeolocationSharing: [ - tchapFeatureAnyHomeServer - ] + tchapFeatureAnyFeature: [ tchapFeatureAnyHomeServer ] ] - + // MARK: - Side Menu static let enableSideMenu: Bool = true && !newAppLayoutEnabled static let sideMenuShowInviteFriends: Bool = true @@ -338,14 +280,14 @@ final class BuildSettings: NSObject { static let settingsScreenShowUserFirstName: Bool = false static let settingsScreenShowUserSurname: Bool = false - static let settingsScreenAllowAddingEmailThreepids: Bool = false - static let settingsScreenAllowAddingPhoneThreepids: Bool = false - static let settingsScreenShowThreepidExplanatory: Bool = false - static let settingsScreenShowDiscoverySettings: Bool = false - static let settingsScreenAllowIdentityServerConfig: 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 settingsScreenShowConfirmMediaSize: Bool = true static let settingsScreenShowAdvancedSettings: Bool = true - static let settingsScreenShowLabSettings: Bool = false + static let settingsScreenShowLabSettings: Bool = true static let settingsScreenAllowChangingRageshakeSettings: Bool = true static let settingsScreenAllowChangingCrashUsageDataSettings: Bool = true static let settingsScreenAllowBugReportingManually: Bool = true @@ -353,14 +295,14 @@ final class BuildSettings: NSObject { static let settingsScreenShowChangePassword: Bool = true static let settingsScreenShowEnableStunServerFallback: Bool = true static let settingsScreenShowNotificationDecodedContentOption: Bool = true - static let settingsScreenShowNsfwRoomsOption: Bool = false + static let settingsScreenShowNsfwRoomsOption: Bool = true 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 = false + static let settingsSecurityScreenShowAdvancedUnverifiedDevices: Bool = true /// A setting to enable the presence configuration settings section. static let settingsScreenPresenceAllowConfiguration: Bool = false @@ -368,8 +310,8 @@ final class BuildSettings: NSObject { static let roomInputToolbarCompressionMode: MediaCompressionMode = .prompt enum MediaCompressionMode { - case prompt, small, medium, large, none - } + case prompt, small, medium, large, none + } // MARK: - Room Creation Screen diff --git a/RiotShareExtension/Common.xcconfig b/RiotShareExtension/Common.xcconfig index 15139328d8..a225a4e61d 100644 --- a/RiotShareExtension/Common.xcconfig +++ b/RiotShareExtension/Common.xcconfig @@ -1,5 +1,5 @@ // -// Copyright 2020 Vector Creations Ltd +// Copyright 2022 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. @@ -17,7 +17,7 @@ // Configuration settings file format documentation can be found at: // https://help.apple.com/xcode/#/dev745c5c974 -#include "Tchap/SupportingFiles/App-Common.xcconfig" +#include "DevTchap/SupportingFiles/DevTchap-App-Common.xcconfig" PRODUCT_NAME = RiotShareExtension PRODUCT_BUNDLE_IDENTIFIER = $(BASE_BUNDLE_IDENTIFIER).shareExtension diff --git a/RiotShareExtension/target.yml b/RiotShareExtension/target.yml index 3d8224d84f..dc41105979 100644 --- a/RiotShareExtension/target.yml +++ b/RiotShareExtension/target.yml @@ -105,6 +105,8 @@ targets: # Tchap - path: ../RiotShareExtension/BuildSettings.swift - path: ../Tchap/Extensions + excludes: + - WebLinks+Tchap.swift - path: ../Tchap/Generated/Images_Riot.swift - path: ../Tchap/Generated/InfoPlist.swift - path: ../Tchap/Generated/Strings.swift diff --git a/RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/AuthenticationState.swift b/RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/AuthenticationState.swift index 38f1939f4b..ef196346be 100644 --- a/RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/AuthenticationState.swift +++ b/RiotSwiftUI/Modules/Authentication/Common/Service/MatrixSDK/AuthenticationState.swift @@ -51,7 +51,10 @@ struct AuthenticationState { } /// The preferred login mode for the server - var preferredLoginMode: LoginMode = .unknown + // Tchap: force preferredLoginMode to `password` to present `username` input field. + // (can't set it to `SSO` because we don't know yet if the user's homeServer supports SSO). +// var preferredLoginMode: LoginMode = .unknown + var preferredLoginMode: LoginMode = .password /// Flag indicating whether the homeserver supports logging in via a QR code. var supportsQRLogin = false diff --git a/RiotSwiftUI/Modules/Authentication/Login/AuthenticationLoginModels.swift b/RiotSwiftUI/Modules/Authentication/Login/AuthenticationLoginModels.swift index 61884f9e3f..aedc325353 100644 --- a/RiotSwiftUI/Modules/Authentication/Login/AuthenticationLoginModels.swift +++ b/RiotSwiftUI/Modules/Authentication/Login/AuthenticationLoginModels.swift @@ -65,9 +65,22 @@ struct AuthenticationLoginViewState: BindableState { /// View state that can be bound to from SwiftUI. var bindings: AuthenticationLoginBindings + // Tchap: add loginMode (only password or sso modes are handled) + var tchapAuthenticationMode: LoginMode + /// Whether to show any SSO buttons. var showSSOButtons: Bool { - !homeserver.ssoIdentityProviders.isEmpty + // Tchap: only show sso buttons if tchapAuthenticationMode == .sso OR .ssoAndPassword +// !homeserver.ssoIdentityProviders.isEmpty + if case .sso = tchapAuthenticationMode, + !homeserver.ssoIdentityProviders.isEmpty { + return true + } + if case .ssoAndPassword = tchapAuthenticationMode, + !homeserver.ssoIdentityProviders.isEmpty { + return true + } + return false } /// `true` if the username and password are ready to be submitted. @@ -77,7 +90,21 @@ struct AuthenticationLoginViewState: BindableState { /// `true` if valid credentials have been entered and the homeserver is loaded. var canSubmit: Bool { - hasValidCredentials && !isLoading + // Tchap: handle `canSubmit` by checking email validity for concerned cases +// return hasValidCredentials && !isLoading + switch tchapAuthenticationMode { + case .password: + return !isLoading && tchapEmailIsValid + case .sso: + return !isLoading && tchapEmailIsValid + default: + return hasValidCredentials && !isLoading + } + } + + // Tchap: username is email + var tchapEmailIsValid: Bool { + MXTools.isEmailAddress(bindings.username) } } diff --git a/RiotSwiftUI/Modules/Authentication/Login/AuthenticationLoginViewModel.swift b/RiotSwiftUI/Modules/Authentication/Login/AuthenticationLoginViewModel.swift index 29064d9582..4deed3352d 100644 --- a/RiotSwiftUI/Modules/Authentication/Login/AuthenticationLoginViewModel.swift +++ b/RiotSwiftUI/Modules/Authentication/Login/AuthenticationLoginViewModel.swift @@ -27,9 +27,16 @@ class AuthenticationLoginViewModel: AuthenticationLoginViewModelType, Authentica // MARK: - Setup - init(homeserver: AuthenticationHomeserverViewData) { + // Tchap: pass `loginMode` to ViewState to correctly display login UI. +// init(homeserver: AuthenticationHomeserverViewData) { +// let bindings = AuthenticationLoginBindings() +// let viewState = AuthenticationLoginViewState(tchapLoginState: .onlyLogin, homeserver: homeserver, bindings: bindings) +// +// super.init(initialViewState: viewState) +// } + init(homeserver: AuthenticationHomeserverViewData, authenticationMode: LoginMode = .unknown) { let bindings = AuthenticationLoginBindings() - let viewState = AuthenticationLoginViewState(homeserver: homeserver, bindings: bindings) + let viewState = AuthenticationLoginViewState(homeserver: homeserver, bindings: bindings, tchapAuthenticationMode: authenticationMode) super.init(initialViewState: viewState) } diff --git a/RiotSwiftUI/Modules/Authentication/Login/Coordinator/AuthenticationLoginCoordinator.swift b/RiotSwiftUI/Modules/Authentication/Login/Coordinator/AuthenticationLoginCoordinator.swift index 150790d46c..b1d0778411 100644 --- a/RiotSwiftUI/Modules/Authentication/Login/Coordinator/AuthenticationLoginCoordinator.swift +++ b/RiotSwiftUI/Modules/Authentication/Login/Coordinator/AuthenticationLoginCoordinator.swift @@ -90,10 +90,13 @@ final class AuthenticationLoginCoordinator: Coordinator, Presentable { self.parameters = parameters let homeserver = parameters.authenticationService.state.homeserver - let viewModel = AuthenticationLoginViewModel(homeserver: homeserver.viewData) + // Tchap: pass `loginMode` to viewModel to be able to adapt the working of the login display view. + let viewModel = AuthenticationLoginViewModel(homeserver: homeserver.viewData, authenticationMode: parameters.loginMode) authenticationLoginViewModel = viewModel - let view = AuthenticationLoginScreen(viewModel: viewModel.context) + // Tchap: Use heavily customized AuthenticationLoginScreen +// let view = AuthenticationLoginScreen(viewModel: viewModel.context) + let view = TchapAuthenticationLoginScreen(viewModel: viewModel.context) authenticationLoginHostingController = VectorHostingController(rootView: view) authenticationLoginHostingController.vc_removeBackTitle() authenticationLoginHostingController.enableNavigationBarScrollEdgeAppearance = true @@ -287,35 +290,40 @@ final class AuthenticationLoginCoordinator: Coordinator, Presentable { @MainActor private func showForgotPasswordScreen() { MXLog.debug("[AuthenticationLoginCoordinator] showForgotPasswordScreen") - guard let loginWizard = loginWizard else { - MXLog.failure("[AuthenticationLoginCoordinator] The login wizard was requested before getting the login flow.") - return - } - - let modalRouter = NavigationRouter() - - let parameters = AuthenticationForgotPasswordCoordinatorParameters(navigationRouter: modalRouter, - loginWizard: loginWizard, - homeserver: parameters.authenticationService.state.homeserver) - let coordinator = AuthenticationForgotPasswordCoordinator(parameters: parameters) - coordinator.callback = { [weak self, weak coordinator] result in - guard let self = self, let coordinator = coordinator else { return } - switch result { - case .success: - self.navigationRouter.dismissModule(animated: true, completion: nil) - self.successIndicator = self.indicatorPresenter.present(.success(label: VectorL10n.done)) - case .cancel: - self.navigationRouter.dismissModule(animated: true, completion: nil) + // Tchap: Call `startFlow` here to get `loginWizard` initialized. + Task { + try? await authenticationService.startFlow(.login) + + guard let loginWizard = loginWizard else { + MXLog.failure("[AuthenticationLoginCoordinator] The login wizard was requested before getting the login flow.") + return } - self.remove(childCoordinator: coordinator) + + let modalRouter = NavigationRouter() + + let parameters = AuthenticationForgotPasswordCoordinatorParameters(navigationRouter: modalRouter, + loginWizard: loginWizard, + homeserver: parameters.authenticationService.state.homeserver) + let coordinator = AuthenticationForgotPasswordCoordinator(parameters: parameters) + coordinator.callback = { [weak self, weak coordinator] result in + guard let self = self, let coordinator = coordinator else { return } + switch result { + case .success: + self.navigationRouter.dismissModule(animated: true, completion: nil) + self.successIndicator = self.indicatorPresenter.present(.success(label: VectorL10n.done)) + case .cancel: + self.navigationRouter.dismissModule(animated: true, completion: nil) + } + self.remove(childCoordinator: coordinator) + } + + coordinator.start() + add(childCoordinator: coordinator) + + modalRouter.setRootModule(coordinator) + + navigationRouter.present(modalRouter, animated: true) } - - coordinator.start() - add(childCoordinator: coordinator) - - modalRouter.setRootModule(coordinator) - - navigationRouter.present(modalRouter, animated: true) } /// Shows the QR login screen. diff --git a/RiotSwiftUI/Modules/Authentication/Login/View/AuthenticationLoginScreen.swift b/RiotSwiftUI/Modules/Authentication/Login/View/AuthenticationLoginScreen.swift index 79b534a6a1..03798ce497 100644 --- a/RiotSwiftUI/Modules/Authentication/Login/View/AuthenticationLoginScreen.swift +++ b/RiotSwiftUI/Modules/Authentication/Login/View/AuthenticationLoginScreen.swift @@ -38,15 +38,14 @@ struct AuthenticationLoginScreen: View { .padding(.top, OnboardingMetrics.topPaddingToNavigationBar) .padding(.bottom, 28) - // Tchap: Hide server selection -// serverInfo -// .padding(.leading, 12) -// .padding(.bottom, 16) -// -// Rectangle() -// .fill(theme.colors.quinaryContent) -// .frame(height: 1) -// .padding(.bottom, 22) + serverInfo + .padding(.leading, 12) + .padding(.bottom, 16) + + Rectangle() + .fill(theme.colors.quinaryContent) + .frame(height: 1) + .padding(.bottom, 22) if viewModel.viewState.homeserver.showLoginForm { loginForm @@ -99,12 +98,10 @@ struct AuthenticationLoginScreen: View { /// The form with text fields for username and password, along with a submit button. var loginForm: some View { VStack(spacing: 14) { - // Tchap: Update placeholder and set keyboard type to email address - RoundedBorderTextField(placeHolder: VectorL10n.authenticationVerifyEmailTextFieldPlaceholder, + RoundedBorderTextField(placeHolder: VectorL10n.authenticationLoginUsername, text: $viewModel.username, isFirstResponder: false, - configuration: UIKitTextInputConfiguration(keyboardType: .emailAddress, - returnKeyType: .next, + configuration: UIKitTextInputConfiguration(returnKeyType: .next, autocapitalizationType: .none, autocorrectionType: .no), onEditingChanged: usernameEditingChanged, diff --git a/RiotSwiftUI/Modules/Common/ViewModel/StateStoreViewModel.swift b/RiotSwiftUI/Modules/Common/ViewModel/StateStoreViewModel.swift index ed10aa7a6d..71832dce9b 100644 --- a/RiotSwiftUI/Modules/Common/ViewModel/StateStoreViewModel.swift +++ b/RiotSwiftUI/Modules/Common/ViewModel/StateStoreViewModel.swift @@ -43,7 +43,9 @@ final class ViewModelContext: ObservableOb // MARK: Public /// Get-able/Observable `Published` property for the `ViewState` - @Published fileprivate(set) var viewState: ViewState + // Tchap: set viewState settable from outside (needed for SSO Login) + // @Published fileprivate(set) var viewState: ViewState + @Published var viewState: ViewState /// Set-able/Bindable access to the bindable state. subscript(dynamicMember keyPath: WritableKeyPath) -> T { diff --git a/RiotSwiftUI/Modules/Onboarding/SplashScreen/Coordinator/OnboardingSplashScreenCoordinator.swift b/RiotSwiftUI/Modules/Onboarding/SplashScreen/Coordinator/OnboardingSplashScreenCoordinator.swift index 669ac19cbc..b40a96178d 100644 --- a/RiotSwiftUI/Modules/Onboarding/SplashScreen/Coordinator/OnboardingSplashScreenCoordinator.swift +++ b/RiotSwiftUI/Modules/Onboarding/SplashScreen/Coordinator/OnboardingSplashScreenCoordinator.swift @@ -42,7 +42,9 @@ final class OnboardingSplashScreenCoordinator: OnboardingSplashScreenCoordinator init() { let viewModel = OnboardingSplashScreenViewModel() - let view = OnboardingSplashScreen(viewModel: viewModel.context) + // Tchap: use Tchap heavy customized Onboarding splash screen +// let view = OnboardingSplashScreen(viewModel: viewModel.context) + let view = TchapOnboardingSplashScreen(viewModel: viewModel.context) onboardingSplashScreenViewModel = viewModel onboardingSplashScreenHostingController = VectorHostingController(rootView: view) onboardingSplashScreenHostingController.vc_removeBackTitle() diff --git a/RiotSwiftUI/Modules/Onboarding/SplashScreen/OnboardingSplashScreenModels.swift b/RiotSwiftUI/Modules/Onboarding/SplashScreen/OnboardingSplashScreenModels.swift index 3b81de78eb..d766caf03d 100644 --- a/RiotSwiftUI/Modules/Onboarding/SplashScreen/OnboardingSplashScreenModels.swift +++ b/RiotSwiftUI/Modules/Onboarding/SplashScreen/OnboardingSplashScreenModels.swift @@ -30,7 +30,9 @@ struct OnboardingSplashScreenPageContent { enum OnboardingSplashScreenViewModelResult { case register - case login + // Tchap: allow override home server's preferred login mode +// case login + case login(forcedAuthenticationMode: LoginMode?) } // MARK: View @@ -94,7 +96,8 @@ struct OnboardingSplashScreenBindings { enum OnboardingSplashScreenViewAction { case register - case login + // Tchap: allow override home server's preferred login mode + case login(LoginMode?) case nextPage case previousPage case hiddenPage diff --git a/RiotSwiftUI/Modules/Onboarding/SplashScreen/OnboardingSplashScreenViewModel.swift b/RiotSwiftUI/Modules/Onboarding/SplashScreen/OnboardingSplashScreenViewModel.swift index 0d9c9c5636..3eb6ba3503 100644 --- a/RiotSwiftUI/Modules/Onboarding/SplashScreen/OnboardingSplashScreenViewModel.swift +++ b/RiotSwiftUI/Modules/Onboarding/SplashScreen/OnboardingSplashScreenViewModel.swift @@ -45,8 +45,11 @@ class OnboardingSplashScreenViewModel: OnboardingSplashScreenViewModelType, Onbo switch viewAction { case .register: register() - case .login: - login() + // Tchap: allow override home server's preferred login mode +// case let .login: +// login() + case let .login(forcedAuthenticationMode): + login(forcedAuthenticationMode: forcedAuthenticationMode) case .nextPage: // Wrap back round to the first page index when reaching the end. state.bindings.pageIndex = (state.bindings.pageIndex + 1) % state.content.count @@ -63,7 +66,11 @@ class OnboardingSplashScreenViewModel: OnboardingSplashScreenViewModelType, Onbo completion?(.register) } - private func login() { - completion?(.login) + // Tchap: allow override home server's preferred login mode +// private func login() { +// completion?(.login) +// } + private func login(forcedAuthenticationMode: LoginMode?) { + completion?(.login(forcedAuthenticationMode: forcedAuthenticationMode)) } } diff --git a/RiotSwiftUI/Modules/Onboarding/SplashScreen/View/OnboardingSplashScreen.swift b/RiotSwiftUI/Modules/Onboarding/SplashScreen/View/OnboardingSplashScreen.swift index 7bb7b80987..a26516aa24 100644 --- a/RiotSwiftUI/Modules/Onboarding/SplashScreen/View/OnboardingSplashScreen.swift +++ b/RiotSwiftUI/Modules/Onboarding/SplashScreen/View/OnboardingSplashScreen.swift @@ -25,14 +25,13 @@ struct OnboardingSplashScreen: View { @Environment(\.theme) private var theme @Environment(\.layoutDirection) private var layoutDirection - // Tchap: remove carousel -// private var isLeftToRight: Bool { layoutDirection == .leftToRight } -// private var pageCount: Int { viewModel.viewState.content.count } -// -// /// A timer to automatically animate the pages. -// @State private var pageTimer: Timer? -// /// The amount of offset to apply when a drag gesture is in progress. -// @State private var dragOffset: CGFloat = .zero + private var isLeftToRight: Bool { layoutDirection == .leftToRight } + private var pageCount: Int { viewModel.viewState.content.count } + + /// A timer to automatically animate the pages. + @State private var pageTimer: Timer? + /// The amount of offset to apply when a drag gesture is in progress. + @State private var dragOffset: CGFloat = .zero // MARK: Public @@ -44,41 +43,28 @@ struct OnboardingSplashScreen: View { Spacer() .frame(height: OnboardingMetrics.spacerHeight(in: geometry)) - // Tchap: remove carousel -// // The main content of the carousel -// HStack(alignment: .top, spacing: 0) { -// // Add a hidden page at the start of the carousel duplicating the content of the last page -// OnboardingSplashScreenPage(content: viewModel.viewState.content[pageCount - 1]) -// .frame(width: geometry.size.width) -// -// ForEach(0..