diff --git a/.gitmodules b/.gitmodules index 2dbfda81..e74cdad3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,6 +10,3 @@ [submodule "Carthage/Checkouts/SVProgressHUD"] path = Carthage/Checkouts/SVProgressHUD url = https://github.com/SVProgressHUD/SVProgressHUD.git -[submodule "Carthage/Checkouts/SimulatorStatusMagic"] - path = Carthage/Checkouts/SimulatorStatusMagic - url = https://github.com/shinydevelopment/SimulatorStatusMagic.git diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..7921bd0c --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.4.8 diff --git a/.swiftlint.yml b/.swiftlint.yml index 0aa8e28e..1cb31b58 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -5,74 +5,64 @@ excluded: - Carthage - fastlane +opt_in_rules: + - all + analyzer_rules: - - unused_declaration - - unused_import + - all disabled_rules: - - for_where + - anonymous_argument_in_multiline_closure + - balanced_xctest_lifecycle + - contrasted_opening_brace + - direct_return # TODO: re-enable this rule + - discouraged_none_name # TODO: re-enable this rule + - discouraged_optional_collection + - explicit_acl + - explicit_self + - explicit_top_level_acl + - explicit_type_interface + - file_name + - file_types_order + - final_test_case # TODO: re-enable this rule + - for_where # TODO: re-enable this rule + - function_default_parameter_at_end - identifier_name + - indentation_width + - legacy_objc_type - line_length + - multiline_arguments # TODO: re-enable this rule + - multiline_arguments_brackets + - multiline_call_arguments # TODO: re-enable this rule + - multiline_parameters # TODO: re-enable this rule + - multiline_parameters_brackets + - no_empty_block # TODO: re-enable this rule + - no_extension_access_modifier + - no_grouping_extension + - no_magic_numbers + - non_overridable_class_declaration # TODO: re-enable this rule + - object_literal + - one_declaration_per_file + - prefer_condition_list # TODO: re-enable this rule + - prefer_key_path # TODO: re-enable this rule + - prefer_nimble + - prefer_self_in_static_references # TODO: re-enable this rule + - prefixed_toplevel_constant + - redundant_self # TODO: Consider re-enabling either this rule or `explicit_self` + - required_deinit + - return_value_from_void_function # TODO: re-enable this rule + - sorted_enum_cases + - sorted_imports + - superfluous_else + - test_case_accessibility # TODO: re-enable this rule - todo - -opt_in_rules: - - array_init - - attributes - - closure_body_length - - closure_end_indentation - - closure_spacing - - collection_alignment - - conditional_returns_on_newline - - contains_over_first_not_nil - - convenience_type - - discouraged_object_literal - - discouraged_optional_boolean - - empty_count - - empty_string - - empty_xctest_method - - explicit_enum_raw_value - - explicit_init - - extension_access_modifier - - fallthrough - - fatal_error_message - - file_header - - first_where - - force_unwrapping - - implicitly_unwrapped_optional - - joined_default_parameter - - last_where - - legacy_multiple - - legacy_random - - let_var_whitespace - - literal_expression_end_indentation - - lower_acl_than_parent - - modifier_order - - multiline_function_chains - - multiline_literal_brackets - - nslocalizedstring_key - - operator_usage_whitespace - - overridden_super_call - - override_in_extension - - pattern_matching_keywords - - private_action - - private_outlet - - prohibited_super_call - - reduce_into - - redundant_nil_coalescing - - single_test_class - - sorted_first_last - - static_operator - - strict_fileprivate - - switch_case_on_newline - - toggle_bool - - unavailable_function - - unowned_variable_capture - - untyped_error_in_catch - - vertical_parameter_alignment_on_call - - vertical_whitespace_closing_braces - - vertical_whitespace_opening_braces - - xct_specific_matcher - - yoda_condition + - trailing_closure + - type_contents_order + - unneeded_escaping # TODO: Consider re-enabling this rule + - unneeded_parentheses_in_closure_argument # TODO: Consider re-enabling this rule + - unused_declaration # False positives on protocol-confirming methods + - unused_parameter + - vertical_whitespace_between_cases cyclomatic_complexity: warning: 16 @@ -80,6 +70,10 @@ cyclomatic_complexity: function_body_length: warning: 55 +implicit_return: + included: + - closure + nesting: type_level: warning: 2 diff --git a/Authenticator.xcodeproj/project.pbxproj b/Authenticator.xcodeproj/project.pbxproj index e901888d..0ac250b1 100644 --- a/Authenticator.xcodeproj/project.pbxproj +++ b/Authenticator.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 54; + objectVersion = 90; objects = { /* Begin PBXBuildFile section */ @@ -39,7 +39,6 @@ C9A262D01E170BD4004E6CEB /* AuthenticatorScreenshots.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9A262CF1E170BD4004E6CEB /* AuthenticatorScreenshots.swift */; }; C9A262D81E170E3A004E6CEB /* SnapshotHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9A262D71E170E3A004E6CEB /* SnapshotHelper.swift */; }; C9A262DA1E176A18004E6CEB /* Demo.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9A262D91E176A18004E6CEB /* Demo.swift */; }; - C9A262DD1E177437004E6CEB /* SimulatorStatusMagiciOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9A262DC1E177437004E6CEB /* SimulatorStatusMagiciOS.framework */; }; C9AAB0791B9113BF000CE547 /* TokenFormModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9AAB0781B9113BF000CE547 /* TokenFormModels.swift */; }; C9AAB07F1B917EC3000CE547 /* TokenEditForm.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9AAB07E1B917EC3000CE547 /* TokenEditForm.swift */; }; C9B7328D1C09495D0076F77E /* TableDiff.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9B7328C1C09495D0076F77E /* TableDiff.swift */; }; @@ -92,16 +91,14 @@ /* Begin PBXCopyFilesBuildPhase section */ C944A5531A7ECA5000E08B1E /* Copy Frameworks */ = { isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; dstPath = ""; - dstSubfolderSpec = 10; + dstSubfolder = Frameworks; files = ( C944A5591A7ECB3100E08B1E /* Base32.framework in Copy Frameworks */, C944A5571A7ECB0800E08B1E /* OneTimePassword.framework in Copy Frameworks */, C97CDF261BEEA66A00D64406 /* SVProgressHUD.framework in Copy Frameworks */, ); name = "Copy Frameworks"; - runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ @@ -162,7 +159,6 @@ C9A262CF1E170BD4004E6CEB /* AuthenticatorScreenshots.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthenticatorScreenshots.swift; sourceTree = ""; }; C9A262D71E170E3A004E6CEB /* SnapshotHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SnapshotHelper.swift; path = fastlane/SnapshotHelper.swift; sourceTree = SOURCE_ROOT; }; C9A262D91E176A18004E6CEB /* Demo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Demo.swift; sourceTree = ""; }; - C9A262DC1E177437004E6CEB /* SimulatorStatusMagiciOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SimulatorStatusMagiciOS.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C9AAB0781B9113BF000CE547 /* TokenFormModels.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TokenFormModels.swift; sourceTree = ""; }; C9AAB07E1B917EC3000CE547 /* TokenEditForm.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TokenEditForm.swift; sourceTree = ""; }; C9B7328C1C09495D0076F77E /* TableDiff.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableDiff.swift; sourceTree = ""; }; @@ -200,25 +196,18 @@ /* Begin PBXFrameworksBuildPhase section */ 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; files = ( ); - runOnlyForDeploymentPostprocessing = 0; }; C9906A2B1812522100BAEF53 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; files = ( ); - runOnlyForDeploymentPostprocessing = 0; }; C9A262DB1E177431004E6CEB /* Frameworks */ = { isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; files = ( - C9A262DD1E177437004E6CEB /* SimulatorStatusMagiciOS.framework in Frameworks */, ); - runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ @@ -286,7 +275,6 @@ C944A5581A7ECB3100E08B1E /* Base32.framework */, C944A5561A7ECB0800E08B1E /* OneTimePassword.framework */, C97CDF241BEEA49300D64406 /* SVProgressHUD.framework */, - C9A262DC1E177437004E6CEB /* SimulatorStatusMagiciOS.framework */, ); name = Frameworks; sourceTree = ""; @@ -521,8 +509,6 @@ ); buildRules = ( ); - dependencies = ( - ); name = Authenticator; productName = Authenticator; productReference = 1D6058910D05DD3D006BFB54 /* Authenticator.app */; @@ -569,10 +555,11 @@ 29B97313FDCFA39411CA2CEA /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; CLASSPREFIX = OTP; LastSwiftMigration = 0700; LastSwiftUpdateCheck = 1000; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 2620; ORGANIZATIONNAME = "Matt Rubin"; TargetAttributes = { 1D6058900D05DD3D006BFB54 = { @@ -592,7 +579,6 @@ }; }; buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Authenticator" */; - compatibilityVersion = "Xcode 3.2"; developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( @@ -600,6 +586,7 @@ Base, ); mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + preferredProjectObjectVersion = 90; projectDirPath = ""; projectRoot = ""; targets = ( @@ -613,21 +600,17 @@ /* Begin PBXResourcesBuildPhase section */ 1D60588D0D05DD3D006BFB54 /* Resources */ = { isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; files = ( C9A1C1AC1E5021A6009E65D6 /* BackupInfo.html in Resources */, C9204A851E886A3500998D3E /* Acknowledgements.html in Resources */, C9BEAE6019C67FD800533385 /* LaunchScreen.xib in Resources */, C9C6CCA21842E331000100C2 /* Images.xcassets in Resources */, ); - runOnlyForDeploymentPostprocessing = 0; }; C9906A2C1812522100BAEF53 /* Resources */ = { isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; files = ( ); - runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ @@ -635,24 +618,23 @@ C910ADBF1BF00ABF00C988F5 /* Lint */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); name = Lint; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"SwiftLint does not exist, download from https://github.com/realm/SwiftLint\"\nfi\n"; + shellScript = ( + "if command -v swiftlint >/dev/null 2>&1", + "then", + " swiftlint", + "else", + " echo \"warning: `swiftlint` command not found - See https://github.com/realm/SwiftLint#installation for installation instructions.\"", + "fi", + "", + ); }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 1D60588E0D05DD3D006BFB54 /* Sources */ = { isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; files = ( C93AD15219CD51BE007480E9 /* Colors.swift in Sources */, C9CDD1D12096635300636056 /* DisplayOptionsViewController.swift in Sources */, @@ -698,11 +680,9 @@ C910ADC11BF0315A00C988F5 /* TokenList.swift in Sources */, C9919CDD1BA64EED006237C1 /* TokenEntryForm.swift in Sources */, ); - runOnlyForDeploymentPostprocessing = 0; }; C9906A2A1812522100BAEF53 /* Sources */ = { isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; files = ( C9C27228299946190067D723 /* ViewHierarchyHelpers.swift in Sources */, C9E3FB9C1E2860DD00EFA8BB /* TokenScannerTests.swift in Sources */, @@ -715,16 +695,13 @@ C9A1C1CE1E6CDBFB009E65D6 /* RootTests.swift in Sources */, CC46C4731DB3040300EB4605 /* TokenListTests.swift in Sources */, ); - runOnlyForDeploymentPostprocessing = 0; }; C9A262C91E170BD4004E6CEB /* Sources */ = { isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; files = ( C9A262D01E170BD4004E6CEB /* AuthenticatorScreenshots.swift in Sources */, C9A262D81E170E3A004E6CEB /* SnapshotHelper.swift in Sources */, ); - runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ @@ -742,14 +719,16 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { + 1D6058940D05DD3E006BFB54 /* Debug configuration for PBXNativeTarget "Authenticator" */ = { isa = XCBuildConfiguration; baseConfigurationReference = C944A5731A7F772600E08B1E /* iOS-Application.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; BUNDLE_DISPLAY_NAME = "${PRODUCT_NAME} ∆"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = WD7ETSN9J9; + ENABLE_USER_SCRIPT_SANDBOXING = NO; INFOPLIST_FILE = Authenticator/Resources/Info.plist; PRODUCT_BUNDLE_IDENTIFIER = me.mattrubin.authenticator.dev; PRODUCT_NAME = Authenticator; @@ -759,14 +738,16 @@ }; name = Debug; }; - 1D6058950D05DD3E006BFB54 /* Release */ = { + 1D6058950D05DD3E006BFB54 /* Release configuration for PBXNativeTarget "Authenticator" */ = { isa = XCBuildConfiguration; baseConfigurationReference = C944A5731A7F772600E08B1E /* iOS-Application.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; BUNDLE_DISPLAY_NAME = "${PRODUCT_NAME}"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + DEAD_CODE_STRIPPING = YES; DEVELOPMENT_TEAM = WD7ETSN9J9; + ENABLE_USER_SCRIPT_SANDBOXING = NO; INFOPLIST_FILE = Authenticator/Resources/Info.plist; PRODUCT_BUNDLE_IDENTIFIER = me.mattrubin.authenticator; PRODUCT_NAME = Authenticator; @@ -776,80 +757,90 @@ }; name = Release; }; - C01FCF4F08A954540054247B /* Debug */ = { + C01FCF4F08A954540054247B /* Debug configuration for PBXProject "Authenticator" */ = { isa = XCBuildConfiguration; baseConfigurationReference = C944A56A1A7F772600E08B1E /* Debug.xcconfig */; buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_MODULES_AUTOLINK = YES; CURRENT_PROJECT_VERSION = 0; + DEAD_CODE_STRIPPING = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(BUILT_PRODUCTS_DIR)", ); GCC_DYNAMIC_NO_PIC = NO; IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 2023.1; + MARKETING_VERSION = 2.1.3; + STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_VERSION = 5.0; }; name = Debug; }; - C01FCF5008A954540054247B /* Release */ = { + C01FCF5008A954540054247B /* Release configuration for PBXProject "Authenticator" */ = { isa = XCBuildConfiguration; baseConfigurationReference = C944A56C1A7F772600E08B1E /* Release.xcconfig */; buildSettings = { + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_MODULES_AUTOLINK = YES; CURRENT_PROJECT_VERSION = 0; + DEAD_CODE_STRIPPING = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(BUILT_PRODUCTS_DIR)", ); GCC_DYNAMIC_NO_PIC = NO; IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MARKETING_VERSION = 2023.1; + MARKETING_VERSION = 2.1.3; + STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_VERSION = 5.0; }; name = Release; }; - C9906A3E1812522100BAEF53 /* Debug */ = { + C9906A3E1812522100BAEF53 /* Debug configuration for PBXNativeTarget "AuthenticatorTests" */ = { isa = XCBuildConfiguration; baseConfigurationReference = C944A5731A7F772600E08B1E /* iOS-Application.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Authenticator.app/Authenticator"; + DEAD_CODE_STRIPPING = YES; INFOPLIST_FILE = AuthenticatorTests/Info.plist; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUNDLE_LOADER)"; }; name = Debug; }; - C9906A3F1812522100BAEF53 /* Release */ = { + C9906A3F1812522100BAEF53 /* Release configuration for PBXNativeTarget "AuthenticatorTests" */ = { isa = XCBuildConfiguration; baseConfigurationReference = C944A5731A7F772600E08B1E /* iOS-Application.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Authenticator.app/Authenticator"; + DEAD_CODE_STRIPPING = YES; INFOPLIST_FILE = AuthenticatorTests/Info.plist; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUNDLE_LOADER)"; }; name = Release; }; - C9A262D41E170BD4004E6CEB /* Debug */ = { + C9A262D41E170BD4004E6CEB /* Debug configuration for PBXNativeTarget "AuthenticatorScreenshots" */ = { isa = XCBuildConfiguration; baseConfigurationReference = C944A5731A7F772600E08B1E /* iOS-Application.xcconfig */; buildSettings = { + DEAD_CODE_STRIPPING = YES; INFOPLIST_FILE = AuthenticatorScreenshots/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; PRODUCT_BUNDLE_IDENTIFIER = me.mattrubin.authenticator.screenshots; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_TARGET_NAME = Authenticator; }; name = Debug; }; - C9A262D51E170BD4004E6CEB /* Release */ = { + C9A262D51E170BD4004E6CEB /* Release configuration for PBXNativeTarget "AuthenticatorScreenshots" */ = { isa = XCBuildConfiguration; baseConfigurationReference = C944A5731A7F772600E08B1E /* iOS-Application.xcconfig */; buildSettings = { + DEAD_CODE_STRIPPING = YES; INFOPLIST_FILE = AuthenticatorScreenshots/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; PRODUCT_BUNDLE_IDENTIFIER = me.mattrubin.authenticator.screenshots; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_TARGET_NAME = Authenticator; @@ -862,37 +853,33 @@ 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Authenticator" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, + 1D6058940D05DD3E006BFB54 /* Debug configuration for PBXNativeTarget "Authenticator" */, + 1D6058950D05DD3E006BFB54 /* Release configuration for PBXNativeTarget "Authenticator" */, ); - defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Authenticator" */ = { isa = XCConfigurationList; buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, + C01FCF4F08A954540054247B /* Debug configuration for PBXProject "Authenticator" */, + C01FCF5008A954540054247B /* Release configuration for PBXProject "Authenticator" */, ); - defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; C9906A401812522200BAEF53 /* Build configuration list for PBXNativeTarget "AuthenticatorTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - C9906A3E1812522100BAEF53 /* Debug */, - C9906A3F1812522100BAEF53 /* Release */, + C9906A3E1812522100BAEF53 /* Debug configuration for PBXNativeTarget "AuthenticatorTests" */, + C9906A3F1812522100BAEF53 /* Release configuration for PBXNativeTarget "AuthenticatorTests" */, ); - defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; C9A262D61E170BD4004E6CEB /* Build configuration list for PBXNativeTarget "AuthenticatorScreenshots" */ = { isa = XCConfigurationList; buildConfigurations = ( - C9A262D41E170BD4004E6CEB /* Debug */, - C9A262D51E170BD4004E6CEB /* Release */, + C9A262D41E170BD4004E6CEB /* Debug configuration for PBXNativeTarget "AuthenticatorScreenshots" */, + C9A262D51E170BD4004E6CEB /* Release configuration for PBXNativeTarget "AuthenticatorScreenshots" */, ); - defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ diff --git a/Authenticator.xcodeproj/xcshareddata/xcschemes/Authenticator Demo.xcscheme b/Authenticator.xcodeproj/xcshareddata/xcschemes/Authenticator Demo.xcscheme index 82f8c0db..cdc9142f 100644 --- a/Authenticator.xcodeproj/xcshareddata/xcschemes/Authenticator Demo.xcscheme +++ b/Authenticator.xcodeproj/xcshareddata/xcschemes/Authenticator Demo.xcscheme @@ -1,6 +1,6 @@ - - diff --git a/Authenticator/Resources/Info.plist b/Authenticator/Resources/Info.plist index 367dc308..12771340 100644 --- a/Authenticator/Resources/Info.plist +++ b/Authenticator/Resources/Info.plist @@ -37,6 +37,8 @@ LSRequiresIPhoneOS + UIDesignRequiresCompatibility + NSCameraUsageDescription Authenticator can import tokens by scanning QR codes. UILaunchStoryboardName diff --git a/Authenticator/Source/Section.swift b/Authenticator/Source/Section.swift index d8e72b6e..b84fdb2e 100644 --- a/Authenticator/Source/Section.swift +++ b/Authenticator/Source/Section.swift @@ -2,7 +2,7 @@ // Section.swift // Authenticator // -// Copyright (c) 2015-2017 Authenticator authors +// Copyright (c) 2015-2026 Authenticator authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,8 +23,6 @@ // SOFTWARE. // -import UIKit - struct Section { let header: HeaderModel? let rows: [RowModel] diff --git a/Authenticator/Source/TableDiff.swift b/Authenticator/Source/TableDiff.swift index eb77fc0e..91e038eb 100644 --- a/Authenticator/Source/TableDiff.swift +++ b/Authenticator/Source/TableDiff.swift @@ -2,7 +2,7 @@ // TableDiff.swift // Authenticator // -// Copyright (c) 2015-2017 Authenticator authors +// Copyright (c) 2015-2026 Authenticator authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,8 +23,6 @@ // SOFTWARE. // -import Foundation - protocol Identifiable { func hasSameIdentity(as other: Self) -> Bool } diff --git a/Authenticator/Source/TokenEntryForm.swift b/Authenticator/Source/TokenEntryForm.swift index bc952ef8..7c0cd162 100644 --- a/Authenticator/Source/TokenEntryForm.swift +++ b/Authenticator/Source/TokenEntryForm.swift @@ -2,7 +2,7 @@ // TokenEntryForm.swift // Authenticator // -// Copyright (c) 2015-2023 Authenticator authors +// Copyright (c) 2015-2026 Authenticator authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,7 +23,6 @@ // SOFTWARE. // -import Foundation import OneTimePassword import Base32 diff --git a/Authenticator/Source/TokenList.swift b/Authenticator/Source/TokenList.swift index 55e50417..095f9c62 100644 --- a/Authenticator/Source/TokenList.swift +++ b/Authenticator/Source/TokenList.swift @@ -2,7 +2,7 @@ // TokenList.swift // Authenticator // -// Copyright (c) 2015-2019 Authenticator authors +// Copyright (c) 2015-2026 Authenticator authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -25,7 +25,7 @@ import Foundation import UIKit -import MobileCoreServices +import MobileCoreServices // swiftlint:disable:this unused_import import OneTimePassword struct TokenList: Component { diff --git a/Authenticator/Source/TokenListViewModel.swift b/Authenticator/Source/TokenListViewModel.swift index 0c84be05..1debeb96 100644 --- a/Authenticator/Source/TokenListViewModel.swift +++ b/Authenticator/Source/TokenListViewModel.swift @@ -2,7 +2,7 @@ // TokenListViewModel.swift // Authenticator // -// Copyright (c) 2015-2017 Authenticator authors +// Copyright (c) 2015-2026 Authenticator authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -23,8 +23,6 @@ // SOFTWARE. // -import Foundation - struct TokenListViewModel { let rowModels: [TokenRowModel] let progressRingViewModel: ProgressRingViewModel? diff --git a/Authenticator/Source/TokenScannerViewController.swift b/Authenticator/Source/TokenScannerViewController.swift index d799d482..229ddf73 100644 --- a/Authenticator/Source/TokenScannerViewController.swift +++ b/Authenticator/Source/TokenScannerViewController.swift @@ -2,7 +2,7 @@ // TokenScannerViewController.swift // Authenticator // -// Copyright (c) 2013-2023 Authenticator authors +// Copyright (c) 2013-2026 Authenticator authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -25,7 +25,6 @@ import UIKit import AVFoundation -import OneTimePassword final class TokenScannerViewController: UIViewController, QRScannerDelegate { private let scanner = QRScanner() diff --git a/AuthenticatorScreenshots/AuthenticatorScreenshots.swift b/AuthenticatorScreenshots/AuthenticatorScreenshots.swift index a1c095e0..f423bde2 100644 --- a/AuthenticatorScreenshots/AuthenticatorScreenshots.swift +++ b/AuthenticatorScreenshots/AuthenticatorScreenshots.swift @@ -2,7 +2,7 @@ // AuthenticatorScreenshots.swift // Authenticator // -// Copyright (c) 2016-2023 Authenticator authors +// Copyright (c) 2016-2026 Authenticator authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -24,15 +24,9 @@ // import XCTest -import SimulatorStatusMagiciOS +@MainActor class AuthenticatorScreenshots: XCTestCase { - override class func setUp() { - super.setUp() - SDStatusBarManager.sharedInstance().batteryDetailEnabled = false - SDStatusBarManager.sharedInstance().enableOverrides() - } - override func setUp() { super.setUp() continueAfterFailure = false @@ -45,11 +39,6 @@ class AuthenticatorScreenshots: XCTestCase { app.launch() } - override class func tearDown() { - SDStatusBarManager.sharedInstance().disableOverrides() - super.tearDown() - } - func testScreenshots() { let app = XCUIApplication() diff --git a/AuthenticatorTests/RootTests.swift b/AuthenticatorTests/RootTests.swift index a88d468b..e6619702 100644 --- a/AuthenticatorTests/RootTests.swift +++ b/AuthenticatorTests/RootTests.swift @@ -2,7 +2,7 @@ // RootTests.swift // Authenticator // -// Copyright (c) 2017-2023 Authenticator authors +// Copyright (c) 2017-2026 Authenticator authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -59,7 +59,7 @@ class RootTests: XCTestCase { case .menu(let menu): switch menu.child { case .info(let infoViewModel): - XCTAssert(infoViewModel.title == "Backups") + XCTAssertEqual(infoViewModel.title, "Backups") default: XCTFail("Expected Backups .info, got \(menu.child)") } @@ -131,7 +131,7 @@ class RootTests: XCTestCase { case .menu(let menu): switch menu.child { case .info(let infoViewModel): - XCTAssert(infoViewModel.title == "Acknowledgements") + XCTAssertEqual(infoViewModel.title, "Acknowledgements") default: XCTFail("Expected Acknowledgements .info, got \(menu.child)") } diff --git a/AuthenticatorTests/TableDiffTests.swift b/AuthenticatorTests/TableDiffTests.swift index 5a3bd64a..fc8bcb70 100644 --- a/AuthenticatorTests/TableDiffTests.swift +++ b/AuthenticatorTests/TableDiffTests.swift @@ -2,7 +2,7 @@ // TableDiffTests.swift // Authenticator // -// Copyright (c) 2016-2023 Authenticator authors +// Copyright (c) 2016-2026 Authenticator authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -31,12 +31,10 @@ class TableDiffTests: XCTestCase { private let defaultDigitGroupSize = 2 func testNoChanges() throws { - // swiftlint:disable force_unwrapping let generator = try Generator(factor: .timer(period: 60), - secret: "secret".data(using: String.Encoding.utf8)!, + secret: Data("secret".utf8), algorithm: .sha256, digits: 6) - // swiftlint:enable force_unwrapping let token = Token(name: "Token Name", issuer: "Token Issuer", generator: generator) diff --git a/AuthenticatorTests/TokenListTests.swift b/AuthenticatorTests/TokenListTests.swift index 4cd1e315..bfa3f0cb 100644 --- a/AuthenticatorTests/TokenListTests.swift +++ b/AuthenticatorTests/TokenListTests.swift @@ -2,7 +2,7 @@ // TokenListTests.swift // Authenticator // -// Copyright (c) 2016-2023 Authenticator authors +// Copyright (c) 2016-2026 Authenticator authors // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -102,51 +102,51 @@ class TokenListTests: XCTestCase { let persistentTokenB = mockPersistentToken(name: "Something", issuer: "Else") // BeginAddToken - XCTAssert(TokenList.Action.beginAddToken == .beginAddToken) - XCTAssert(TokenList.Action.beginAddToken != .clearFilter) + XCTAssertEqual(TokenList.Action.beginAddToken, .beginAddToken) + XCTAssertNotEqual(TokenList.Action.beginAddToken, .clearFilter) // EditPersistentToken(PersistentToken) - XCTAssert(TokenList.Action.editPersistentToken(persistentTokenA) == .editPersistentToken(persistentTokenA)) - XCTAssert(TokenList.Action.editPersistentToken(persistentTokenA) != .editPersistentToken(persistentTokenB)) - XCTAssert(TokenList.Action.editPersistentToken(persistentTokenA) != .beginAddToken) + XCTAssertEqual(TokenList.Action.editPersistentToken(persistentTokenA), .editPersistentToken(persistentTokenA)) + XCTAssertNotEqual(TokenList.Action.editPersistentToken(persistentTokenA), .editPersistentToken(persistentTokenB)) + XCTAssertNotEqual(TokenList.Action.editPersistentToken(persistentTokenA), .beginAddToken) // UpdatePersistentToken(PersistentToken) - XCTAssert(TokenList.Action.updatePersistentToken(persistentTokenA) == .updatePersistentToken(persistentTokenA)) - XCTAssert(TokenList.Action.updatePersistentToken(persistentTokenA) != .updatePersistentToken(persistentTokenB)) - XCTAssert(TokenList.Action.updatePersistentToken(persistentTokenA) != .beginAddToken) + XCTAssertEqual(TokenList.Action.updatePersistentToken(persistentTokenA), .updatePersistentToken(persistentTokenA)) + XCTAssertNotEqual(TokenList.Action.updatePersistentToken(persistentTokenA), .updatePersistentToken(persistentTokenB)) + XCTAssertNotEqual(TokenList.Action.updatePersistentToken(persistentTokenA), .beginAddToken) // MoveToken(fromIndex: Int, toIndex: Int) - XCTAssert(TokenList.Action.moveToken(fromIndex: 0, toIndex: 1) == .moveToken(fromIndex: 0, toIndex: 1)) - XCTAssert(TokenList.Action.moveToken(fromIndex: 0, toIndex: 1) != .moveToken(fromIndex: 0, toIndex: 2)) - XCTAssert(TokenList.Action.moveToken(fromIndex: 2, toIndex: 1) != .moveToken(fromIndex: 0, toIndex: 1)) - XCTAssert(TokenList.Action.moveToken(fromIndex: 0, toIndex: 1) != .beginAddToken) + XCTAssertEqual(TokenList.Action.moveToken(fromIndex: 0, toIndex: 1), .moveToken(fromIndex: 0, toIndex: 1)) + XCTAssertNotEqual(TokenList.Action.moveToken(fromIndex: 0, toIndex: 1), .moveToken(fromIndex: 0, toIndex: 2)) + XCTAssertNotEqual(TokenList.Action.moveToken(fromIndex: 2, toIndex: 1), .moveToken(fromIndex: 0, toIndex: 1)) + XCTAssertNotEqual(TokenList.Action.moveToken(fromIndex: 0, toIndex: 1), .beginAddToken) // DeletePersistentToken(PersistentToken) - XCTAssert(TokenList.Action.deletePersistentToken(persistentTokenA) == .deletePersistentToken(persistentTokenA)) - XCTAssert(TokenList.Action.deletePersistentToken(persistentTokenA) != .deletePersistentToken(persistentTokenB)) - XCTAssert(TokenList.Action.deletePersistentToken(persistentTokenA) != .beginAddToken) + XCTAssertEqual(TokenList.Action.deletePersistentToken(persistentTokenA), .deletePersistentToken(persistentTokenA)) + XCTAssertNotEqual(TokenList.Action.deletePersistentToken(persistentTokenA), .deletePersistentToken(persistentTokenB)) + XCTAssertNotEqual(TokenList.Action.deletePersistentToken(persistentTokenA), .beginAddToken) // CopyPassword(String) - XCTAssert(TokenList.Action.copyPassword("123") == .copyPassword("123")) - XCTAssert(TokenList.Action.copyPassword("123") != .copyPassword("456")) - XCTAssert(TokenList.Action.copyPassword("123") != .beginAddToken) + XCTAssertEqual(TokenList.Action.copyPassword("123"), .copyPassword("123")) + XCTAssertNotEqual(TokenList.Action.copyPassword("123"), .copyPassword("456")) + XCTAssertNotEqual(TokenList.Action.copyPassword("123"), .beginAddToken) // Filter(String) - XCTAssert(TokenList.Action.filter("ABC") == .filter("ABC")) - XCTAssert(TokenList.Action.filter("ABC") != .filter("XYZ")) - XCTAssert(TokenList.Action.filter("ABC") != .beginAddToken) + XCTAssertEqual(TokenList.Action.filter("ABC"), .filter("ABC")) + XCTAssertNotEqual(TokenList.Action.filter("ABC"), .filter("XYZ")) + XCTAssertNotEqual(TokenList.Action.filter("ABC"), .beginAddToken) // ClearFilter - XCTAssert(TokenList.Action.clearFilter == .clearFilter) - XCTAssert(TokenList.Action.clearFilter != .showBackupInfo) + XCTAssertEqual(TokenList.Action.clearFilter, .clearFilter) + XCTAssertNotEqual(TokenList.Action.clearFilter, .showBackupInfo) // ShowBackupInfo - XCTAssert(TokenList.Action.showBackupInfo == .showBackupInfo) - XCTAssert(TokenList.Action.showBackupInfo != .beginAddToken) + XCTAssertEqual(TokenList.Action.showBackupInfo, .showBackupInfo) + XCTAssertNotEqual(TokenList.Action.showBackupInfo, .beginAddToken) // ShowLicenseInfo - XCTAssert(TokenList.Action.showInfo == .showInfo) - XCTAssert(TokenList.Action.showInfo != .beginAddToken) + XCTAssertEqual(TokenList.Action.showInfo, .showInfo) + XCTAssertNotEqual(TokenList.Action.showInfo, .beginAddToken) } } diff --git a/Cartfile.private b/Cartfile.private index 383a17e6..8ecd2070 100644 --- a/Cartfile.private +++ b/Cartfile.private @@ -1,4 +1,3 @@ # Configuration for Carthage (https://github.com/Carthage/Carthage) github "xcconfigs/xcconfigs" ~> 1.1 -github "shinydevelopment/SimulatorStatusMagic" diff --git a/Cartfile.resolved b/Cartfile.resolved index 2fe28158..75c2b6fe 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,5 +1,4 @@ -github "SVProgressHUD/SVProgressHUD" "2.2.5" +github "SVProgressHUD/SVProgressHUD" "2.3.1" github "mattrubin/Base32" "1.2.0" github "mattrubin/OneTimePassword" "4.0.0-pre.0" -github "shinydevelopment/SimulatorStatusMagic" "2.7" github "xcconfigs/xcconfigs" "1.1" diff --git a/Carthage/Checkouts/SVProgressHUD b/Carthage/Checkouts/SVProgressHUD index 61c1f02c..c33f7c77 160000 --- a/Carthage/Checkouts/SVProgressHUD +++ b/Carthage/Checkouts/SVProgressHUD @@ -1 +1 @@ -Subproject commit 61c1f02c2587831cebca094bed6f228ed8c314b0 +Subproject commit c33f7c775ba7feea6047a1fc3257f2e5863b44f7 diff --git a/Carthage/Checkouts/SimulatorStatusMagic b/Carthage/Checkouts/SimulatorStatusMagic deleted file mode 160000 index 76095ec8..00000000 --- a/Carthage/Checkouts/SimulatorStatusMagic +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 76095ec820674457a11dc3cc621d8a5c369eea0e diff --git a/Gemfile b/Gemfile index 92b4018b..2bd30296 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,3 @@ source "https://rubygems.org" -gem "fastlane", "~> 2.181" +gem "fastlane", "~> 2" diff --git a/Gemfile.lock b/Gemfile.lock index 3d607a4f..46abae83 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,43 +1,48 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.6) - rexml - addressable (2.8.1) - public_suffix (>= 2.0.2, < 6.0) - artifactory (3.0.15) + CFPropertyList (3.0.8) + abbrev (0.1.2) + addressable (2.8.8) + public_suffix (>= 2.0.2, < 8.0) + artifactory (3.0.17) atomos (0.1.3) - aws-eventstream (1.2.0) - aws-partitions (1.710.0) - aws-sdk-core (3.170.0) - aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.651.0) - aws-sigv4 (~> 1.5) + aws-eventstream (1.4.0) + aws-partitions (1.1200.0) + aws-sdk-core (3.240.0) + aws-eventstream (~> 1, >= 1.3.0) + aws-partitions (~> 1, >= 1.992.0) + aws-sigv4 (~> 1.9) + base64 + bigdecimal jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.62.0) - aws-sdk-core (~> 3, >= 3.165.0) - aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.119.0) - aws-sdk-core (~> 3, >= 3.165.0) + logger + aws-sdk-kms (1.118.0) + aws-sdk-core (~> 3, >= 3.239.1) + aws-sigv4 (~> 1.5) + aws-sdk-s3 (1.209.0) + aws-sdk-core (~> 3, >= 3.234.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.4) - aws-sigv4 (1.5.2) + aws-sigv4 (~> 1.5) + aws-sigv4 (1.12.1) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) + base64 (0.2.0) + bigdecimal (4.0.1) claide (1.1.0) colored (1.2) colored2 (3.1.2) commander (4.6.0) highline (~> 2.0.0) + csv (3.3.5) declarative (0.0.20) - digest-crc (0.6.4) + digest-crc (0.7.0) rake (>= 12.0.0, < 14.0.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) + domain_name (0.6.20240107) dotenv (2.8.1) emoji_regex (3.2.3) - excon (0.99.0) - faraday (1.10.3) + excon (0.112.0) + faraday (1.10.4) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -49,32 +54,35 @@ GEM faraday-rack (~> 1.0) faraday-retry (~> 1.0) ruby2_keywords (>= 0.0.4) - faraday-cookie_jar (0.0.7) + faraday-cookie_jar (0.0.8) faraday (>= 0.8.0) - http-cookie (~> 1.0.0) + http-cookie (>= 1.0.0) faraday-em_http (1.0.0) - faraday-em_synchrony (1.0.0) + faraday-em_synchrony (1.0.1) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.0.4) - multipart-post (~> 2) - faraday-net_http (1.0.1) + faraday-multipart (1.2.0) + multipart-post (~> 2.0) + faraday-net_http (1.0.2) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) faraday-rack (1.0.0) faraday-retry (1.0.3) - faraday_middleware (1.2.0) + faraday_middleware (1.2.1) faraday (~> 1.0) - fastimage (2.2.6) - fastlane (2.211.0) + fastimage (2.4.0) + fastlane (2.230.0) CFPropertyList (>= 2.3, < 4.0.0) + abbrev (~> 0.1.2) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) aws-sdk-s3 (~> 1.0) babosa (>= 1.0.3, < 2.0.0) + base64 (~> 0.2.0) bundler (>= 1.12.0, < 3.0.0) - colored + colored (~> 1.2) commander (~> 4.6) + csv (~> 3.3) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) excon (>= 0.71.0, < 1.0.0) @@ -82,33 +90,41 @@ GEM faraday-cookie_jar (~> 0.0.6) faraday_middleware (~> 1.0) fastimage (>= 2.1.0, < 3.0.0) + fastlane-sirp (>= 1.0.0) gh_inspector (>= 1.1.2, < 2.0.0) google-apis-androidpublisher_v3 (~> 0.3) google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-env (>= 1.6.0, < 2.0.0) google-cloud-storage (~> 1.31) highline (~> 2.0) + http-cookie (~> 1.0.5) json (< 3.0.0) jwt (>= 2.1.0, < 3) + logger (>= 1.6, < 2.0) mini_magick (>= 4.9.4, < 5.0.0) - multipart-post (~> 2.0.0) + multipart-post (>= 2.0.0, < 3.0.0) + mutex_m (~> 0.3.0) naturally (~> 2.2) - optparse (~> 0.1.1) + nkf (~> 0.2.0) + optparse (>= 0.1.1, < 1.0.0) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) - security (= 0.1.3) + security (= 0.1.5) simctl (~> 1.6.3) terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (>= 1.4.5, < 2.0.0) + terminal-table (~> 3) tty-screen (>= 0.6.3, < 1.0.0) tty-spinner (>= 0.8.0, < 1.0.0) word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) - xcpretty (~> 0.3.0) - xcpretty-travis-formatter (>= 0.0.3) + xcpretty (~> 0.4.1) + xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) + fastlane-sirp (1.0.0) + sysrandom (~> 1.0) gh_inspector (1.1.3) - google-apis-androidpublisher_v3 (0.33.0) - google-apis-core (>= 0.9.1, < 2.a) - google-apis-core (0.11.0) + google-apis-androidpublisher_v3 (0.54.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-core (0.11.3) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -116,95 +132,94 @@ GEM representable (~> 3.0) retriable (>= 2.0, < 4.a) rexml - webrick - google-apis-iamcredentials_v1 (0.16.0) - google-apis-core (>= 0.9.1, < 2.a) - google-apis-playcustomapp_v1 (0.12.0) - google-apis-core (>= 0.9.1, < 2.a) - google-apis-storage_v1 (0.19.0) - google-apis-core (>= 0.9.0, < 2.a) - google-cloud-core (1.6.0) - google-cloud-env (~> 1.0) + google-apis-iamcredentials_v1 (0.17.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-playcustomapp_v1 (0.13.0) + 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-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.3.0) - google-cloud-storage (1.44.0) + google-cloud-errors (1.5.0) + google-cloud-storage (1.47.0) addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.19.0) + google-apis-storage_v1 (~> 0.31.0) google-cloud-core (~> 1.6) googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (1.3.0) + googleauth (1.8.1) faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) - memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) highline (2.0.3) - http-cookie (1.0.5) + http-cookie (1.0.8) domain_name (~> 0.5) - httpclient (2.8.3) + httpclient (2.9.0) + mutex_m jmespath (1.6.2) - json (2.6.3) - jwt (2.7.0) - memoist (0.16.2) - mini_magick (4.12.0) - mini_mime (1.1.2) - multi_json (1.15.0) - multipart-post (2.0.0) - nanaimo (0.3.0) - naturally (2.2.1) - optparse (0.1.1) + json (2.18.0) + jwt (2.10.2) + base64 + logger (1.7.0) + mini_magick (4.13.2) + mini_mime (1.1.5) + multi_json (1.19.1) + multipart-post (2.4.1) + mutex_m (0.3.0) + nanaimo (0.4.0) + naturally (2.3.0) + nkf (0.2.0) + optparse (0.8.1) os (1.1.4) - plist (3.6.0) - public_suffix (5.0.1) - rake (13.0.6) + plist (3.7.2) + public_suffix (7.0.1) + rake (13.3.1) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) retriable (3.1.2) - rexml (3.2.5) - rouge (2.0.7) + rexml (3.4.4) + rouge (3.28.0) ruby2_keywords (0.0.5) - rubyzip (2.3.2) - security (0.1.3) - signet (0.17.0) + rubyzip (2.4.1) + security (0.1.5) + signet (0.21.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) - jwt (>= 1.5, < 3.0) + jwt (>= 1.5, < 4.0) multi_json (~> 1.10) simctl (1.6.10) CFPropertyList naturally + sysrandom (1.0.5) terminal-notifier (2.0.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) trailblazer-option (0.1.2) tty-cursor (0.7.1) - tty-screen (0.8.1) + tty-screen (0.8.2) tty-spinner (0.9.3) tty-cursor (~> 0.7) uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.8.2) - unicode-display_width (1.8.0) - webrick (1.8.1) + unicode-display_width (2.6.0) word_wrap (1.0.0) - xcodeproj (1.22.0) + xcodeproj (1.27.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) - nanaimo (~> 0.3.0) - rexml (~> 3.2.4) - xcpretty (0.3.0) - rouge (~> 2.0.7) + nanaimo (~> 0.4.0) + rexml (>= 3.3.6, < 4.0) + xcpretty (0.4.1) + rouge (~> 3.28.0) xcpretty-travis-formatter (1.0.1) xcpretty (~> 0.2, >= 0.0.7) @@ -212,7 +227,7 @@ PLATFORMS ruby DEPENDENCIES - fastlane (~> 2.181) + fastlane (~> 2) BUNDLED WITH - 2.1.4 + 2.7.2 diff --git a/fastlane/Snapfile b/fastlane/Snapfile index 032a0acd..cec9414c 100644 --- a/fastlane/Snapfile +++ b/fastlane/Snapfile @@ -4,16 +4,21 @@ workspace "Authenticator.xcworkspace" scheme "Authenticator Demo" devices([ - "iPhone SE (1st generation)", - "iPhone 8", - "iPhone 8 Plus", - "iPhone Xs", - "iPhone Xs Max", + "iPhone 16e", + "iPhone 17", # Same screen dimensions as "iPhone 17 Pro" + "iPhone 17 Pro Max", + "iPhone Air", ]) languages([ "en-US", ]) +override_status_bar(true) +override_status_bar_arguments( + # Workaround for https://github.com/fastlane/fastlane/issues/21255 + "--time 9:41 --dataNetwork wifi --wifiMode active --wifiBars 3 --cellularMode active --cellularBars 4 --operatorName '' --batteryState discharging --batteryLevel 100" +) + clear_previous_screenshots true skip_open_summary true diff --git a/fastlane/SnapshotHelper.swift b/fastlane/SnapshotHelper.swift index da063ba1..6dec1302 100644 --- a/fastlane/SnapshotHelper.swift +++ b/fastlane/SnapshotHelper.swift @@ -15,13 +15,12 @@ import Foundation import XCTest -var deviceLanguage = "" -var locale = "" - +@MainActor func setupSnapshot(_ app: XCUIApplication, waitForAnimations: Bool = true) { Snapshot.setupSnapshot(app, waitForAnimations: waitForAnimations) } +@MainActor func snapshot(_ name: String, waitForLoadingIndicator: Bool) { if waitForLoadingIndicator { Snapshot.snapshot(name) @@ -33,6 +32,7 @@ func snapshot(_ name: String, waitForLoadingIndicator: Bool) { /// - Parameters: /// - name: The name of the snapshot /// - timeout: Amount of seconds to wait until the network loading indicator disappears. Pass `0` if you don't want to wait. +@MainActor func snapshot(_ name: String, timeWaitingForIdle timeout: TimeInterval = 20) { Snapshot.snapshot(name, timeWaitingForIdle: timeout) } @@ -52,6 +52,7 @@ enum SnapshotError: Error, CustomDebugStringConvertible { } @objcMembers +@MainActor open class Snapshot: NSObject { static var app: XCUIApplication? static var waitForAnimations = true @@ -59,6 +60,8 @@ open class Snapshot: NSObject { static var screenshotsDirectory: URL? { return cacheDirectory?.appendingPathComponent("screenshots", isDirectory: true) } + static var deviceLanguage = "" + static var currentLocale = "" open class func setupSnapshot(_ app: XCUIApplication, waitForAnimations: Bool = true) { @@ -103,17 +106,17 @@ open class Snapshot: NSObject { do { let trimCharacterSet = CharacterSet.whitespacesAndNewlines - locale = try String(contentsOf: path, encoding: .utf8).trimmingCharacters(in: trimCharacterSet) + currentLocale = try String(contentsOf: path, encoding: .utf8).trimmingCharacters(in: trimCharacterSet) } catch { NSLog("Couldn't detect/set locale...") } - if locale.isEmpty && !deviceLanguage.isEmpty { - locale = Locale(identifier: deviceLanguage).identifier + if currentLocale.isEmpty && !deviceLanguage.isEmpty { + currentLocale = Locale(identifier: deviceLanguage).identifier } - if !locale.isEmpty { - app.launchArguments += ["-AppleLocale", "\"\(locale)\""] + if !currentLocale.isEmpty { + app.launchArguments += ["-AppleLocale", "\"\(currentLocale)\""] } } @@ -281,6 +284,7 @@ private extension XCUIElementQuery { return self.containing(isNetworkLoadingIndicator) } + @MainActor var deviceStatusBars: XCUIElementQuery { guard let app = Snapshot.app else { fatalError("XCUIApplication is not set. Please call setupSnapshot(app) before snapshot().") @@ -306,4 +310,4 @@ private extension CGFloat { // Please don't remove the lines below // They are used to detect outdated configuration files -// SnapshotHelperVersion [1.29] +// SnapshotHelperVersion [1.30] diff --git a/fastlane/screenshots/en-US/iPhone 16e-0-TokenList.png b/fastlane/screenshots/en-US/iPhone 16e-0-TokenList.png new file mode 100644 index 00000000..01a73d3b Binary files /dev/null and b/fastlane/screenshots/en-US/iPhone 16e-0-TokenList.png differ diff --git a/fastlane/screenshots/en-US/iPhone 16e-1-ScanToken.png b/fastlane/screenshots/en-US/iPhone 16e-1-ScanToken.png new file mode 100644 index 00000000..6efc8e86 Binary files /dev/null and b/fastlane/screenshots/en-US/iPhone 16e-1-ScanToken.png differ diff --git a/fastlane/screenshots/en-US/iPhone 16e-2-AddToken.png b/fastlane/screenshots/en-US/iPhone 16e-2-AddToken.png new file mode 100644 index 00000000..719c415b Binary files /dev/null and b/fastlane/screenshots/en-US/iPhone 16e-2-AddToken.png differ diff --git a/fastlane/screenshots/en-US/iPhone 17 Pro Max-0-TokenList.png b/fastlane/screenshots/en-US/iPhone 17 Pro Max-0-TokenList.png new file mode 100644 index 00000000..afc3ab44 Binary files /dev/null and b/fastlane/screenshots/en-US/iPhone 17 Pro Max-0-TokenList.png differ diff --git a/fastlane/screenshots/en-US/iPhone 17 Pro Max-1-ScanToken.png b/fastlane/screenshots/en-US/iPhone 17 Pro Max-1-ScanToken.png new file mode 100644 index 00000000..daabf7e4 Binary files /dev/null and b/fastlane/screenshots/en-US/iPhone 17 Pro Max-1-ScanToken.png differ diff --git a/fastlane/screenshots/en-US/iPhone 17 Pro Max-2-AddToken.png b/fastlane/screenshots/en-US/iPhone 17 Pro Max-2-AddToken.png new file mode 100644 index 00000000..190c0053 Binary files /dev/null and b/fastlane/screenshots/en-US/iPhone 17 Pro Max-2-AddToken.png differ diff --git a/fastlane/screenshots/en-US/iPhone 17-0-TokenList.png b/fastlane/screenshots/en-US/iPhone 17-0-TokenList.png new file mode 100644 index 00000000..d2bfc50e Binary files /dev/null and b/fastlane/screenshots/en-US/iPhone 17-0-TokenList.png differ diff --git a/fastlane/screenshots/en-US/iPhone 17-1-ScanToken.png b/fastlane/screenshots/en-US/iPhone 17-1-ScanToken.png new file mode 100644 index 00000000..9290e136 Binary files /dev/null and b/fastlane/screenshots/en-US/iPhone 17-1-ScanToken.png differ diff --git a/fastlane/screenshots/en-US/iPhone 17-2-AddToken.png b/fastlane/screenshots/en-US/iPhone 17-2-AddToken.png new file mode 100644 index 00000000..b29100dc Binary files /dev/null and b/fastlane/screenshots/en-US/iPhone 17-2-AddToken.png differ diff --git a/fastlane/screenshots/en-US/iPhone 8 Plus-0-TokenList.png b/fastlane/screenshots/en-US/iPhone 8 Plus-0-TokenList.png deleted file mode 100644 index 924719bb..00000000 Binary files a/fastlane/screenshots/en-US/iPhone 8 Plus-0-TokenList.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone 8 Plus-1-ScanToken.png b/fastlane/screenshots/en-US/iPhone 8 Plus-1-ScanToken.png deleted file mode 100644 index 5ca87806..00000000 Binary files a/fastlane/screenshots/en-US/iPhone 8 Plus-1-ScanToken.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone 8 Plus-2-AddToken.png b/fastlane/screenshots/en-US/iPhone 8 Plus-2-AddToken.png deleted file mode 100644 index d3f0e3e5..00000000 Binary files a/fastlane/screenshots/en-US/iPhone 8 Plus-2-AddToken.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone 8-0-TokenList.png b/fastlane/screenshots/en-US/iPhone 8-0-TokenList.png deleted file mode 100644 index e9e624b5..00000000 Binary files a/fastlane/screenshots/en-US/iPhone 8-0-TokenList.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone 8-1-ScanToken.png b/fastlane/screenshots/en-US/iPhone 8-1-ScanToken.png deleted file mode 100644 index 25a28ebf..00000000 Binary files a/fastlane/screenshots/en-US/iPhone 8-1-ScanToken.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone 8-2-AddToken.png b/fastlane/screenshots/en-US/iPhone 8-2-AddToken.png deleted file mode 100644 index a4872f6a..00000000 Binary files a/fastlane/screenshots/en-US/iPhone 8-2-AddToken.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone Air-0-TokenList.png b/fastlane/screenshots/en-US/iPhone Air-0-TokenList.png new file mode 100644 index 00000000..933efeb1 Binary files /dev/null and b/fastlane/screenshots/en-US/iPhone Air-0-TokenList.png differ diff --git a/fastlane/screenshots/en-US/iPhone Air-1-ScanToken.png b/fastlane/screenshots/en-US/iPhone Air-1-ScanToken.png new file mode 100644 index 00000000..de5c63e1 Binary files /dev/null and b/fastlane/screenshots/en-US/iPhone Air-1-ScanToken.png differ diff --git a/fastlane/screenshots/en-US/iPhone Air-2-AddToken.png b/fastlane/screenshots/en-US/iPhone Air-2-AddToken.png new file mode 100644 index 00000000..ae385833 Binary files /dev/null and b/fastlane/screenshots/en-US/iPhone Air-2-AddToken.png differ diff --git a/fastlane/screenshots/en-US/iPhone SE (1st generation)-0-TokenList.png b/fastlane/screenshots/en-US/iPhone SE (1st generation)-0-TokenList.png deleted file mode 100644 index 868f227e..00000000 Binary files a/fastlane/screenshots/en-US/iPhone SE (1st generation)-0-TokenList.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone SE (1st generation)-1-ScanToken.png b/fastlane/screenshots/en-US/iPhone SE (1st generation)-1-ScanToken.png deleted file mode 100644 index da8353d4..00000000 Binary files a/fastlane/screenshots/en-US/iPhone SE (1st generation)-1-ScanToken.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone SE (1st generation)-2-AddToken.png b/fastlane/screenshots/en-US/iPhone SE (1st generation)-2-AddToken.png deleted file mode 100644 index 89926a31..00000000 Binary files a/fastlane/screenshots/en-US/iPhone SE (1st generation)-2-AddToken.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone Xs Max-0-TokenList.png b/fastlane/screenshots/en-US/iPhone Xs Max-0-TokenList.png deleted file mode 100644 index eecf3b08..00000000 Binary files a/fastlane/screenshots/en-US/iPhone Xs Max-0-TokenList.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone Xs Max-1-ScanToken.png b/fastlane/screenshots/en-US/iPhone Xs Max-1-ScanToken.png deleted file mode 100644 index da8de5d8..00000000 Binary files a/fastlane/screenshots/en-US/iPhone Xs Max-1-ScanToken.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone Xs Max-2-AddToken.png b/fastlane/screenshots/en-US/iPhone Xs Max-2-AddToken.png deleted file mode 100644 index 03c07bca..00000000 Binary files a/fastlane/screenshots/en-US/iPhone Xs Max-2-AddToken.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone Xs-0-TokenList.png b/fastlane/screenshots/en-US/iPhone Xs-0-TokenList.png deleted file mode 100644 index 22061c2e..00000000 Binary files a/fastlane/screenshots/en-US/iPhone Xs-0-TokenList.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone Xs-1-ScanToken.png b/fastlane/screenshots/en-US/iPhone Xs-1-ScanToken.png deleted file mode 100644 index d04c1860..00000000 Binary files a/fastlane/screenshots/en-US/iPhone Xs-1-ScanToken.png and /dev/null differ diff --git a/fastlane/screenshots/en-US/iPhone Xs-2-AddToken.png b/fastlane/screenshots/en-US/iPhone Xs-2-AddToken.png deleted file mode 100644 index ef3b2b7c..00000000 Binary files a/fastlane/screenshots/en-US/iPhone Xs-2-AddToken.png and /dev/null differ