Stop using an ephemeral web browser session on SSO (#6464)

Rename the bundle name to Element for the SSO alert.

* Fix unit tests after bundle name change.

* Update slather for bundle name change.
This commit is contained in:
Doug
2022-07-27 12:13:31 +01:00
committed by GitHub
parent 335872d440
commit c5a50fd203
34 changed files with 51 additions and 64 deletions

View File

@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
version = "1.7">
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
runPostActionsOnFailure = "NO">
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
@@ -16,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "57B13CC4586E9D43ED24DE1E"
BuildableName = "Riot.app"
BuildableName = "Element.app"
BlueprintName = "Riot"
ReferencedContainer = "container:Riot.xcodeproj">
</BuildableReference>
@@ -27,9 +26,17 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
onlyGenerateCoverageForSpecifiedTargets = "NO"
shouldUseLaunchSchemeArgsEnv = "YES"
disableMainThreadChecker = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "57B13CC4586E9D43ED24DE1E"
BuildableName = "Element.app"
BlueprintName = "Riot"
ReferencedContainer = "container:Riot.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
@@ -42,41 +49,28 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "57B13CC4586E9D43ED24DE1E"
BuildableName = "Riot.app"
BlueprintName = "Riot"
ReferencedContainer = "container:Riot.xcodeproj">
</BuildableReference>
</MacroExpansion>
<CommandLineArguments>
</CommandLineArguments>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
disableMainThreadChecker = "YES"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
disableMainThreadChecker = "YES">
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "57B13CC4586E9D43ED24DE1E"
BuildableName = "Riot.app"
BuildableName = "Element.app"
BlueprintName = "Riot"
ReferencedContainer = "container:Riot.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
</CommandLineArguments>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
@@ -89,13 +83,11 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "57B13CC4586E9D43ED24DE1E"
BuildableName = "Riot.app"
BuildableName = "Element.app"
BlueprintName = "Riot"
ReferencedContainer = "container:Riot.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<CommandLineArguments>
</CommandLineArguments>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">

View File

@@ -20,7 +20,7 @@
#include "Config/AppIdentifiers.xcconfig"
#include "Config/AppVersion.xcconfig"
PRODUCT_NAME = Riot
PRODUCT_NAME = Element
PRODUCT_BUNDLE_IDENTIFIER = $(BASE_BUNDLE_IDENTIFIER)
INFOPLIST_FILE = Riot/SupportingFiles/Info.plist
@@ -28,7 +28,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
CODE_SIGN_ENTITLEMENTS = Riot/SupportingFiles/Riot.entitlements
SWIFT_OBJC_BRIDGING_HEADER = $(SRCROOT)/$(PRODUCT_NAME)/SupportingFiles/Riot-Bridging-Header.h
SWIFT_OBJC_BRIDGING_HEADER = $(SRCROOT)/Riot/SupportingFiles/Riot-Bridging-Header.h
LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks
SWIFT_OBJC_INTERFACE_HEADER_NAME = GeneratedInterface-Swift.h

View File

@@ -64,18 +64,11 @@ final class SSOAuthentificationSession: SSOAuthentificationSessionProtocol {
completionHandler(callbackURL, finalError)
}
// Ask the browser for a private authentication session
if #available(iOS 13.0, *) {
authentificationSession.prefersEphemeralWebBrowserSession = true
}
self.authentificationSession = authentificationSession
if #available(iOS 13.0, *) {
if let asWebContextProvider = contextProvider as? ASWebAuthenticationPresentationContextProviding {
authentificationSession.presentationContextProvider = asWebContextProvider
}
if let asWebContextProvider = contextProvider as? ASWebAuthenticationPresentationContextProviding {
authentificationSession.presentationContextProvider = asWebContextProvider
}
authentificationSession.start()

View File

@@ -15,7 +15,7 @@
//
import XCTest
@testable import Riot
@testable import Element
import AnalyticsEvents
class AnalyticsTests: XCTestCase {

View File

@@ -16,7 +16,7 @@
import XCTest
@testable import Riot
@testable import Element
class EmojiServiceTests: XCTestCase {

View File

@@ -16,7 +16,7 @@
import XCTest
@testable import Riot
@testable import Element
class EmojiStoreTests: XCTestCase {

View File

@@ -16,7 +16,7 @@
import XCTest
import UIKit
@testable import Riot
@testable import Element
class EventMenuBuilderTests: XCTestCase {

View File

@@ -16,7 +16,7 @@
import XCTest
@testable import Riot
@testable import Element
class HomeserverConfigurationTests: XCTestCase {

View File

@@ -16,7 +16,7 @@
import XCTest
@testable import Riot
@testable import Element
class JitsiWellKnownTests: XCTestCase {

View File

@@ -16,7 +16,7 @@
import XCTest
@testable import Riot
@testable import Element
final class MarkdownToHTMLRendererTests: XCTestCase {
// MARK: - Tests

View File

@@ -17,7 +17,7 @@
import Foundation
import XCTest
@testable import Riot
@testable import Element
class MXKRoomDataSourceTests: XCTestCase {

View File

@@ -16,7 +16,7 @@
import XCTest
@testable import Riot
@testable import Element
import MobileCoreServices

View File

@@ -16,7 +16,7 @@
import XCTest
@testable import Riot
@testable import Element
@MainActor class AuthenticationServiceTests: XCTestCase {
var service: AuthenticationService!

View File

@@ -16,7 +16,7 @@
import XCTest
@testable import Riot
@testable import Element
class LoginTests: XCTestCase {
func testUserParameterIdentifier() {

View File

@@ -16,7 +16,7 @@
import Foundation
@testable import Riot
@testable import Element
/// A mock REST client that can be used for authentication.
class MockAuthenticationRestClient: AuthenticationRestClient {

View File

@@ -16,7 +16,7 @@
import Foundation
@testable import Riot
@testable import Element
struct MockSessionCreator: SessionCreatorProtocol {
/// Returns a basic session created from the supplied credentials. This prevents the app from setting up the account during tests.

View File

@@ -16,7 +16,7 @@
import XCTest
@testable import Riot
@testable import Element
class RegistrationTests: XCTestCase {
/// Makes an authentication session that mimics the matrix.org flow.

View File

@@ -16,7 +16,7 @@
import Foundation
import XCTest
@testable import Riot
@testable import Element
class RecentsDataSourceSectionsTests: XCTestCase {
func test_canCreateWithNSNumbers() {

View File

@@ -17,7 +17,7 @@
import Foundation
import XCTest
@testable import CommonKit
@testable import Riot
@testable import Element
import MatrixSDK
class UserIndicatorStoreTests: XCTestCase {

View File

@@ -16,7 +16,7 @@
import Foundation
import XCTest
@testable import Riot
@testable import Element
class MXRoomAliasResolutionDeeplinkTests: XCTestCase {
func test_fragmentIsNilForInvalidResolution() {

View File

@@ -15,7 +15,7 @@
//
import XCTest
@testable import Riot
@testable import Element
class OnboardingTests: XCTestCase {

View File

@@ -15,7 +15,7 @@
//
import XCTest
@testable import Riot
@testable import Element
class PasswordValidatorTests: XCTestCase {

View File

@@ -15,7 +15,7 @@
//
import XCTest
@testable import Riot
@testable import Element
// MARK: - Inputs
private enum Inputs {

View File

@@ -15,7 +15,7 @@
//
import XCTest
@testable import Riot
@testable import Element
class MockRoomNotificationSettingsView: RoomNotificationSettingsViewModelViewDelegate {

View File

@@ -15,7 +15,7 @@
//
import XCTest
@testable import Riot
@testable import Element
class SessionCreatorTests: XCTestCase {

View File

@@ -15,7 +15,7 @@
//
import XCTest
@testable import Riot
@testable import Element
class String_Element: XCTestCase {

View File

@@ -15,7 +15,7 @@
//
import XCTest
@testable import Riot
@testable import Element
class URLPreviewStoreTests: XCTestCase {
var store: URLPreviewStore!

View File

@@ -15,7 +15,7 @@
//
import XCTest
@testable import Riot
@testable import Element
class URLValidatorTests: XCTestCase {

View File

@@ -15,7 +15,7 @@
//
import XCTest
@testable import Riot
@testable import Element
class UniversalLinkTests: XCTestCase {

View File

@@ -16,7 +16,7 @@
import XCTest
@testable import Riot
@testable import Element
class UserInteractiveAuthenticationServiceTests: XCTestCase {

View File

@@ -16,7 +16,7 @@
import XCTest
@testable import Riot
@testable import Element
class VectorWellKnownTests: XCTestCase {

View File

@@ -46,7 +46,7 @@ targets:
PRODUCT_BUNDLE_IDENTIFIER: org.matrix.$(PRODUCT_NAME:rfc1034identifier)
PRODUCT_NAME: RiotTests
SWIFT_OBJC_BRIDGING_HEADER: RiotTests/RiotTests-Bridging-Header.h
TEST_HOST: $(BUILT_PRODUCTS_DIR)/Riot.app/Riot
TEST_HOST: $(BUILT_PRODUCTS_DIR)/Element.app/Element
configs:
Debug:
Release:

1
changelog.d/6462.api Normal file
View File

@@ -0,0 +1 @@
Update the app's bundle name to show Element during SSO.

1
changelog.d/6462.bugfix Normal file
View File

@@ -0,0 +1 @@
Stop using an ephemeral web browser session for SSO authentication.