diff --git a/.swiftlint.yml b/.swiftlint.yml index 5fb407f7109..4b54bfb9fbb 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -80,6 +80,7 @@ custom_rules: excluded: - "**/.build" - "**/AutoMockable.generated.swift" + - "**/Needle.generated.swift" - "**/DerivedData" - "**/Package.swift" - "**/Package@swift-*.swift" diff --git a/WireAuthentication/WireAuthentication.xcodeproj/project.pbxproj b/WireAuthentication/WireAuthentication.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..f1a8e8f5da3 --- /dev/null +++ b/WireAuthentication/WireAuthentication.xcodeproj/project.pbxproj @@ -0,0 +1,1252 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + EE7442732D3132570025271D /* NeedleFoundation in Frameworks */ = {isa = PBXBuildFile; productRef = EE7442722D3132570025271D /* NeedleFoundation */; }; + EEC738EA2D022EDB003C0FC9 /* WireAuthenticationUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEC738E02D022EDB003C0FC9 /* WireAuthenticationUI.framework */; }; + EEC739072D022EF6003C0FC9 /* WireAuthenticationLogic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEC738FD2D022EF5003C0FC9 /* WireAuthenticationLogic.framework */; }; + EEC739292D022FE0003C0FC9 /* WireAuthenticationLogic.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEC738FD2D022EF5003C0FC9 /* WireAuthenticationLogic.framework */; }; + EEC7392A2D022FE0003C0FC9 /* WireAuthenticationLogic.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EEC738FD2D022EF5003C0FC9 /* WireAuthenticationLogic.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + EEC7392D2D022FE0003C0FC9 /* WireAuthenticationUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEC738E02D022EDB003C0FC9 /* WireAuthenticationUI.framework */; }; + EEC7392E2D022FE0003C0FC9 /* WireAuthenticationUI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EEC738E02D022EDB003C0FC9 /* WireAuthenticationUI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + EEC739322D022FE8003C0FC9 /* WireAuthenticationAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEC7391A2D022F35003C0FC9 /* WireAuthenticationAPI.framework */; }; + EEC739332D022FE8003C0FC9 /* WireAuthenticationAPI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EEC7391A2D022F35003C0FC9 /* WireAuthenticationAPI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + EEC739372D023029003C0FC9 /* WireAuthenticationAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EEC7391A2D022F35003C0FC9 /* WireAuthenticationAPI.framework */; }; + EEC739382D02302A003C0FC9 /* WireAuthenticationAPI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EEC7391A2D022F35003C0FC9 /* WireAuthenticationAPI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + EEC73BAC2D035B02003C0FC9 /* WireAPI in Frameworks */ = {isa = PBXBuildFile; productRef = EEC73BAB2D035B02003C0FC9 /* WireAPI */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + EEC738EB2D022EDB003C0FC9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EEC738B72D022D30003C0FC9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EEC738DF2D022EDB003C0FC9; + remoteInfo = WireAuthenticationUI; + }; + EEC739082D022EF6003C0FC9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EEC738B72D022D30003C0FC9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EEC738FC2D022EF5003C0FC9; + remoteInfo = WireAuthenticationCore; + }; + EEC7392B2D022FE0003C0FC9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EEC738B72D022D30003C0FC9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EEC738FC2D022EF5003C0FC9; + remoteInfo = WireAuthenticationCore; + }; + EEC7392F2D022FE0003C0FC9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EEC738B72D022D30003C0FC9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EEC738DF2D022EDB003C0FC9; + remoteInfo = WireAuthenticationUI; + }; + EEC739342D022FE8003C0FC9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EEC738B72D022D30003C0FC9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EEC739192D022F35003C0FC9; + remoteInfo = WireAuthenticationAPI; + }; + EEC739392D02302A003C0FC9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EEC738B72D022D30003C0FC9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EEC739192D022F35003C0FC9; + remoteInfo = WireAuthenticationAPI; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + EEC739312D022FE0003C0FC9 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + EEC7392A2D022FE0003C0FC9 /* WireAuthenticationLogic.framework in Embed Frameworks */, + EEC7392E2D022FE0003C0FC9 /* WireAuthenticationUI.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + EEC739362D022FE8003C0FC9 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + EEC739332D022FE8003C0FC9 /* WireAuthenticationAPI.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + EEC7393B2D02302A003C0FC9 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + EEC739382D02302A003C0FC9 /* WireAuthenticationAPI.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + EEC738C02D022D30003C0FC9 /* WireAuthentication.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WireAuthentication.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EEC738E02D022EDB003C0FC9 /* WireAuthenticationUI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WireAuthenticationUI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EEC738E92D022EDB003C0FC9 /* WireAuthenticationUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WireAuthenticationUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + EEC738FD2D022EF5003C0FC9 /* WireAuthenticationLogic.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WireAuthenticationLogic.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EEC739062D022EF6003C0FC9 /* WireAuthenticationLogicTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WireAuthenticationLogicTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + EEC7391A2D022F35003C0FC9 /* WireAuthenticationAPI.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WireAuthenticationAPI.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + EEC738D22D022D30003C0FC9 /* Exceptions for "WireAuthentication" folder in "WireAuthentication" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + publicHeaders = ( + WireAuthentication.h, + ); + target = EEC738BF2D022D30003C0FC9 /* WireAuthentication */; + }; + EEC738F12D022EDC003C0FC9 /* Exceptions for "WireAuthenticationUI" folder in "WireAuthenticationUI" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + publicHeaders = ( + WireAuthenticationUI.h, + ); + target = EEC738DF2D022EDB003C0FC9 /* WireAuthenticationUI */; + }; + EEC7390E2D022EF6003C0FC9 /* Exceptions for "WireAuthenticationLogic" folder in "WireAuthenticationLogic" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + publicHeaders = ( + WireAuthenticationLogic.h, + ); + target = EEC738FC2D022EF5003C0FC9 /* WireAuthenticationLogic */; + }; + EEC739202D022F35003C0FC9 /* Exceptions for "WireAuthenticationAPI" folder in "WireAuthenticationAPI" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + publicHeaders = ( + WireAuthenticationAPI.h, + ); + target = EEC739192D022F35003C0FC9 /* WireAuthenticationAPI */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + EEC738C22D022D30003C0FC9 /* WireAuthentication */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + EEC738D22D022D30003C0FC9 /* Exceptions for "WireAuthentication" folder in "WireAuthentication" target */, + ); + path = WireAuthentication; + sourceTree = ""; + }; + EEC738E12D022EDB003C0FC9 /* WireAuthenticationUI */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + EEC738F12D022EDC003C0FC9 /* Exceptions for "WireAuthenticationUI" folder in "WireAuthenticationUI" target */, + ); + path = WireAuthenticationUI; + sourceTree = ""; + }; + EEC738ED2D022EDB003C0FC9 /* WireAuthenticationUITests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = WireAuthenticationUITests; + sourceTree = ""; + }; + EEC738FE2D022EF5003C0FC9 /* WireAuthenticationLogic */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + EEC7390E2D022EF6003C0FC9 /* Exceptions for "WireAuthenticationLogic" folder in "WireAuthenticationLogic" target */, + ); + path = WireAuthenticationLogic; + sourceTree = ""; + }; + EEC7390A2D022EF6003C0FC9 /* WireAuthenticationLogicTests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = WireAuthenticationLogicTests; + sourceTree = ""; + }; + EEC7391B2D022F35003C0FC9 /* WireAuthenticationAPI */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + EEC739202D022F35003C0FC9 /* Exceptions for "WireAuthenticationAPI" folder in "WireAuthenticationAPI" target */, + ); + path = WireAuthenticationAPI; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + EEC738BD2D022D30003C0FC9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + EE7442732D3132570025271D /* NeedleFoundation in Frameworks */, + EEC739292D022FE0003C0FC9 /* WireAuthenticationLogic.framework in Frameworks */, + EEC7392D2D022FE0003C0FC9 /* WireAuthenticationUI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC738DD2D022EDB003C0FC9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + EEC739322D022FE8003C0FC9 /* WireAuthenticationAPI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC738E62D022EDB003C0FC9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + EEC738EA2D022EDB003C0FC9 /* WireAuthenticationUI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC738FA2D022EF5003C0FC9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + EEC73BAC2D035B02003C0FC9 /* WireAPI in Frameworks */, + EEC739372D023029003C0FC9 /* WireAuthenticationAPI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC739032D022EF6003C0FC9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + EEC739072D022EF6003C0FC9 /* WireAuthenticationLogic.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC739172D022F35003C0FC9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + EEC738B62D022D30003C0FC9 = { + isa = PBXGroup; + children = ( + EEC738C22D022D30003C0FC9 /* WireAuthentication */, + EEC738E12D022EDB003C0FC9 /* WireAuthenticationUI */, + EEC738ED2D022EDB003C0FC9 /* WireAuthenticationUITests */, + EEC738FE2D022EF5003C0FC9 /* WireAuthenticationLogic */, + EEC7390A2D022EF6003C0FC9 /* WireAuthenticationLogicTests */, + EEC7391B2D022F35003C0FC9 /* WireAuthenticationAPI */, + EEC739242D022FE0003C0FC9 /* Frameworks */, + EEC738C12D022D30003C0FC9 /* Products */, + ); + sourceTree = ""; + }; + EEC738C12D022D30003C0FC9 /* Products */ = { + isa = PBXGroup; + children = ( + EEC738C02D022D30003C0FC9 /* WireAuthentication.framework */, + EEC738E02D022EDB003C0FC9 /* WireAuthenticationUI.framework */, + EEC738E92D022EDB003C0FC9 /* WireAuthenticationUITests.xctest */, + EEC738FD2D022EF5003C0FC9 /* WireAuthenticationLogic.framework */, + EEC739062D022EF6003C0FC9 /* WireAuthenticationLogicTests.xctest */, + EEC7391A2D022F35003C0FC9 /* WireAuthenticationAPI.framework */, + ); + name = Products; + sourceTree = ""; + }; + EEC739242D022FE0003C0FC9 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + EEC738BB2D022D30003C0FC9 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC738DB2D022EDB003C0FC9 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC738F82D022EF5003C0FC9 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC739152D022F35003C0FC9 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + EEC738BF2D022D30003C0FC9 /* WireAuthentication */ = { + isa = PBXNativeTarget; + buildConfigurationList = EEC738D32D022D30003C0FC9 /* Build configuration list for PBXNativeTarget "WireAuthentication" */; + buildPhases = ( + EEC738BB2D022D30003C0FC9 /* Headers */, + EEC738BC2D022D30003C0FC9 /* Sources */, + EEC738BD2D022D30003C0FC9 /* Frameworks */, + EEC738BE2D022D30003C0FC9 /* Resources */, + EEC739312D022FE0003C0FC9 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + EEC7392C2D022FE0003C0FC9 /* PBXTargetDependency */, + EEC739302D022FE0003C0FC9 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + EEC738C22D022D30003C0FC9 /* WireAuthentication */, + ); + name = WireAuthentication; + packageProductDependencies = ( + EE7442722D3132570025271D /* NeedleFoundation */, + ); + productName = WireAuthentication; + productReference = EEC738C02D022D30003C0FC9 /* WireAuthentication.framework */; + productType = "com.apple.product-type.framework"; + }; + EEC738DF2D022EDB003C0FC9 /* WireAuthenticationUI */ = { + isa = PBXNativeTarget; + buildConfigurationList = EEC738F22D022EDC003C0FC9 /* Build configuration list for PBXNativeTarget "WireAuthenticationUI" */; + buildPhases = ( + EEC738DB2D022EDB003C0FC9 /* Headers */, + EEC738DC2D022EDB003C0FC9 /* Sources */, + EEC738DD2D022EDB003C0FC9 /* Frameworks */, + EEC738DE2D022EDB003C0FC9 /* Resources */, + EEC739362D022FE8003C0FC9 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + EEC739352D022FE8003C0FC9 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + EEC738E12D022EDB003C0FC9 /* WireAuthenticationUI */, + ); + name = WireAuthenticationUI; + packageProductDependencies = ( + ); + productName = WireAuthenticationUI; + productReference = EEC738E02D022EDB003C0FC9 /* WireAuthenticationUI.framework */; + productType = "com.apple.product-type.framework"; + }; + EEC738E82D022EDB003C0FC9 /* WireAuthenticationUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = EEC738F52D022EDC003C0FC9 /* Build configuration list for PBXNativeTarget "WireAuthenticationUITests" */; + buildPhases = ( + EEC738E52D022EDB003C0FC9 /* Sources */, + EEC738E62D022EDB003C0FC9 /* Frameworks */, + EEC738E72D022EDB003C0FC9 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + EEC738EC2D022EDB003C0FC9 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + EEC738ED2D022EDB003C0FC9 /* WireAuthenticationUITests */, + ); + name = WireAuthenticationUITests; + packageProductDependencies = ( + ); + productName = WireAuthenticationUITests; + productReference = EEC738E92D022EDB003C0FC9 /* WireAuthenticationUITests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + EEC738FC2D022EF5003C0FC9 /* WireAuthenticationLogic */ = { + isa = PBXNativeTarget; + buildConfigurationList = EEC7390F2D022EF6003C0FC9 /* Build configuration list for PBXNativeTarget "WireAuthenticationLogic" */; + buildPhases = ( + EEC738F82D022EF5003C0FC9 /* Headers */, + EEC738F92D022EF5003C0FC9 /* Sources */, + EEC738FA2D022EF5003C0FC9 /* Frameworks */, + EEC738FB2D022EF5003C0FC9 /* Resources */, + EEC7393B2D02302A003C0FC9 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + EEC7393A2D02302A003C0FC9 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + EEC738FE2D022EF5003C0FC9 /* WireAuthenticationLogic */, + ); + name = WireAuthenticationLogic; + packageProductDependencies = ( + EEC73BAB2D035B02003C0FC9 /* WireAPI */, + ); + productName = WireAuthenticationCore; + productReference = EEC738FD2D022EF5003C0FC9 /* WireAuthenticationLogic.framework */; + productType = "com.apple.product-type.framework"; + }; + EEC739052D022EF6003C0FC9 /* WireAuthenticationLogicTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = EEC739122D022EF6003C0FC9 /* Build configuration list for PBXNativeTarget "WireAuthenticationLogicTests" */; + buildPhases = ( + EEC739022D022EF6003C0FC9 /* Sources */, + EEC739032D022EF6003C0FC9 /* Frameworks */, + EEC739042D022EF6003C0FC9 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + EEC739092D022EF6003C0FC9 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + EEC7390A2D022EF6003C0FC9 /* WireAuthenticationLogicTests */, + ); + name = WireAuthenticationLogicTests; + packageProductDependencies = ( + ); + productName = WireAuthenticationCoreTests; + productReference = EEC739062D022EF6003C0FC9 /* WireAuthenticationLogicTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + EEC739192D022F35003C0FC9 /* WireAuthenticationAPI */ = { + isa = PBXNativeTarget; + buildConfigurationList = EEC739212D022F35003C0FC9 /* Build configuration list for PBXNativeTarget "WireAuthenticationAPI" */; + buildPhases = ( + EEC739152D022F35003C0FC9 /* Headers */, + EEC739162D022F35003C0FC9 /* Sources */, + EEC739172D022F35003C0FC9 /* Frameworks */, + EEC739182D022F35003C0FC9 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + EEC7391B2D022F35003C0FC9 /* WireAuthenticationAPI */, + ); + name = WireAuthenticationAPI; + packageProductDependencies = ( + ); + productName = WireAuthenticationAPI; + productReference = EEC7391A2D022F35003C0FC9 /* WireAuthenticationAPI.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + EEC738B72D022D30003C0FC9 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1610; + LastUpgradeCheck = 1610; + TargetAttributes = { + EEC738BF2D022D30003C0FC9 = { + CreatedOnToolsVersion = 16.1; + }; + EEC738DF2D022EDB003C0FC9 = { + CreatedOnToolsVersion = 16.1; + }; + EEC738E82D022EDB003C0FC9 = { + CreatedOnToolsVersion = 16.1; + }; + EEC738FC2D022EF5003C0FC9 = { + CreatedOnToolsVersion = 16.1; + }; + EEC739052D022EF6003C0FC9 = { + CreatedOnToolsVersion = 16.1; + }; + EEC739192D022F35003C0FC9 = { + CreatedOnToolsVersion = 16.1; + }; + }; + }; + buildConfigurationList = EEC738BA2D022D30003C0FC9 /* Build configuration list for PBXProject "WireAuthentication" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = EEC738B62D022D30003C0FC9; + minimizedProjectReferenceProxies = 1; + packageReferences = ( + EE7442712D3132570025271D /* XCRemoteSwiftPackageReference "needle" */, + ); + preferredProjectObjectVersion = 77; + productRefGroup = EEC738C12D022D30003C0FC9 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + EEC738BF2D022D30003C0FC9 /* WireAuthentication */, + EEC739192D022F35003C0FC9 /* WireAuthenticationAPI */, + EEC738DF2D022EDB003C0FC9 /* WireAuthenticationUI */, + EEC738E82D022EDB003C0FC9 /* WireAuthenticationUITests */, + EEC738FC2D022EF5003C0FC9 /* WireAuthenticationLogic */, + EEC739052D022EF6003C0FC9 /* WireAuthenticationLogicTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + EEC738BE2D022D30003C0FC9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC738DE2D022EDB003C0FC9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC738E72D022EDB003C0FC9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC738FB2D022EF5003C0FC9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC739042D022EF6003C0FC9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC739182D022F35003C0FC9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + EEC738BC2D022D30003C0FC9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC738DC2D022EDB003C0FC9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC738E52D022EDB003C0FC9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC738F92D022EF5003C0FC9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC739022D022EF6003C0FC9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EEC739162D022F35003C0FC9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + EEC738EC2D022EDB003C0FC9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EEC738DF2D022EDB003C0FC9 /* WireAuthenticationUI */; + targetProxy = EEC738EB2D022EDB003C0FC9 /* PBXContainerItemProxy */; + }; + EEC739092D022EF6003C0FC9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EEC738FC2D022EF5003C0FC9 /* WireAuthenticationLogic */; + targetProxy = EEC739082D022EF6003C0FC9 /* PBXContainerItemProxy */; + }; + EEC7392C2D022FE0003C0FC9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EEC738FC2D022EF5003C0FC9 /* WireAuthenticationLogic */; + targetProxy = EEC7392B2D022FE0003C0FC9 /* PBXContainerItemProxy */; + }; + EEC739302D022FE0003C0FC9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EEC738DF2D022EDB003C0FC9 /* WireAuthenticationUI */; + targetProxy = EEC7392F2D022FE0003C0FC9 /* PBXContainerItemProxy */; + }; + EEC739352D022FE8003C0FC9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EEC739192D022F35003C0FC9 /* WireAuthenticationAPI */; + targetProxy = EEC739342D022FE8003C0FC9 /* PBXContainerItemProxy */; + }; + EEC7393A2D02302A003C0FC9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EEC739192D022F35003C0FC9 /* WireAuthenticationAPI */; + targetProxy = EEC739392D02302A003C0FC9 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + EEC738D42D022D30003C0FC9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = ( + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 15.1; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = com.wire.WireAuthentication; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = auto; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_INSTALL_OBJC_HEADER = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + XROS_DEPLOYMENT_TARGET = 2.1; + }; + name = Debug; + }; + EEC738D52D022D30003C0FC9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = ""; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = ( + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 15.1; + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = com.wire.WireAuthentication; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SDKROOT = auto; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_INSTALL_OBJC_HEADER = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + XROS_DEPLOYMENT_TARGET = 2.1; + }; + name = Release; + }; + EEC738D62D022D30003C0FC9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 6.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + EEC738D72D022D30003C0FC9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.6; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 6.0; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + EEC738F32D022EDC003C0FC9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = EDF3JCE8BC; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = com.wire.WireAuthenticationUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_INSTALL_OBJC_HEADER = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + EEC738F42D022EDC003C0FC9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = EDF3JCE8BC; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = com.wire.WireAuthenticationUI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_INSTALL_OBJC_HEADER = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + EEC738F62D022EDC003C0FC9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = EDF3JCE8BC; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.wire.WireAuthenticationUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + EEC738F72D022EDC003C0FC9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = EDF3JCE8BC; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.wire.WireAuthenticationUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + EEC739102D022EF6003C0FC9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = EDF3JCE8BC; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = com.wire.WireAuthenticationLogic; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_INSTALL_OBJC_HEADER = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + EEC739112D022EF6003C0FC9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = EDF3JCE8BC; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = com.wire.WireAuthenticationLogic; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_INSTALL_OBJC_HEADER = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + EEC739132D022EF6003C0FC9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = EDF3JCE8BC; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.wire.WireAuthenticationLogicTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + EEC739142D022EF6003C0FC9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = EDF3JCE8BC; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.wire.WireAuthenticationLogicTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + EEC739222D022F35003C0FC9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = EDF3JCE8BC; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = com.wire.WireAuthenticationAPI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_INSTALL_OBJC_HEADER = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + EEC739232D022F35003C0FC9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = EDF3JCE8BC; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu17 gnu++20"; + PRODUCT_BUNDLE_IDENTIFIER = com.wire.WireAuthenticationAPI; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; + SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_INSTALL_OBJC_HEADER = NO; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + EEC738BA2D022D30003C0FC9 /* Build configuration list for PBXProject "WireAuthentication" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EEC738D62D022D30003C0FC9 /* Debug */, + EEC738D72D022D30003C0FC9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EEC738D32D022D30003C0FC9 /* Build configuration list for PBXNativeTarget "WireAuthentication" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EEC738D42D022D30003C0FC9 /* Debug */, + EEC738D52D022D30003C0FC9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EEC738F22D022EDC003C0FC9 /* Build configuration list for PBXNativeTarget "WireAuthenticationUI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EEC738F32D022EDC003C0FC9 /* Debug */, + EEC738F42D022EDC003C0FC9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EEC738F52D022EDC003C0FC9 /* Build configuration list for PBXNativeTarget "WireAuthenticationUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EEC738F62D022EDC003C0FC9 /* Debug */, + EEC738F72D022EDC003C0FC9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EEC7390F2D022EF6003C0FC9 /* Build configuration list for PBXNativeTarget "WireAuthenticationLogic" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EEC739102D022EF6003C0FC9 /* Debug */, + EEC739112D022EF6003C0FC9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EEC739122D022EF6003C0FC9 /* Build configuration list for PBXNativeTarget "WireAuthenticationLogicTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EEC739132D022EF6003C0FC9 /* Debug */, + EEC739142D022EF6003C0FC9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EEC739212D022F35003C0FC9 /* Build configuration list for PBXNativeTarget "WireAuthenticationAPI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EEC739222D022F35003C0FC9 /* Debug */, + EEC739232D022F35003C0FC9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCRemoteSwiftPackageReference section */ + EE7442712D3132570025271D /* XCRemoteSwiftPackageReference "needle" */ = { + isa = XCRemoteSwiftPackageReference; + repositoryURL = "https://github.com/uber/needle.git"; + requirement = { + kind = upToNextMajorVersion; + minimumVersion = 0.0.0; + }; + }; +/* End XCRemoteSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + EE7442722D3132570025271D /* NeedleFoundation */ = { + isa = XCSwiftPackageProductDependency; + package = EE7442712D3132570025271D /* XCRemoteSwiftPackageReference "needle" */; + productName = NeedleFoundation; + }; + EEC73BAB2D035B02003C0FC9 /* WireAPI */ = { + isa = XCSwiftPackageProductDependency; + productName = WireAPI; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = EEC738B72D022D30003C0FC9 /* Project object */; +} diff --git a/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthentication.xcscheme b/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthentication.xcscheme new file mode 100644 index 00000000000..171b6754f0c --- /dev/null +++ b/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthentication.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthenticationLogic.xcscheme b/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthenticationLogic.xcscheme new file mode 100644 index 00000000000..6b0763de70d --- /dev/null +++ b/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthenticationLogic.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthenticationLogicTests.xcscheme b/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthenticationLogicTests.xcscheme new file mode 100644 index 00000000000..f677bfcab44 --- /dev/null +++ b/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthenticationLogicTests.xcscheme @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthenticationUI.xcscheme b/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthenticationUI.xcscheme new file mode 100644 index 00000000000..825dcb211e6 --- /dev/null +++ b/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthenticationUI.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthenticationUITests.xcscheme b/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthenticationUITests.xcscheme new file mode 100644 index 00000000000..cf450b50c89 --- /dev/null +++ b/WireAuthentication/WireAuthentication.xcodeproj/xcshareddata/xcschemes/WireAuthenticationUITests.xcscheme @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/WireAuthentication/WireAuthentication/Sources/Components/DetermineAuthMethodComponent.swift b/WireAuthentication/WireAuthentication/Sources/Components/DetermineAuthMethodComponent.swift new file mode 100644 index 00000000000..35f4430cfe5 --- /dev/null +++ b/WireAuthentication/WireAuthentication/Sources/Components/DetermineAuthMethodComponent.swift @@ -0,0 +1,57 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import NeedleFoundation +import SwiftUI +import WireAuthenticationAPI +internal import WireAuthenticationUI +internal import WireAuthenticationLogic + +protocol DetermineAuthMethodComponentDependency: Dependency { + + @MainActor var router: Router { get } + +} + +class DetermineAuthMethodComponent: Component, DetermineAuthMethodBuilder { + + private var determineAuthMethodUseCase: some DetermineAuthMethodUseCaseProtocol { + DetermineAuthMethodUseCase() + } + + @MainActor private var viewModel: DetermineAuthMethodViewModel { + DetermineAuthMethodViewModel( + router: dependency.router, + determineAuthMethod: determineAuthMethodUseCase + ) + } + + @MainActor var determineAuthMethodView: DetermineAuthMethodView { + DetermineAuthMethodView( + viewModel: viewModel, + builder: loginViaEmailComponent + ) + } + + // MARK: - Children + + var loginViaEmailComponent: LoginViaEmailComponent { + LoginViaEmailComponent(parent: self) + } + +} diff --git a/WireAuthentication/WireAuthentication/Sources/Components/LoginViaEmailComponentDependency.swift b/WireAuthentication/WireAuthentication/Sources/Components/LoginViaEmailComponentDependency.swift new file mode 100644 index 00000000000..6c149e4cb6f --- /dev/null +++ b/WireAuthentication/WireAuthentication/Sources/Components/LoginViaEmailComponentDependency.swift @@ -0,0 +1,53 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import NeedleFoundation +import SwiftUI +import WireAuthenticationAPI +internal import WireAuthenticationUI +internal import WireAuthenticationLogic + +protocol LoginViaEmailComponentDependency: Dependency { + + @MainActor var router: Router { get } + +} + +class LoginViaEmailComponent: Component, LoginViaEmailBuilder { + + private var loginViaEmailUseCase: some LoginViaEmailUseCaseProtocol { + LoginViaEmailUseCase() + } + + @MainActor + private func loginViewModel(email: String) -> LoginViaEmailViewModel { + LoginViaEmailViewModel( + router: dependency.router, + loginViaEmailUseCase: loginViaEmailUseCase, + email: email + ) + } + + @MainActor + func loginViaEmailView(email: String) -> LoginViaEmailView { + LoginViaEmailView( + viewModel: loginViewModel(email: email) + ) + } + +} diff --git a/WireAuthentication/WireAuthentication/Sources/Components/RootComponent.swift b/WireAuthentication/WireAuthentication/Sources/Components/RootComponent.swift new file mode 100644 index 00000000000..bf6d1b13af1 --- /dev/null +++ b/WireAuthentication/WireAuthentication/Sources/Components/RootComponent.swift @@ -0,0 +1,46 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import NeedleFoundation +import SwiftUI +internal import WireAuthenticationUI + +class RootComponent: BootstrapComponent { + + @MainActor public var router: Router { + rootViewModel + } + + @MainActor private var rootViewModel: RootViewModel { + RootViewModel() + } + + @MainActor var rootView: some View { + RootView( + viewModel: rootViewModel, + builder: determineAuthMethodComponent + ) + } + + // MARK: - Children + + var determineAuthMethodComponent: DetermineAuthMethodComponent { + DetermineAuthMethodComponent(parent: self) + } + +} diff --git a/WireAuthentication/WireAuthentication/Sources/Needle.generated.swift b/WireAuthentication/WireAuthentication/Sources/Needle.generated.swift new file mode 100644 index 00000000000..4ce092d05c6 --- /dev/null +++ b/WireAuthentication/WireAuthentication/Sources/Needle.generated.swift @@ -0,0 +1,99 @@ + + +import Foundation +import NeedleFoundation +import SwiftUI +import WireAPI +import WireAuthenticationAPI +internal import WireAuthenticationLogic +internal import WireAuthenticationUI + +// swiftlint:disable unused_declaration +private let needleDependenciesHash : String? = nil + +// MARK: - Traversal Helpers + +private func parent1(_ component: NeedleFoundation.Scope) -> NeedleFoundation.Scope { + return component.parent +} + +private func parent2(_ component: NeedleFoundation.Scope) -> NeedleFoundation.Scope { + return component.parent.parent +} + +// MARK: - Providers + +#if !NEEDLE_DYNAMIC + +private class DetermineAuthMethodComponentDependency527e70b5dbcfcb8f2023Provider: DetermineAuthMethodComponentDependency { + var router: Router { + return rootComponent.router + } + private let rootComponent: RootComponent + init(rootComponent: RootComponent) { + self.rootComponent = rootComponent + } +} +/// ^->RootComponent->DetermineAuthMethodComponent +private func factoryd47fa74281e135cd9f10b3a8f24c1d289f2c0f2e(_ component: NeedleFoundation.Scope) -> AnyObject { + return DetermineAuthMethodComponentDependency527e70b5dbcfcb8f2023Provider(rootComponent: parent1(component) as! RootComponent) +} +private class LoginViaEmailComponentDependency6f812ea9ca4f0322dd27Provider: LoginViaEmailComponentDependency { + var router: Router { + return rootComponent.router + } + private let rootComponent: RootComponent + init(rootComponent: RootComponent) { + self.rootComponent = rootComponent + } +} +/// ^->RootComponent->DetermineAuthMethodComponent->LoginViaEmailComponent +private func factory9bda312c16141c932061a9403e3301bb54f80df0(_ component: NeedleFoundation.Scope) -> AnyObject { + return LoginViaEmailComponentDependency6f812ea9ca4f0322dd27Provider(rootComponent: parent2(component) as! RootComponent) +} + +#else +extension DetermineAuthMethodComponent: NeedleFoundation.Registration { + public func registerItems() { + keyPathToName[\DetermineAuthMethodComponentDependency.router] = "router-Router" + + } +} +extension LoginViaEmailComponent: NeedleFoundation.Registration { + public func registerItems() { + keyPathToName[\LoginViaEmailComponentDependency.router] = "router-Router" + } +} +extension RootComponent: NeedleFoundation.Registration { + public func registerItems() { + + localTable["router-Router"] = { [unowned self] in self.router as Any } + } +} + + +#endif + +private func factoryEmptyDependencyProvider(_ component: NeedleFoundation.Scope) -> AnyObject { + return EmptyDependencyProvider(component: component) +} + +// MARK: - Registration +private func registerProviderFactory(_ componentPath: String, _ factory: @escaping (NeedleFoundation.Scope) -> AnyObject) { + __DependencyProviderRegistry.instance.registerDependencyProviderFactory(for: componentPath, factory) +} + +#if !NEEDLE_DYNAMIC + +@inline(never) private func register1() { + registerProviderFactory("^->RootComponent->DetermineAuthMethodComponent", factoryd47fa74281e135cd9f10b3a8f24c1d289f2c0f2e) + registerProviderFactory("^->RootComponent->DetermineAuthMethodComponent->LoginViaEmailComponent", factory9bda312c16141c932061a9403e3301bb54f80df0) + registerProviderFactory("^->RootComponent", factoryEmptyDependencyProvider) +} +#endif + +public func registerProviderFactories() { +#if !NEEDLE_DYNAMIC + register1() +#endif +} diff --git a/WireAuthentication/WireAuthentication/Sources/WireAuthenticationAssembly.swift b/WireAuthentication/WireAuthentication/Sources/WireAuthenticationAssembly.swift new file mode 100644 index 00000000000..945befd8f51 --- /dev/null +++ b/WireAuthentication/WireAuthentication/Sources/WireAuthenticationAssembly.swift @@ -0,0 +1,37 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Foundation +import NeedleFoundation +import SwiftUI +import WireAuthenticationAPI +internal import WireAuthenticationUI +internal import WireAuthenticationLogic + +public struct WireAuthenticationAssembly { + + public init() { + registerProviderFactories() + } + + @MainActor + public func assemble() -> some View { + RootComponent().rootView + } + +} diff --git a/WireAuthentication/WireAuthentication/WireAuthentication.docc/WireAuthentication.md b/WireAuthentication/WireAuthentication/WireAuthentication.docc/WireAuthentication.md new file mode 100644 index 00000000000..901d3ed8c8f --- /dev/null +++ b/WireAuthentication/WireAuthentication/WireAuthentication.docc/WireAuthentication.md @@ -0,0 +1,7 @@ +# ``WireAuthentication`` + +## Overview + +## Topics + +### Group diff --git a/WireAuthentication/WireAuthentication/WireAuthentication.h b/WireAuthentication/WireAuthentication/WireAuthentication.h new file mode 100644 index 00000000000..fb617d9e8ee --- /dev/null +++ b/WireAuthentication/WireAuthentication/WireAuthentication.h @@ -0,0 +1,29 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +#import + +//! Project version number for WireAuthentication. +FOUNDATION_EXPORT double WireAuthenticationVersionNumber; + +//! Project version string for WireAuthentication. +FOUNDATION_EXPORT const unsigned char WireAuthenticationVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/WireAuthentication/WireAuthenticationAPI/Sources/Use cases/DetermineAuthMethodUseCase.swift b/WireAuthentication/WireAuthenticationAPI/Sources/Use cases/DetermineAuthMethodUseCase.swift new file mode 100644 index 00000000000..bb79611c615 --- /dev/null +++ b/WireAuthentication/WireAuthenticationAPI/Sources/Use cases/DetermineAuthMethodUseCase.swift @@ -0,0 +1,35 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Foundation + +public protocol DetermineAuthMethodUseCaseProtocol { + + @MainActor + func invoke(emailOrSSOCode: String) async -> AuthenticationMethod + +} + +public enum AuthenticationMethod { + + case login(email: String) + case loginOrRegister(email: String) + case ssoLogin + case onPremLogin + +} diff --git a/WireAuthentication/WireAuthenticationAPI/Sources/Use cases/LoginViaEmailUseCase.swift b/WireAuthentication/WireAuthenticationAPI/Sources/Use cases/LoginViaEmailUseCase.swift new file mode 100644 index 00000000000..79cd296ddcd --- /dev/null +++ b/WireAuthentication/WireAuthenticationAPI/Sources/Use cases/LoginViaEmailUseCase.swift @@ -0,0 +1,38 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Foundation + +public protocol LoginViaEmailUseCaseProtocol: Sendable { + + func invoke( + email: String, + password: String + ) async throws(LoginViaEmailUseCaseFailure) + +} + +public enum LoginViaEmailUseCaseFailure: Error { + + case invalidCredentials + case verificationCodeRequired + case accountPendingActivation + case accountSuspended + case other(message: String) + +} diff --git a/WireAuthentication/WireAuthenticationAPI/WireAuthenticationAPI.docc/WireAuthenticationAPI.md b/WireAuthentication/WireAuthenticationAPI/WireAuthenticationAPI.docc/WireAuthenticationAPI.md new file mode 100644 index 00000000000..d0a7c27b1dd --- /dev/null +++ b/WireAuthentication/WireAuthenticationAPI/WireAuthenticationAPI.docc/WireAuthenticationAPI.md @@ -0,0 +1,7 @@ +# ``WireAuthenticationAPI`` + +## Overview + +## Topics + +### Group diff --git a/WireAuthentication/WireAuthenticationAPI/WireAuthenticationAPI.h b/WireAuthentication/WireAuthenticationAPI/WireAuthenticationAPI.h new file mode 100644 index 00000000000..93d7f53691c --- /dev/null +++ b/WireAuthentication/WireAuthenticationAPI/WireAuthenticationAPI.h @@ -0,0 +1,29 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +#import + +//! Project version number for WireAuthenticationAPI. +FOUNDATION_EXPORT double WireAuthenticationAPIVersionNumber; + +//! Project version string for WireAuthenticationAPI. +FOUNDATION_EXPORT const unsigned char WireAuthenticationAPIVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/WireAuthentication/WireAuthenticationLogic/Sources/DetermineAuthMethodUseCase.swift b/WireAuthentication/WireAuthenticationLogic/Sources/DetermineAuthMethodUseCase.swift new file mode 100644 index 00000000000..941b486fa70 --- /dev/null +++ b/WireAuthentication/WireAuthenticationLogic/Sources/DetermineAuthMethodUseCase.swift @@ -0,0 +1,33 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Foundation +import WireAuthenticationAPI + +// If we were using a Swift package, we should use the `package` access modifier here. + +public struct DetermineAuthMethodUseCase: DetermineAuthMethodUseCaseProtocol { + + public init() {} + + @MainActor + public func invoke(emailOrSSOCode: String) async -> AuthenticationMethod { + .login(email: emailOrSSOCode) + } + +} diff --git a/WireAuthentication/WireAuthenticationLogic/Sources/LoginViaEmailUseCase.swift b/WireAuthentication/WireAuthenticationLogic/Sources/LoginViaEmailUseCase.swift new file mode 100644 index 00000000000..e006916d2de --- /dev/null +++ b/WireAuthentication/WireAuthenticationLogic/Sources/LoginViaEmailUseCase.swift @@ -0,0 +1,33 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Foundation +import WireAuthenticationAPI + +public struct LoginViaEmailUseCase: LoginViaEmailUseCaseProtocol { + + typealias Failure = LoginViaEmailUseCaseFailure + + public init() {} + + public func invoke( + email: String, + password: String + ) async throws(LoginViaEmailUseCaseFailure) {} + +} diff --git a/WireAuthentication/WireAuthenticationLogic/WireAuthenticationLogic.docc/WireAuthenticationCore.md b/WireAuthentication/WireAuthenticationLogic/WireAuthenticationLogic.docc/WireAuthenticationCore.md new file mode 100644 index 00000000000..0710f9d5074 --- /dev/null +++ b/WireAuthentication/WireAuthenticationLogic/WireAuthenticationLogic.docc/WireAuthenticationCore.md @@ -0,0 +1,7 @@ +# ``WireAuthenticationLogic`` + +## Overview + +## Topics + +### Group diff --git a/WireAuthentication/WireAuthenticationLogic/WireAuthenticationLogic.h b/WireAuthentication/WireAuthenticationLogic/WireAuthenticationLogic.h new file mode 100644 index 00000000000..3cc8e6d558a --- /dev/null +++ b/WireAuthentication/WireAuthenticationLogic/WireAuthenticationLogic.h @@ -0,0 +1,29 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +#import + +//! Project version number for WireAuthenticationLogic. +FOUNDATION_EXPORT double WireAuthenticationLogicVersionNumber; + +//! Project version string for WireAuthenticationLogic. +FOUNDATION_EXPORT const unsigned char WireAuthenticationLogicVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/WireAuthentication/WireAuthenticationLogicTests/WireAuthenticationLogicTests.swift b/WireAuthentication/WireAuthenticationLogicTests/WireAuthenticationLogicTests.swift new file mode 100644 index 00000000000..cd837eec800 --- /dev/null +++ b/WireAuthentication/WireAuthenticationLogicTests/WireAuthenticationLogicTests.swift @@ -0,0 +1,48 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import XCTest +@testable import WireAuthenticationLogic + +final class WireAuthenticationLogicTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + // Any test you write for XCTest can be annotated as throws and async. + // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. + // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions + // afterwards. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/MockDependencies.swift b/WireAuthentication/WireAuthenticationUI/Sources/MockDependencies.swift new file mode 100644 index 00000000000..ad7f695f6f9 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/MockDependencies.swift @@ -0,0 +1,91 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Foundation +import WireAuthenticationAPI + +@MainActor +final class MockDependencies { + + private var rootViewModel: RootViewModel { + RootViewModel() + } + + var rootView: RootView { + RootView( + viewModel: rootViewModel, + builder: self + ) + } + +} + +extension MockDependencies: DetermineAuthMethodUseCaseProtocol { + + func invoke(emailOrSSOCode: String) async -> AuthenticationMethod { + .login(email: emailOrSSOCode) + } + +} + +extension MockDependencies: LoginViaEmailUseCaseProtocol { + + func invoke( + email: String, + password: String + ) async throws(LoginViaEmailUseCaseFailure) { + // Success + } + +} + +extension MockDependencies: DetermineAuthMethodBuilder { + + private var determineAuthMethodViewModel: DetermineAuthMethodViewModel { + DetermineAuthMethodViewModel( + router: rootViewModel, + determineAuthMethod: self + ) + } + + var determineAuthMethodView: DetermineAuthMethodView { + DetermineAuthMethodView( + viewModel: determineAuthMethodViewModel, + builder: self + ) + } + +} + +extension MockDependencies: LoginViaEmailBuilder { + + private func loginViewModel(email: String) -> LoginViaEmailViewModel { + LoginViaEmailViewModel( + router: rootViewModel, + loginViaEmailUseCase: self, + email: email + ) + } + + func loginViaEmailView(email: String) -> LoginViaEmailView { + LoginViaEmailView( + viewModel: loginViewModel(email: email) + ) + } + +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/DetermineAuthMethod/DetermineAuthMethodView.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/DetermineAuthMethod/DetermineAuthMethodView.swift new file mode 100644 index 00000000000..9e095eeba05 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/DetermineAuthMethod/DetermineAuthMethodView.swift @@ -0,0 +1,82 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import SwiftUI + +public protocol DetermineAuthMethodBuilder { + + @MainActor var determineAuthMethodView: DetermineAuthMethodView { get } + +} + +public struct DetermineAuthMethodView: View { + + @ObservedObject var viewModel: DetermineAuthMethodViewModel + + let builder: LoginViaEmailBuilder + + @State private var emailOrSSOCode = "" + + public init( + viewModel: DetermineAuthMethodViewModel, + builder: LoginViaEmailBuilder + ) { + self.viewModel = viewModel + self.builder = builder + } + + public var body: some View { + VStack(spacing: 20) { + Text("Wire").font(.largeTitle) + Text("Enter your email to start") + + TextField("Email or SSO Code", text: $emailOrSSOCode) + .textFieldStyle(.roundedBorder) + + Button("Next") { + viewModel.submitEmailOrSSOCode(emailOrSSOCode) + } + .disabled(!viewModel.isValidEmailOrSSOCode(emailOrSSOCode)) + + Text("By pressing on “Next”, you accept Wire’s Terms and Conditions") + .font(.caption) + .foregroundStyle(.secondary) + } + .padding() + .navigationDestination(for: Destination.self) { + switch $0 { + case let .login(email): + builder.loginViaEmailView(email: email) + case .loginOrRegister: + Color.red + } + } + } + + enum Destination: Hashable { + + case login(email: String) + case loginOrRegister(email: String) + + } + +} + +#Preview { + MockDependencies().determineAuthMethodView +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/DetermineAuthMethod/DetermineAuthMethodViewModel.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/DetermineAuthMethod/DetermineAuthMethodViewModel.swift new file mode 100644 index 00000000000..24c57f0f4e3 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/DetermineAuthMethod/DetermineAuthMethodViewModel.swift @@ -0,0 +1,61 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Combine +import Foundation +import SwiftUI +import WireAuthenticationAPI + +@MainActor +public final class DetermineAuthMethodViewModel: ObservableObject { + + let router: Router + let determineAuthMethod: any DetermineAuthMethodUseCaseProtocol + + public init( + router: Router, + determineAuthMethod: any DetermineAuthMethodUseCaseProtocol + ) { + self.router = router + self.determineAuthMethod = determineAuthMethod + } + + func isValidEmailOrSSOCode(_ emailOrSSOCode: String) -> Bool { + !emailOrSSOCode.isEmpty + } + + func submitEmailOrSSOCode(_ emailOrSSOCode: String) { + Task { [router] in + let method = await self.determineAuthMethod.invoke( + emailOrSSOCode: emailOrSSOCode + ) + + switch method { + case let .login(email): + router.navigate(to: DetermineAuthMethodView.Destination.login(email: email)) + + case let .loginOrRegister(email): + router.navigate(to: DetermineAuthMethodView.Destination.loginOrRegister(email: email)) + + default: + break + } + } + } + +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginOrRegisterViaEmail/LoginOrRegisterViaEmailView.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginOrRegisterViaEmail/LoginOrRegisterViaEmailView.swift new file mode 100644 index 00000000000..c67c86fe281 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginOrRegisterViaEmail/LoginOrRegisterViaEmailView.swift @@ -0,0 +1,33 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import SwiftUI + +struct LoginOrRegisterViaEmailView: View { + + @ObservedObject var viewModel: LoginOrRegisterViaEmailViewModel + + var body: some View { + Color.red + } + +} + +#Preview { + LoginOrRegisterViaEmailView(viewModel: LoginOrRegisterViaEmailViewModel()) +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginOrRegisterViaEmail/LoginOrRegisterViaEmailViewModel.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginOrRegisterViaEmail/LoginOrRegisterViaEmailViewModel.swift new file mode 100644 index 00000000000..822a1fedede --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginOrRegisterViaEmail/LoginOrRegisterViaEmailViewModel.swift @@ -0,0 +1,25 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Combine +import Foundation +import SwiftUI +import WireAuthenticationAPI + +@MainActor +public final class LoginOrRegisterViaEmailViewModel: ObservableObject {} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginViaEmail/LoginViaEmailView.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginViaEmail/LoginViaEmailView.swift new file mode 100644 index 00000000000..16f3fdb5d1d --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginViaEmail/LoginViaEmailView.swift @@ -0,0 +1,69 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import SwiftUI + +public protocol LoginViaEmailBuilder { + + @MainActor + func loginViaEmailView(email: String) -> LoginViaEmailView + +} + +public struct LoginViaEmailView: View { + + @ObservedObject var viewModel: LoginViaEmailViewModel + + @State private var password = "" + + public init( + viewModel: LoginViaEmailViewModel + ) { + self.viewModel = viewModel + } + + public var body: some View { + VStack(spacing: 20) { + TextField("", text: .constant(viewModel.email)) + .textFieldStyle(.roundedBorder) + .foregroundStyle(.secondary) + .disabled(true) + + SecureField("Password", text: $password) + .textFieldStyle(.roundedBorder) + + Button("Next") { + viewModel.submitPassword(password) + } + .disabled(!viewModel.isValidPassword(password)) + + Text("Forgot password?") + .underline() + + Spacer() + } + .navigationTitle("Enter your password to log in") + .navigationBarTitleDisplayMode(.inline) + .padding() + } + +} + +#Preview { + MockDependencies().loginViaEmailView(email: "foo@bar.com") +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginViaEmail/LoginViaEmailViewModel.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginViaEmail/LoginViaEmailViewModel.swift new file mode 100644 index 00000000000..e8f5596daab --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginViaEmail/LoginViaEmailViewModel.swift @@ -0,0 +1,59 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Combine +import Foundation +import SwiftUI +import WireAuthenticationAPI + +@MainActor +public final class LoginViaEmailViewModel: ObservableObject { + + let router: Router + let loginViaEmailUseCase: any LoginViaEmailUseCaseProtocol + + let email: String + + public init( + router: Router, + loginViaEmailUseCase: any LoginViaEmailUseCaseProtocol, + email: String + ) { + self.router = router + self.loginViaEmailUseCase = loginViaEmailUseCase + self.email = email + } + + func isValidPassword(_ password: String) -> Bool { + !password.isEmpty + } + + func submitPassword(_ password: String) { + Task { + do { + try await loginViaEmailUseCase.invoke( + email: email, + password: password + ) + } catch { + print("error: \(error)") + } + } + } + +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginViaSSO/LoginViaSSOView.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginViaSSO/LoginViaSSOView.swift new file mode 100644 index 00000000000..04c501f9813 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginViaSSO/LoginViaSSOView.swift @@ -0,0 +1,33 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import SwiftUI + +struct LoginViaSSOView: View { + + @ObservedObject var viewModel: LoginViaSSOViewModel + + var body: some View { + Color.red + } + +} + +#Preview { + LoginViaSSOView(viewModel: LoginViaSSOViewModel()) +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginViaSSO/LoginViaSSOViewModel.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginViaSSO/LoginViaSSOViewModel.swift new file mode 100644 index 00000000000..b637a59f453 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/LoginViaSSO/LoginViaSSOViewModel.swift @@ -0,0 +1,25 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Combine +import Foundation +import SwiftUI +import WireAuthenticationAPI + +@MainActor +public final class LoginViaSSOViewModel: ObservableObject {} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/NoHistory/NoHistoryView.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/NoHistory/NoHistoryView.swift new file mode 100644 index 00000000000..51d47eb8cda --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/NoHistory/NoHistoryView.swift @@ -0,0 +1,32 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import SwiftUI + +struct NoHistoryView: View { + + @ObservedObject var viewModel: NoHistoryViewModel + + var body: some View { + Color.red + } +} + +#Preview { + NoHistoryView(viewModel: NoHistoryViewModel()) +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/NoHistory/NoHistoryViewModel.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/NoHistory/NoHistoryViewModel.swift new file mode 100644 index 00000000000..45736e01be3 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/NoHistory/NoHistoryViewModel.swift @@ -0,0 +1,25 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Combine +import Foundation +import SwiftUI +import WireAuthenticationAPI + +@MainActor +public final class NoHistoryViewModel: ObservableObject {} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/VerifyLogin/VerifyLoginView.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/VerifyLogin/VerifyLoginView.swift new file mode 100644 index 00000000000..f2601a8ba31 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/VerifyLogin/VerifyLoginView.swift @@ -0,0 +1,32 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import SwiftUI + +struct VerifyLoginView: View { + + @ObservedObject var viewModel: VerifyLoginViewModel + + var body: some View { + Color.red + } +} + +#Preview { + VerifyLoginView(viewModel: VerifyLoginViewModel()) +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/VerifyLogin/VerifyLoginViewModel.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/VerifyLogin/VerifyLoginViewModel.swift new file mode 100644 index 00000000000..f6a6c565499 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Login/VerifyLogin/VerifyLoginViewModel.swift @@ -0,0 +1,25 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Combine +import Foundation +import SwiftUI +import WireAuthenticationAPI + +@MainActor +public final class VerifyLoginViewModel: ObservableObject {} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountName/SetAccountNameView.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountName/SetAccountNameView.swift new file mode 100644 index 00000000000..2ec73693df5 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountName/SetAccountNameView.swift @@ -0,0 +1,32 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import SwiftUI + +struct SetAccountNameView: View { + + @ObservedObject var viewModel: SetAccountNameViewModel + + var body: some View { + Color.red + } +} + +#Preview { + SetAccountNameView(viewModel: SetAccountNameViewModel()) +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountName/SetAccountNameViewModel.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountName/SetAccountNameViewModel.swift new file mode 100644 index 00000000000..96841637bd7 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountName/SetAccountNameViewModel.swift @@ -0,0 +1,25 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Combine +import Foundation +import SwiftUI +import WireAuthenticationAPI + +@MainActor +public final class SetAccountNameViewModel: ObservableObject {} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountPassword/SetAccountPasswordView.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountPassword/SetAccountPasswordView.swift new file mode 100644 index 00000000000..72f63683492 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountPassword/SetAccountPasswordView.swift @@ -0,0 +1,32 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import SwiftUI + +struct SetAccountPasswordView: View { + + @ObservedObject var viewModel: SetAccountPasswordViewModel + + var body: some View { + Color.red + } +} + +#Preview { + SetAccountPasswordView(viewModel: SetAccountPasswordViewModel()) +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountPassword/SetAccountPasswordViewModel.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountPassword/SetAccountPasswordViewModel.swift new file mode 100644 index 00000000000..b90ebe146fb --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountPassword/SetAccountPasswordViewModel.swift @@ -0,0 +1,25 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Combine +import Foundation +import SwiftUI +import WireAuthenticationAPI + +@MainActor +public final class SetAccountPasswordViewModel: ObservableObject {} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountUsername/SetAccountUsernameView.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountUsername/SetAccountUsernameView.swift new file mode 100644 index 00000000000..986f0a9dc06 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountUsername/SetAccountUsernameView.swift @@ -0,0 +1,32 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import SwiftUI + +struct SetAccountUsernameView: View { + + @ObservedObject var viewModel: SetAccountUsernameViewModel + + var body: some View { + Color.red + } +} + +#Preview { + SetAccountUsernameView(viewModel: SetAccountUsernameViewModel()) +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountUsername/SetAccountUsernameViewModel.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountUsername/SetAccountUsernameViewModel.swift new file mode 100644 index 00000000000..bc1bf4fefa3 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Registration/SetAccountUsername/SetAccountUsernameViewModel.swift @@ -0,0 +1,25 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Combine +import Foundation +import SwiftUI +import WireAuthenticationAPI + +@MainActor +public final class SetAccountUsernameViewModel: ObservableObject {} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Root/RootView.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Root/RootView.swift new file mode 100644 index 00000000000..49c8129c5e1 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Root/RootView.swift @@ -0,0 +1,46 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import SwiftUI +import WireAuthenticationAPI + +public struct RootView: View { + + @ObservedObject var viewModel: RootViewModel + + let builder: DetermineAuthMethodBuilder + + public init( + viewModel: RootViewModel, + builder: DetermineAuthMethodBuilder + ) { + self.viewModel = viewModel + self.builder = builder + } + + public var body: some View { + NavigationStack(path: $viewModel.path) { + builder.determineAuthMethodView + } + } + +} + +#Preview { + MockDependencies().rootView +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Root/RootViewModel.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Root/RootViewModel.swift new file mode 100644 index 00000000000..99a3c07cd95 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Root/RootViewModel.swift @@ -0,0 +1,39 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Combine +import Foundation +import SwiftUI +import WireAuthenticationAPI + +@MainActor +public final class RootViewModel: ObservableObject, Router { + + @Published var path = NavigationPath() + + public init() {} + + public func popToRoot() { + path.removeLast(path.count) + } + + public func navigate(to destination: some Hashable) { + path.append(destination) + } + +} diff --git a/WireAuthentication/WireAuthenticationUI/Sources/Views/Root/Router.swift b/WireAuthentication/WireAuthenticationUI/Sources/Views/Root/Router.swift new file mode 100644 index 00000000000..7bf34819b39 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/Sources/Views/Root/Router.swift @@ -0,0 +1,30 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import Combine +import Foundation +import SwiftUI + +@MainActor +public protocol Router { + + func popToRoot() + + func navigate(to destination: Destination) + +} diff --git a/WireAuthentication/WireAuthenticationUI/WireAuthenticationUI.docc/WireAuthenticationUI.md b/WireAuthentication/WireAuthenticationUI/WireAuthenticationUI.docc/WireAuthenticationUI.md new file mode 100644 index 00000000000..3639dd9b3ff --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/WireAuthenticationUI.docc/WireAuthenticationUI.md @@ -0,0 +1,8 @@ +# ``WireAuthenticationUI`` + +## Overview + +## Topics + +### Group + diff --git a/WireAuthentication/WireAuthenticationUI/WireAuthenticationUI.h b/WireAuthentication/WireAuthenticationUI/WireAuthenticationUI.h new file mode 100644 index 00000000000..9cdfd582fa3 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUI/WireAuthenticationUI.h @@ -0,0 +1,29 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +#import + +//! Project version number for WireAuthenticationUI. +FOUNDATION_EXPORT double WireAuthenticationUIVersionNumber; + +//! Project version string for WireAuthenticationUI. +FOUNDATION_EXPORT const unsigned char WireAuthenticationUIVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/WireAuthentication/WireAuthenticationUITests/WireAuthenticationUITests.swift b/WireAuthentication/WireAuthenticationUITests/WireAuthenticationUITests.swift new file mode 100644 index 00000000000..62faf212b85 --- /dev/null +++ b/WireAuthentication/WireAuthenticationUITests/WireAuthenticationUITests.swift @@ -0,0 +1,48 @@ +// +// Wire +// Copyright (C) 2025 Wire Swiss GmbH +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see http://www.gnu.org/licenses/. +// + +import XCTest +@testable import WireAuthenticationUI + +final class WireAuthenticationUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + // Any test you write for XCTest can be annotated as throws and async. + // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. + // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions + // afterwards. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/wire-ios-mono.xcworkspace/contents.xcworkspacedata b/wire-ios-mono.xcworkspace/contents.xcworkspacedata index 029bef06838..62532c5d5b0 100644 --- a/wire-ios-mono.xcworkspace/contents.xcworkspacedata +++ b/wire-ios-mono.xcworkspace/contents.xcworkspacedata @@ -140,6 +140,9 @@ + + diff --git a/wire-ios-mono.xcworkspace/xcshareddata/swiftpm/Package.resolved b/wire-ios-mono.xcworkspace/xcshareddata/swiftpm/Package.resolved index 6d68ffbea4c..ef3ffdb8598 100644 --- a/wire-ios-mono.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/wire-ios-mono.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -73,6 +73,15 @@ "version": "6.0.1" } }, + { + "package": "NeedleFoundation", + "repositoryURL": "https://github.com/uber/needle.git", + "state": { + "branch": null, + "revision": "69f7a889d2736f2621c6083ac29e0a75d158f249", + "version": "0.25.1" + } + }, { "package": "opentelemetry-swift", "repositoryURL": "https://github.com/DataDog/opentelemetry-swift-packages.git",