Update demo

This commit is contained in:
Daniel Saidi 2022-06-20 15:24:29 +02:00
parent dbb1df6942
commit 9f9d8e45f2
8 changed files with 105 additions and 107 deletions

View File

@ -16,8 +16,6 @@
A90CD6B3257E2E6E008A1749 /* DeviceScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A90CD6B2257E2E6E008A1749 /* DeviceScreen.swift */; };
A90CD6B7257E3343008A1749 /* DeviceIdentifierScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A90CD6B6257E3343008A1749 /* DeviceIdentifierScreen.swift */; };
A90CD6BA257E334A008A1749 /* DeviceIdentifierScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A90CD6B6257E3343008A1749 /* DeviceIdentifierScreen.swift */; };
A917E308261C41AE00745DB2 /* SwiftKit in Frameworks */ = {isa = PBXBuildFile; productRef = A917E307261C41AE00745DB2 /* SwiftKit */; };
A917E30C261C41B500745DB2 /* SwiftKit in Frameworks */ = {isa = PBXBuildFile; productRef = A917E30B261C41B500745DB2 /* SwiftKit */; };
A9544BD62571CBC900522141 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544BC32571CBC800522141 /* DemoApp.swift */; };
A9544BD72571CBC900522141 /* DemoApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544BC32571CBC800522141 /* DemoApp.swift */; };
A9544BD82571CBC900522141 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544BC42571CBC800522141 /* ContentView.swift */; };
@ -38,6 +36,8 @@
A9544D702574C81700522141 /* Base64StringCoderScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544D6F2574C81700522141 /* Base64StringCoderScreen.swift */; };
A9544D742574C82300522141 /* StandardCsvParserScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544D732574C82300522141 /* StandardCsvParserScreen.swift */; };
A9544D782574CAFC00522141 /* Persons.csv in Resources */ = {isa = PBXBuildFile; fileRef = A9544D772574CAFC00522141 /* Persons.csv */; };
A971DC532860ABEE00F30DEF /* SwiftKit in Frameworks */ = {isa = PBXBuildFile; productRef = A971DC522860ABEE00F30DEF /* SwiftKit */; };
A971DC552860ABF200F30DEF /* SwiftKit in Frameworks */ = {isa = PBXBuildFile; productRef = A971DC542860ABF200F30DEF /* SwiftKit */; };
A982781B257E523B0006D64F /* ExtensionsScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982781A257E523B0006D64F /* ExtensionsScreen.swift */; };
A982781E257E52680006D64F /* ExtensionsScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982781A257E523B0006D64F /* ExtensionsScreen.swift */; };
A9827825257E53510006D64F /* FilesScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827824257E53510006D64F /* FilesScreen.swift */; };
@ -62,8 +62,6 @@
A9827872257E5DE80006D64F /* WorldCoordinateScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827870257E5DE80006D64F /* WorldCoordinateScreen.swift */; };
A9827876257E5E0E0006D64F /* ExternalMapServicesScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827875257E5E0E0006D64F /* ExternalMapServicesScreen.swift */; };
A9827877257E5E0E0006D64F /* ExternalMapServicesScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827875257E5E0E0006D64F /* ExternalMapServicesScreen.swift */; };
A982787C257E65850006D64F /* IoCScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982787B257E65850006D64F /* IoCScreen.swift */; };
A982787D257E65850006D64F /* IoCScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982787B257E65850006D64F /* IoCScreen.swift */; };
A9827885257E67080006D64F /* KeychainScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827884257E67080006D64F /* KeychainScreen.swift */; };
A9827886257E67080006D64F /* KeychainScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827884257E67080006D64F /* KeychainScreen.swift */; };
A982788C257E67660006D64F /* KeychainServiceScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982788B257E67660006D64F /* KeychainServiceScreen.swift */; };
@ -113,6 +111,7 @@
A9544D6F2574C81700522141 /* Base64StringCoderScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Base64StringCoderScreen.swift; sourceTree = "<group>"; };
A9544D732574C82300522141 /* StandardCsvParserScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StandardCsvParserScreen.swift; sourceTree = "<group>"; };
A9544D772574CAFC00522141 /* Persons.csv */ = {isa = PBXFileReference; lastKnownFileType = text; path = Persons.csv; sourceTree = "<group>"; };
A971DC512860ABD600F30DEF /* swiftkit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = swiftkit; path = ..; sourceTree = "<group>"; };
A982781A257E523B0006D64F /* ExtensionsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionsScreen.swift; sourceTree = "<group>"; };
A9827824257E53510006D64F /* FilesScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilesScreen.swift; sourceTree = "<group>"; };
A982783A257E55000006D64F /* FileFinderScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileFinderScreen.swift; sourceTree = "<group>"; };
@ -125,7 +124,6 @@
A9827869257E5D550006D64F /* GeoScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeoScreen.swift; sourceTree = "<group>"; };
A9827870257E5DE80006D64F /* WorldCoordinateScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldCoordinateScreen.swift; sourceTree = "<group>"; };
A9827875257E5E0E0006D64F /* ExternalMapServicesScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExternalMapServicesScreen.swift; sourceTree = "<group>"; };
A982787B257E65850006D64F /* IoCScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IoCScreen.swift; sourceTree = "<group>"; };
A9827884257E67080006D64F /* KeychainScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainScreen.swift; sourceTree = "<group>"; };
A982788B257E67660006D64F /* KeychainServiceScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainServiceScreen.swift; sourceTree = "<group>"; };
A9827891257E73D40006D64F /* LocalizationScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizationScreen.swift; sourceTree = "<group>"; };
@ -144,7 +142,7 @@
buildActionMask = 2147483647;
files = (
A9544D53257455CA00522141 /* SwiftUIKit in Frameworks */,
A917E308261C41AE00745DB2 /* SwiftKit in Frameworks */,
A971DC532860ABEE00F30DEF /* SwiftKit in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -153,7 +151,7 @@
buildActionMask = 2147483647;
files = (
A9544D58257455DA00522141 /* SwiftUIKit in Frameworks */,
A917E30C261C41B500745DB2 /* SwiftKit in Frameworks */,
A971DC552860ABF200F30DEF /* SwiftKit in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -180,6 +178,7 @@
A9544BBD2571CBC800522141 = {
isa = PBXGroup;
children = (
A971DC502860ABD600F30DEF /* Packages */,
A9544BCC2571CBC900522141 /* iOS */,
A9544BD32571CBC900522141 /* macOS */,
A9544BC22571CBC800522141 /* Shared */,
@ -200,7 +199,6 @@
A9827819257E522E0006D64F /* Extensions */,
A9827823257E53440006D64F /* Files */,
A9827868257E5D4B0006D64F /* Geo */,
A982787A257E65750006D64F /* IoC */,
A9827882257E66F20006D64F /* Keychain */,
A9827890257E73C80006D64F /* Localization */,
A98278B4257E7AB50006D64F /* Network */,
@ -300,6 +298,14 @@
path = Data;
sourceTree = "<group>";
};
A971DC502860ABD600F30DEF /* Packages */ = {
isa = PBXGroup;
children = (
A971DC512860ABD600F30DEF /* swiftkit */,
);
name = Packages;
sourceTree = "<group>";
};
A9827819257E522E0006D64F /* Extensions */ = {
isa = PBXGroup;
children = (
@ -340,14 +346,6 @@
path = Geo;
sourceTree = "<group>";
};
A982787A257E65750006D64F /* IoC */ = {
isa = PBXGroup;
children = (
A982787B257E65850006D64F /* IoCScreen.swift */,
);
path = IoC;
sourceTree = "<group>";
};
A9827882257E66F20006D64F /* Keychain */ = {
isa = PBXGroup;
children = (
@ -410,7 +408,7 @@
name = "Demo (iOS)";
packageProductDependencies = (
A9544D52257455CA00522141 /* SwiftUIKit */,
A917E307261C41AE00745DB2 /* SwiftKit */,
A971DC522860ABEE00F30DEF /* SwiftKit */,
);
productName = "Demo (iOS)";
productReference = A9544BCA2571CBC900522141 /* Demo.app */;
@ -431,7 +429,7 @@
name = "Demo (macOS)";
packageProductDependencies = (
A9544D57257455DA00522141 /* SwiftUIKit */,
A917E30B261C41B500745DB2 /* SwiftKit */,
A971DC542860ABF200F30DEF /* SwiftKit */,
);
productName = "Demo (macOS)";
productReference = A9544BD22571CBC900522141 /* Demo.app */;
@ -467,7 +465,6 @@
mainGroup = A9544BBD2571CBC800522141;
packageReferences = (
A9544D51257455CA00522141 /* XCRemoteSwiftPackageReference "SwiftUIKit" */,
A917E306261C41AE00745DB2 /* XCRemoteSwiftPackageReference "SwiftKit" */,
);
productRefGroup = A9544BCB2571CBC900522141 /* Products */;
projectDirPath = "";
@ -552,7 +549,6 @@
A9544D5F2574C51A00522141 /* DataScreen.swift in Sources */,
A9827892257E73D40006D64F /* LocalizationScreen.swift in Sources */,
A90CD6A3257E2403008A1749 /* DateScreen.swift in Sources */,
A982787C257E65850006D64F /* IoCScreen.swift in Sources */,
A982788C257E67660006D64F /* KeychainServiceScreen.swift in Sources */,
A982781B257E523B0006D64F /* ExtensionsScreen.swift in Sources */,
A9827897257E74040006D64F /* LocalizationServiceScreen.swift in Sources */,
@ -580,7 +576,6 @@
A982788D257E67660006D64F /* KeychainServiceScreen.swift in Sources */,
A98278D4257E83250006D64F /* Color+Demo.swift in Sources */,
A982781E257E52680006D64F /* ExtensionsScreen.swift in Sources */,
A982787D257E65850006D64F /* IoCScreen.swift in Sources */,
A982783C257E55000006D64F /* FileFinderScreen.swift in Sources */,
A9827835257E54EA0006D64F /* FilesScreen.swift in Sources */,
A98278BD257E7B3D0006D64F /* ServicesScreen.swift in Sources */,
@ -858,35 +853,17 @@
/* End XCConfigurationList section */
/* Begin XCRemoteSwiftPackageReference section */
A917E306261C41AE00745DB2 /* XCRemoteSwiftPackageReference "SwiftKit" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/danielsaidi/SwiftKit.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.7.0;
};
};
A9544D51257455CA00522141 /* XCRemoteSwiftPackageReference "SwiftUIKit" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/danielsaidi/SwiftUIKit.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 2.2.0;
minimumVersion = 2.7.0;
};
};
/* End XCRemoteSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
A917E307261C41AE00745DB2 /* SwiftKit */ = {
isa = XCSwiftPackageProductDependency;
package = A917E306261C41AE00745DB2 /* XCRemoteSwiftPackageReference "SwiftKit" */;
productName = SwiftKit;
};
A917E30B261C41B500745DB2 /* SwiftKit */ = {
isa = XCSwiftPackageProductDependency;
package = A917E306261C41AE00745DB2 /* XCRemoteSwiftPackageReference "SwiftKit" */;
productName = SwiftKit;
};
A9544D52257455CA00522141 /* SwiftUIKit */ = {
isa = XCSwiftPackageProductDependency;
package = A9544D51257455CA00522141 /* XCRemoteSwiftPackageReference "SwiftUIKit" */;
@ -897,6 +874,14 @@
package = A9544D51257455CA00522141 /* XCRemoteSwiftPackageReference "SwiftUIKit" */;
productName = SwiftUIKit;
};
A971DC522860ABEE00F30DEF /* SwiftKit */ = {
isa = XCSwiftPackageProductDependency;
productName = SwiftKit;
};
A971DC542860ABF200F30DEF /* SwiftKit */ = {
isa = XCSwiftPackageProductDependency;
productName = SwiftKit;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = A9544BBE2571CBC800522141 /* Project object */;

View File

@ -1,25 +1,68 @@
{
"object": {
"pins": [
{
"package": "SwiftKit",
"repositoryURL": "https://github.com/danielsaidi/SwiftKit.git",
"state": {
"branch": null,
"revision": "3cd5182ee809194d0cc17b649daa2e6dca94871b",
"version": "0.7.0"
}
},
{
"package": "SwiftUIKit",
"repositoryURL": "https://github.com/danielsaidi/SwiftUIKit.git",
"state": {
"branch": null,
"revision": "7b38050373c6aafdaefe32a6fcfb8843b443a6d8",
"version": "2.2.0"
}
"pins" : [
{
"identity" : "cwlcatchexception",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlCatchException.git",
"state" : {
"revision" : "35f9e770f54ce62dd8526470f14c6e137cef3eea",
"version" : "2.1.1"
}
]
},
"version": 1
},
{
"identity" : "cwlpreconditiontesting",
"kind" : "remoteSourceControl",
"location" : "https://github.com/mattgallagher/CwlPreconditionTesting.git",
"state" : {
"revision" : "c21f7bab5ca8eee0a9998bbd17ca1d0eb45d4688",
"version" : "2.1.0"
}
},
{
"identity" : "mockingkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/danielsaidi/MockingKit.git",
"state" : {
"revision" : "3e51adb1a3922cdccbe84a3088b7fa4d67ae236d",
"version" : "1.1.0"
}
},
{
"identity" : "nimble",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Nimble.git",
"state" : {
"revision" : "1f3bde57bde12f5e7b07909848c071e9b73d6edc",
"version" : "10.0.0"
}
},
{
"identity" : "quick",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Quick/Quick.git",
"state" : {
"revision" : "f9d519828bb03dfc8125467d8f7b93131951124c",
"version" : "5.0.1"
}
},
{
"identity" : "swift-docc-plugin",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-docc-plugin",
"state" : {
"revision" : "3303b164430d9a7055ba484c8ead67a52f7b74f6",
"version" : "1.0.0"
}
},
{
"identity" : "swiftuikit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/danielsaidi/SwiftUIKit.git",
"state" : {
"revision" : "ab6ef570c7c8100b98693394417a9905c925ccae",
"version" : "2.7.0"
}
}
],
"version" : 2
}

View File

@ -28,7 +28,7 @@ struct BiometricAuthenticationServiceScreen: View {
Label("Perform authentication", image: .authentication)
}
}
}.alert(context: alertContext)
}.alert(alertContext)
}
}

View File

@ -33,7 +33,7 @@ struct CachedAuthenticationServiceProxyScreen: View {
}
}
}
.alert(context: alertContext)
.alert(alertContext)
.navigationTitle("Cached Authentication")
}
}

View File

@ -51,9 +51,6 @@ private extension ContentView {
ListNavigationLink(destination: GeoScreen()) {
Label("Geo", image: .globe)
}
ListNavigationLink(destination: IoCScreen()) {
Label("IoC", image: .ioc)
}
ListNavigationLink(destination: KeychainScreen()) {
Label("Keychain", image: .key)
}

View File

@ -1,33 +0,0 @@
//
// IoCScreen.swift
// Demo
//
// Created by Daniel Saidi on 2020-12-07.
// Copyright © 2020 Daniel Saidi. All rights reserved.
//
import SwiftUI
import SwiftUIKit
struct IoCScreen: View {
var body: some View {
List {
Section(header: Text("About")) {
ListText("""
SwiftKit has utils that simplifies implementing IoC (inversion of control) and DI (dependency injection) in your apps.
These utils are not in the demo, though, so have a look att the source code.
""")
}
}.navigationTitle("IoC")
}
}
struct IoCScreen_Previews: PreviewProvider {
static var previews: some View {
NavigationView {
IoCScreen()
}
}
}

View File

@ -9,18 +9,24 @@
import Foundation
/**
This struct represents a unique authentication.
This struct represents a unique authentication type.
This struct currently only has an ``id``, but is still used
to improve the authentication info without having to change
any authentication protocols.
The struct only has an ``id``, but is still used to improve
authentication without having to change any protocols.
*/
public struct Authentication {
public struct Authentication: Identifiable, Equatable {
/**
Create a new authentication type.
- Parameters:
- id: The ID of the authentication.
*/
public init (id: String) {
self.id = id
}
/// The ID of the authentication.
public var id: String
}