diff --git a/.swiftlint.yml b/.swiftlint.yml index e65fa46635893e536fa78b4a40ce5f1d14896ed9..48c176560b7e49dcb37e4b352d23681600bab06a 100755 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -12,13 +12,12 @@ opt_in_rules: - trailing_closure included: - - ElementX - - UnitTests - - UITests + - "*/Sources/*" - Tools/Scripts/Templates excluded: - - IntegrationTests - - ElementX/Sources/Generated + - "*/Sources/Generated/*" + - IntegrationTests # prints to stdout for performance tests. + - Tools/Sources # Our command-line tools use a lot of print commands. line_length: warning: 250 diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 360412b92b4c395d4526be5ec9f3bc0604b7550c..9600ff97ac2597d559a54b3206dd8d8fc6ff23b2 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -3066,7 +3066,6 @@ isa = PBXGroup; children = ( 01C4C7DB37597D7D8379511A /* Assets.xcassets */, - D174C6E7DCA00AAFC0169925 /* ElementCall */, A0C06C0F6A8621B22BFAEB56 /* Localizations */, 8AEA6A91159FA0D3EAFCCB0D /* Sounds */, ); @@ -5504,13 +5503,6 @@ path = ShareExtension; sourceTree = "<group>"; }; - D174C6E7DCA00AAFC0169925 /* ElementCall */ = { - isa = PBXGroup; - children = ( - ); - path = ElementCall; - sourceTree = "<group>"; - }; D382E465AF067C1BF888BF8E /* View */ = { isa = PBXGroup; children = ( diff --git a/ElementX.xcodeproj/xcshareddata/xcschemes/PreviewTests.xcscheme b/ElementX.xcodeproj/xcshareddata/xcschemes/PreviewTests.xcscheme index 86b8247e9a4cef6d33eec3ee4eb3143229851002..3d2a81967677482d5c2c6a20657db2c36310c976 100644 --- a/ElementX.xcodeproj/xcshareddata/xcschemes/PreviewTests.xcscheme +++ b/ElementX.xcodeproj/xcshareddata/xcschemes/PreviewTests.xcscheme @@ -4,7 +4,8 @@ version = "1.7"> <BuildAction parallelizeBuildables = "YES" - buildImplicitDependencies = "YES"> + buildImplicitDependencies = "YES" + runPostActionsOnFailure = "NO"> <BuildActionEntries> <BuildActionEntry buildForTesting = "YES" @@ -29,6 +30,12 @@ shouldUseLaunchSchemeArgsEnv = "YES" codeCoverageEnabled = "YES" onlyGenerateCoverageForSpecifiedTargets = "YES"> + <TestPlans> + <TestPlanReference + default = "YES" + reference = "container:PreviewTests/SupportingFiles/PreviewTests.xctestplan"> + </TestPlanReference> + </TestPlans> <MacroExpansion> <BuildableReference BuildableIdentifier = "primary" @@ -38,6 +45,10 @@ ReferencedContainer = "container:ElementX.xcodeproj"> </BuildableReference> </MacroExpansion> + <Testables> + </Testables> + <CommandLineArguments> + </CommandLineArguments> <CodeCoverageTargets> <BuildableReference BuildableIdentifier = "primary" @@ -47,12 +58,6 @@ ReferencedContainer = "container:ElementX.xcodeproj"> </BuildableReference> </CodeCoverageTargets> - <TestPlans> - <TestPlanReference - reference = "container:PreviewTests/SupportingFiles/PreviewTests.xctestplan" - default = "YES"> - </TestPlanReference> - </TestPlans> </TestAction> <LaunchAction buildConfiguration = "Debug" @@ -73,6 +78,8 @@ ReferencedContainer = "container:ElementX.xcodeproj"> </BuildableReference> </MacroExpansion> + <CommandLineArguments> + </CommandLineArguments> </LaunchAction> <ProfileAction buildConfiguration = "Release" @@ -80,6 +87,8 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> + <CommandLineArguments> + </CommandLineArguments> <MacroExpansion> <BuildableReference BuildableIdentifier = "primary" diff --git a/ElementX/Sources/Application/AppSettings.swift b/ElementX/Sources/Application/AppSettings.swift index 503c719015c1698874b6ff0102f84985dd3900ad..73fc31e2bb37defc076558385f242b77577204b9 100644 --- a/ElementX/Sources/Application/AppSettings.swift +++ b/ElementX/Sources/Application/AppSettings.swift @@ -81,10 +81,22 @@ final class AppSettings { // MARK: - Hooks - func override(defaultHomeserverAddress: String? = nil) { - if let defaultHomeserverAddress { - self.defaultHomeserverAddress = defaultHomeserverAddress - } + func override(defaultHomeserverAddress: String, + oidcRedirectURL: URL, + websiteURL: URL, + logoURL: URL, + copyrightURL: URL, + acceptableUseURL: URL, + privacyURL: URL, + supportEmailAddress: String) { + self.defaultHomeserverAddress = defaultHomeserverAddress + self.oidcRedirectURL = oidcRedirectURL + self.websiteURL = websiteURL + self.logoURL = logoURL + self.copyrightURL = copyrightURL + self.acceptableUseURL = acceptableUseURL + self.privacyURL = privacyURL + self.supportEmailAddress = supportEmailAddress } // MARK: - Application @@ -118,17 +130,17 @@ final class AppSettings { let backgroundAppRefreshTaskIdentifier = "io.element.elementx.background.refresh" /// A URL where users can go read more about the app. - let websiteURL: URL = "https://element.io" + private(set) var websiteURL: URL = "https://element.io" /// A URL that contains the app's logo that may be used when showing content in a web view. - let logoURL: URL = "https://element.io/mobile-icon.png" + private(set) var logoURL: URL = "https://element.io/mobile-icon.png" /// A URL that contains that app's copyright notice. - let copyrightURL: URL = "https://element.io/copyright" + private(set) var copyrightURL: URL = "https://element.io/copyright" /// A URL that contains the app's Terms of use. - let acceptableUseURL: URL = "https://element.io/acceptable-use-policy-terms" + private(set) var acceptableUseURL: URL = "https://element.io/acceptable-use-policy-terms" /// A URL that contains the app's Privacy Policy. - let privacyURL: URL = "https://element.io/privacy" + private(set) var privacyURL: URL = "https://element.io/privacy" /// An email address that should be used for support requests. - let supportEmailAddress = "support@element.io" + private(set) var supportEmailAddress = "support@element.io" /// A URL where users can go read more about encryption in general. let encryptionURL: URL = "https://element.io/help#encryption" /// A URL where users can go read more about the chat backup. @@ -161,7 +173,7 @@ final class AppSettings { /// Any pre-defined static client registrations for OIDC issuers. let oidcStaticRegistrations: [URL: String] = ["https://id.thirdroom.io/realms/thirdroom": "elementx"] /// The redirect URL used for OIDC. This no longer uses universal links so we don't need the bundle ID to avoid conflicts between Element X, Nightly and PR builds. - let oidcRedirectURL: URL = "https://element.io/oidc/login" + private(set) var oidcRedirectURL: URL = "https://element.io/oidc/login" private(set) lazy var oidcConfiguration = OIDCConfigurationProxy(clientName: InfoPlistReader.main.bundleDisplayName, redirectURI: oidcRedirectURL, diff --git a/Enterprise b/Enterprise index 4b4116313f0f56972114423d5fe77dd959e38420..34a88e7284e48a878df976021cb75bf2c33ca1d9 160000 --- a/Enterprise +++ b/Enterprise @@ -1 +1 @@ -Subproject commit 4b4116313f0f56972114423d5fe77dd959e38420 +Subproject commit 34a88e7284e48a878df976021cb75bf2c33ca1d9 diff --git a/Gemfile.lock b/Gemfile.lock index 27c0a0b2698a6dfdad690539ed761ddc1022f63f..8a16260ab3be9a2e24237e13dceac0ddd1f3856e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -145,12 +145,12 @@ GEM google-apis-core (>= 0.11.0, < 2.a) google-apis-storage_v1 (0.31.0) google-apis-core (>= 0.11.0, < 2.a) - google-cloud-core (1.8.0) + google-cloud-core (1.7.1) google-cloud-env (>= 1.0, < 3.a) google-cloud-errors (~> 1.0) google-cloud-env (1.6.0) faraday (>= 0.17.3, < 3.0) - google-cloud-errors (1.5.0) + google-cloud-errors (1.4.0) google-cloud-storage (1.47.0) addressable (~> 2.8) digest-crc (~> 0.4)