From 14e419c45aefb8b35eca72ef9b102fb2bef930e4 Mon Sep 17 00:00:00 2001 From: Tamas Toth Date: Mon, 11 Nov 2024 14:49:25 +0100 Subject: [PATCH] NEVISACCESSAPP-6297: Update example apps to use SDK 3.8.1 --- Gemfile.lock | 2 +- NevisExampleApp.xcodeproj/project.pbxproj | 8 +++-- .../xcschemes/NevisExampleApp.xcscheme | 2 +- .../Model/AppConfiguration.swift | 2 ++ .../Resources/ConfigIdentitySuite.plist | 2 ++ .../SelectAccountPresenter.swift | 2 +- .../Utility/Validation/AccountValidator.swift | 8 ++--- .../Validation/AuthenticatorValidator.swift | 4 +-- Podfile | 10 +++--- Podfile.lock | 34 +++++++++---------- 10 files changed, 39 insertions(+), 35 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2c8d1a4..6aa689d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -305,4 +305,4 @@ DEPENDENCIES fastlane-plugin-firebase_app_distribution BUNDLED WITH - 2.5.22 + 2.5.23 diff --git a/NevisExampleApp.xcodeproj/project.pbxproj b/NevisExampleApp.xcodeproj/project.pbxproj index 36b5bf0..878ac26 100644 --- a/NevisExampleApp.xcodeproj/project.pbxproj +++ b/NevisExampleApp.xcodeproj/project.pbxproj @@ -719,7 +719,7 @@ attributes = { BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 1250; - LastUpgradeCheck = 1540; + LastUpgradeCheck = 1610; TargetAttributes = { 3833EB182685EA03002C5E0C = { CreatedOnToolsVersion = 12.5; @@ -956,6 +956,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1018,6 +1019,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -1055,7 +1057,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 3.7.0; + MARKETING_VERSION = 3.8.1; PRODUCT_BUNDLE_IDENTIFIER = ch.nevis.mobile.authentication.sdk.ios.example; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; @@ -1087,7 +1089,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 3.7.0; + MARKETING_VERSION = 3.8.1; PRODUCT_BUNDLE_IDENTIFIER = ch.nevis.mobile.authentication.sdk.ios.example; PRODUCT_NAME = "$(TARGET_NAME)"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; diff --git a/NevisExampleApp.xcodeproj/xcshareddata/xcschemes/NevisExampleApp.xcscheme b/NevisExampleApp.xcodeproj/xcshareddata/xcschemes/NevisExampleApp.xcscheme index 4c2185e..0a83f48 100644 --- a/NevisExampleApp.xcodeproj/xcshareddata/xcschemes/NevisExampleApp.xcscheme +++ b/NevisExampleApp.xcodeproj/xcshareddata/xcschemes/NevisExampleApp.xcscheme @@ -1,6 +1,6 @@ /nevisfido/uaf/1.1/request/deregistration/ dispatchTargetResourcePath /nevisfido/token/dispatch/targets/ + deviceResourcePath + /nevisfido/devices/ networkTimeoutInSeconds 60 authenticationMaxRetries diff --git a/NevisExampleApp/Screens/Select Account/SelectAccountPresenter.swift b/NevisExampleApp/Screens/Select Account/SelectAccountPresenter.swift index 19506a5..43d8a44 100644 --- a/NevisExampleApp/Screens/Select Account/SelectAccountPresenter.swift +++ b/NevisExampleApp/Screens/Select Account/SelectAccountPresenter.swift @@ -249,7 +249,7 @@ private extension SelectAccountPresenter { } let registeredAuthenticators = authenticators.filter { - $0.registration?.isRegistered(account.username) ?? false + $0.registration.isRegistered(account.username) } self.doDeregistration(for: account.username, diff --git a/NevisExampleApp/Utility/Validation/AccountValidator.swift b/NevisExampleApp/Utility/Validation/AccountValidator.swift index c18bb58..f650c7c 100644 --- a/NevisExampleApp/Utility/Validation/AccountValidator.swift +++ b/NevisExampleApp/Utility/Validation/AccountValidator.swift @@ -23,15 +23,15 @@ extension AccountValidator { return .failure(AppError.authenticatorNotFound) } - var accounts = [any Account]() + var accounts: [Username: any Account] = [:] supportedAuthenticators.forEach { authenticator in - authenticator.registration?.registeredAccounts.forEach { account in + authenticator.registration.registeredAccounts.forEach { account in if context.isPolicyCompliant(username: account.username, aaid: authenticator.aaid) { - accounts.append(account) + accounts[account.username] = account } } } - return .success(accounts) + return .success(accounts.values.map { $0 }) } } diff --git a/NevisExampleApp/Utility/Validation/AuthenticatorValidator.swift b/NevisExampleApp/Utility/Validation/AuthenticatorValidator.swift index dd51e77..6740a38 100644 --- a/NevisExampleApp/Utility/Validation/AuthenticatorValidator.swift +++ b/NevisExampleApp/Utility/Validation/AuthenticatorValidator.swift @@ -39,12 +39,10 @@ extension AuthenticatorValidator { /// - Returns: The result of the validation func validateForAuthentication(context: AuthenticatorSelectionContext, allowlistedAuthenticators: [AuthenticatorAaid]) -> ValidationResult<[any Authenticator]> { let allowedAuthenticators = allowedAuthenticators(context: context, allowlistedAuthenticators: allowlistedAuthenticators).filter { authenticator in - guard let registration = authenticator.registration else { return false } - // Do not display: // - policy non-registered authenticators, // - not hardware supported authenticators. - return authenticator.isSupportedByHardware && registration.isRegistered(context.account.username) + authenticator.isSupportedByHardware && authenticator.registration.isRegistered(context.account.username) } if allowedAuthenticators.isEmpty { diff --git a/Podfile b/Podfile index 9a54421..e94bc21 100644 --- a/Podfile +++ b/Podfile @@ -8,14 +8,14 @@ IOSDeploymentTarget = '12.0' target 'NevisExampleApp' do platform :ios, IOSDeploymentTarget - pod 'FittedSheets', '= 2.6.1' + pod 'FittedSheets', '= 2.7.1' pod 'KRProgressHUD', '= 3.4.8' pod 'MercariQRScanner', '= 1.9.0' - pod 'Swinject', '= 2.8.3' - pod 'SwinjectAutoregistration', '= 2.8.3' + pod 'Swinject', '= 2.9.1' + pod 'SwinjectAutoregistration', '= 2.9.1' pod 'Then', '= 3.0.0' - pod 'NevisMobileAuthentication', '3.7.3', :configurations => ['Release'] - pod 'NevisMobileAuthentication-Debug', '3.7.3', :configurations => ['Debug'] + pod 'NevisMobileAuthentication', '3.8.1', :configurations => ['Release'] + pod 'NevisMobileAuthentication-Debug', '3.8.1', :configurations => ['Debug'] end post_install do |installer| diff --git a/Podfile.lock b/Podfile.lock index 2ba1e66..f924f73 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,24 +1,24 @@ PODS: - - FittedSheets (2.6.1) + - FittedSheets (2.7.1) - KRActivityIndicatorView (3.0.8) - KRProgressHUD (3.4.8): - KRActivityIndicatorView (= 3.0.8) - MercariQRScanner (1.9.0) - - NevisMobileAuthentication (3.7.3) - - NevisMobileAuthentication-Debug (3.7.3) - - Swinject (2.8.3) - - SwinjectAutoregistration (2.8.3): - - Swinject (~> 2.8.3) + - NevisMobileAuthentication (3.8.1) + - NevisMobileAuthentication-Debug (3.8.1) + - Swinject (2.9.1) + - SwinjectAutoregistration (2.9.1): + - Swinject (~> 2.9.1) - Then (3.0.0) DEPENDENCIES: - - FittedSheets (= 2.6.1) + - FittedSheets (= 2.7.1) - KRProgressHUD (= 3.4.8) - MercariQRScanner (= 1.9.0) - - NevisMobileAuthentication (= 3.7.3) - - NevisMobileAuthentication-Debug (= 3.7.3) - - Swinject (= 2.8.3) - - SwinjectAutoregistration (= 2.8.3) + - NevisMobileAuthentication (= 3.8.1) + - NevisMobileAuthentication-Debug (= 3.8.1) + - Swinject (= 2.9.1) + - SwinjectAutoregistration (= 2.9.1) - Then (= 3.0.0) SPEC REPOS: @@ -34,16 +34,16 @@ SPEC REPOS: - Then SPEC CHECKSUMS: - FittedSheets: 37e35f105c531f3845075f1788dd8517a35315c4 + FittedSheets: 38ec85129bf5c970f99d4dba4fbf48185c5fa98a KRActivityIndicatorView: c5c503bf56e54834382dd926b64ff47287ca0006 KRProgressHUD: d0fb4e72428d312eb6966e84c543ea58fb1efbc7 MercariQRScanner: e5aea873969af59b09b4cc411fc1c5b6293dba44 - NevisMobileAuthentication: 2acb327b1ec23d0d5cd17ff05392cad6405cf070 - NevisMobileAuthentication-Debug: b8e3141e0e926a93488c7d92d7658b8ed388a2b7 - Swinject: 893c9a543000ac2f10ee4cbaf0933c6992c935d5 - SwinjectAutoregistration: e3ee378dc458acf78d176fc7fec3902603452667 + NevisMobileAuthentication: c42744e752332068c6f7f2828dbbd713ebc18f14 + NevisMobileAuthentication-Debug: 148684612cd8c5a40f782831aa36a98dc8230e90 + Swinject: a827d508c6270da03ec74e558e728917a888fa9b + SwinjectAutoregistration: a14d8ed61e88b0044a292958d63318b378375ca6 Then: 844265ae87834bbe1147d91d5d41a404da2ec27d -PODFILE CHECKSUM: 11aba951730638eee898effcb9a85f540ce5d708 +PODFILE CHECKSUM: 81cf7bc3e4de16cd9976dafa133216c7567c8447 COCOAPODS: 1.16.2