Skip to content

Commit

Permalink
Merge pull request #29 from nevissecurity/feature/NEVISACCESSAPP-6297-…
Browse files Browse the repository at this point in the history
…Update-example-apps-to-use-SDK-3.8.1

NEVISACCESSAPP-6297: Update example apps to use SDK 3.8.1
  • Loading branch information
tamas-toth authored Nov 11, 2024
2 parents e5350ae + 2dc10d0 commit bdbf633
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 58 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ on:
env:
CURRENT_BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
RUBY_VERSION: '3.1'
XCODE_VERSION: '15.2'
XCODE_VERSION: '15.4'

jobs:
main:
runs-on: macos-13
runs-on: macos-14

steps:
# Checkout the repository under $GITHUB_WORKSPACE
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ on:

env:
RUBY_VERSION: '3.1'
XCODE_VERSION: '15.2'
XCODE_VERSION: '15.4'

jobs:
pr:
runs-on: macos-13
runs-on: macos-14

steps:
# Checkout the repository under $GITHUB_WORKSPACE
Expand Down
2 changes: 1 addition & 1 deletion .swiftformat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# File options
--swiftversion 5.9
--swiftversion 5.10

# Format options
--allman false
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -297,4 +297,4 @@ DEPENDENCIES
fastlane (~> 2.225)

BUNDLED WITH
2.5.22
2.5.23
8 changes: 5 additions & 3 deletions NevisExampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1250;
LastUpgradeCheck = 1540;
LastUpgradeCheck = 1610;
TargetAttributes = {
3833EB182685EA03002C5E0C = {
CreatedOnToolsVersion = 12.5;
Expand Down Expand Up @@ -1366,6 +1366,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;
Expand Down Expand Up @@ -1428,6 +1429,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;
Expand Down Expand Up @@ -1465,7 +1467,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";
Expand Down Expand Up @@ -1496,7 +1498,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";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1610"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ struct AppConfiguration: Codable {
case deregistrationRequestPath
/// Key for the dispatch target resource path.
case dispatchTargetResourcePath
/// Key for the devices resource path.
case deviceResourcePath
/// Key for the authentication max retries.
case authenticationMaxRetries
/// Key for the authentication retry interval.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ extension DeregistrationUseCaseImpl: DeregistrationUseCase {
authenticators.forEach { authenticator in
if let username {
// deregister only an account
if let registration = authenticator.registration, registration.isRegistered(username) {
if authenticator.registration.isRegistered(username) {
responses.append(deregister(username: username,
aaid: authenticator.aaid,
authorizationProvider: authorizationProvider))
}
}
else {
// username not provided, deregister all account
authenticator.registration?.registeredAccounts.forEach { account in
authenticator.registration.registeredAccounts.forEach { account in
responses.append(deregister(username: account.username,
aaid: authenticator.aaid,
authorizationProvider: authorizationProvider))
Expand Down
10 changes: 4 additions & 6 deletions NevisExampleApp/Domain/Validators/AccountValidatorImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,15 @@ extension AccountValidatorImpl: AccountValidator {
throw BusinessError.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) {
if !accounts.contains(where: { $0.username == account.username }) {
accounts.append(account)
}
accounts[account.username] = account
}
}
}

return accounts
return accounts.values.map { $0 }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ extension AuthenticatorValidatorImpl: AuthenticatorValidator {
func validateForAuthentication(context: AuthenticatorSelectionContext) -> Observable<[any Authenticator]> {
configurationLoader.load().flatMap { configuration -> Observable<[any Authenticator]> in
let allowedAuthenticators = self.allowedAuthenticators(context: context, allowlistedAuthenticators: configuration.authenticatorAllowlist).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 {
Expand Down
2 changes: 2 additions & 0 deletions NevisExampleApp/Resources/ConfigIdentitySuite.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
<string>/nevisfido/uaf/1.1/request/deregistration/</string>
<key>dispatchTargetResourcePath</key>
<string>/nevisfido/token/dispatch/targets/</string>
<key>deviceResourcePath</key>
<string>/nevisfido/devices/</string>
<key>networkTimeoutInSeconds</key>
<integer>60</integer>
<key>authenticationMaxRetries</key>
Expand Down
2 changes: 1 addition & 1 deletion NevisExampleApp/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>3.7.0</string>
<string>3.8.1</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand Down
14 changes: 7 additions & 7 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ IOSDeploymentTarget = '12.0'
target 'NevisExampleApp' do
platform :ios, IOSDeploymentTarget

pod 'FittedSheets', '= 2.6.1'
pod 'FittedSheets', '= 2.7.1'
pod 'KRProgressHUD', '= 3.4.7'
pod 'MercariQRScanner', '= 1.9.0'
pod 'Reusable', '= 4.1.2'
pod 'RxCocoa', '= 6.5.0'
pod 'RxSwift', '= 6.5.0'
pod 'Swinject', '= 2.8.3'
pod 'SwinjectAutoregistration', '= 2.8.3'
pod 'RxCocoa', '= 6.8.0'
pod 'RxSwift', '= 6.8.0'
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|
Expand Down
56 changes: 28 additions & 28 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
PODS:
- FittedSheets (2.6.1)
- FittedSheets (2.7.1)
- KRActivityIndicatorView (3.0.7)
- KRProgressHUD (3.4.7):
- KRActivityIndicatorView (= 3.0.7)
- MercariQRScanner (1.9.0)
- NevisMobileAuthentication (3.7.3)
- NevisMobileAuthentication-Debug (3.7.3)
- NevisMobileAuthentication (3.8.1)
- NevisMobileAuthentication-Debug (3.8.1)
- Reusable (4.1.2):
- Reusable/Storyboard (= 4.1.2)
- Reusable/View (= 4.1.2)
- Reusable/Storyboard (4.1.2)
- Reusable/View (4.1.2)
- RxCocoa (6.5.0):
- RxRelay (= 6.5.0)
- RxSwift (= 6.5.0)
- RxRelay (6.5.0):
- RxSwift (= 6.5.0)
- RxSwift (6.5.0)
- Swinject (2.8.3)
- SwinjectAutoregistration (2.8.3):
- Swinject (~> 2.8.3)
- RxCocoa (6.8.0):
- RxRelay (= 6.8.0)
- RxSwift (= 6.8.0)
- RxRelay (6.8.0):
- RxSwift (= 6.8.0)
- RxSwift (6.8.0)
- 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.7)
- MercariQRScanner (= 1.9.0)
- NevisMobileAuthentication (~> 3.7.0)
- NevisMobileAuthentication-Debug (~> 3.7.0)
- NevisMobileAuthentication (~> 3.8.1)
- NevisMobileAuthentication-Debug (~> 3.8.1)
- Reusable (= 4.1.2)
- RxCocoa (= 6.5.0)
- RxSwift (= 6.5.0)
- Swinject (= 2.8.3)
- SwinjectAutoregistration (= 2.8.3)
- RxCocoa (= 6.8.0)
- RxSwift (= 6.8.0)
- Swinject (= 2.9.1)
- SwinjectAutoregistration (= 2.9.1)
- Then (= 3.0.0)

SPEC REPOS:
Expand All @@ -52,20 +52,20 @@ SPEC REPOS:
- Then

SPEC CHECKSUMS:
FittedSheets: 37e35f105c531f3845075f1788dd8517a35315c4
FittedSheets: 38ec85129bf5c970f99d4dba4fbf48185c5fa98a
KRActivityIndicatorView: ad69e89c4ce40c986cf580595be4829dcad0e35a
KRProgressHUD: a248f0bc6c9c2aed40a37b76e03ffecc7f85c887
MercariQRScanner: e5aea873969af59b09b4cc411fc1c5b6293dba44
NevisMobileAuthentication: 2acb327b1ec23d0d5cd17ff05392cad6405cf070
NevisMobileAuthentication-Debug: b8e3141e0e926a93488c7d92d7658b8ed388a2b7
NevisMobileAuthentication: c42744e752332068c6f7f2828dbbd713ebc18f14
NevisMobileAuthentication-Debug: 148684612cd8c5a40f782831aa36a98dc8230e90
Reusable: 6bae6a5e8aa793c9c441db0213c863a64bce9136
RxCocoa: 94f817b71c07517321eb4f9ad299112ca8af743b
RxRelay: 1de1523e604c72b6c68feadedd1af3b1b4d0ecbd
RxSwift: 5710a9e6b17f3c3d6e40d6e559b9fa1e813b2ef8
Swinject: 893c9a543000ac2f10ee4cbaf0933c6992c935d5
SwinjectAutoregistration: e3ee378dc458acf78d176fc7fec3902603452667
RxCocoa: 2d33c1e1e5d66492052ad46b11024ae287572880
RxRelay: 335c78b926a2aea8d863a6d25f1ed3b5ad8e8705
RxSwift: 4e28be97cbcfeee614af26d83415febbf2bf6f45
Swinject: a827d508c6270da03ec74e558e728917a888fa9b
SwinjectAutoregistration: a14d8ed61e88b0044a292958d63318b378375ca6
Then: 844265ae87834bbe1147d91d5d41a404da2ec27d

PODFILE CHECKSUM: 82765de564b192f42c19f42f614c141c44f080f8
PODFILE CHECKSUM: b077f59505557154fbcf3e6465c5df4b591ad5fb

COCOAPODS: 1.16.2
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Before you start compiling and using the example applications please ensure you
Your development setup has to meet the following prerequisites:

* iOS 12 or later
* Xcode 14.2, including Swift 5.7.2
* Xcode 15.4, including Swift 5.10

### Initialization

Expand Down

0 comments on commit bdbf633

Please sign in to comment.