diff --git a/Demo/.swiftlint.yml b/Demo/.swiftlint.yml deleted file mode 100644 index 2b13475..0000000 --- a/Demo/.swiftlint.yml +++ /dev/null @@ -1,12 +0,0 @@ -disabled_rules: - - identifier_name - - line_length - - nesting - - todo - - trailing_whitespace - - type_name - - vertical_whitespace - -included: - - ../Sources - - ../Tests diff --git a/Demo/Demo.xcodeproj/project.pbxproj b/Demo/Demo.xcodeproj/project.pbxproj deleted file mode 100644 index 62bd4ce..0000000 --- a/Demo/Demo.xcodeproj/project.pbxproj +++ /dev/null @@ -1,888 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 52; - objects = { - -/* Begin PBXBuildFile section */ - A90CD6A3257E2403008A1749 /* DateScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A90CD6A2257E2403008A1749 /* DateScreen.swift */; }; - A90CD6A8257E2412008A1749 /* DateScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A90CD6A2257E2403008A1749 /* DateScreen.swift */; }; - A90CD6AB257E241B008A1749 /* Persons.csv in Resources */ = {isa = PBXBuildFile; fileRef = A9544D772574CAFC00522141 /* Persons.csv */; }; - A90CD6AC257E241B008A1749 /* DataScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544D5E2574C51A00522141 /* DataScreen.swift */; }; - A90CD6AD257E241B008A1749 /* Base64StringCoderScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544D6F2574C81700522141 /* Base64StringCoderScreen.swift */; }; - A90CD6AE257E241B008A1749 /* StandardCsvParserScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544D732574C82300522141 /* StandardCsvParserScreen.swift */; }; - 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 */; }; - 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 */; }; - A9544BD92571CBC900522141 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544BC42571CBC800522141 /* ContentView.swift */; }; - A9544BDA2571CBC900522141 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A9544BC52571CBC900522141 /* Assets.xcassets */; }; - A9544BDB2571CBC900522141 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A9544BC52571CBC900522141 /* Assets.xcassets */; }; - A9544C0F2571CD6B00522141 /* Image+Demo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544C0E2571CD6B00522141 /* Image+Demo.swift */; }; - A9544C102571CD6B00522141 /* Image+Demo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544C0E2571CD6B00522141 /* Image+Demo.swift */; }; - A9544D3B2574446A00522141 /* AuthenticationScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544D3A2574446A00522141 /* AuthenticationScreen.swift */; }; - A9544D3C2574446A00522141 /* AuthenticationScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544D3A2574446A00522141 /* AuthenticationScreen.swift */; }; - A9544D42257444DE00522141 /* BiometricAuthenticationServiceScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544D41257444DE00522141 /* BiometricAuthenticationServiceScreen.swift */; }; - A9544D43257444DE00522141 /* BiometricAuthenticationServiceScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544D41257444DE00522141 /* BiometricAuthenticationServiceScreen.swift */; }; - A9544D492574450600522141 /* CachedAuthenticationServiceProxyScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544D482574450600522141 /* CachedAuthenticationServiceProxyScreen.swift */; }; - A9544D4A2574450600522141 /* CachedAuthenticationServiceProxyScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544D482574450600522141 /* CachedAuthenticationServiceProxyScreen.swift */; }; - A9544D53257455CA00522141 /* SwiftUIKit in Frameworks */ = {isa = PBXBuildFile; productRef = A9544D52257455CA00522141 /* SwiftUIKit */; }; - A9544D58257455DA00522141 /* SwiftUIKit in Frameworks */ = {isa = PBXBuildFile; productRef = A9544D57257455DA00522141 /* SwiftUIKit */; }; - A9544D5F2574C51A00522141 /* DataScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9544D5E2574C51A00522141 /* DataScreen.swift */; }; - 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 */; }; - A9827835257E54EA0006D64F /* FilesScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827824257E53510006D64F /* FilesScreen.swift */; }; - A982783B257E55000006D64F /* FileFinderScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982783A257E55000006D64F /* FileFinderScreen.swift */; }; - A982783C257E55000006D64F /* FileFinderScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982783A257E55000006D64F /* FileFinderScreen.swift */; }; - A9827840257E550B0006D64F /* DirectoryServiceScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982783F257E550B0006D64F /* DirectoryServiceScreen.swift */; }; - A9827841257E550B0006D64F /* DirectoryServiceScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982783F257E550B0006D64F /* DirectoryServiceScreen.swift */; }; - A9827848257E5B060006D64F /* File1.txt in Resources */ = {isa = PBXBuildFile; fileRef = A9827847257E5B060006D64F /* File1.txt */; }; - A9827849257E5B060006D64F /* File1.txt in Resources */ = {isa = PBXBuildFile; fileRef = A9827847257E5B060006D64F /* File1.txt */; }; - A9827850257E5B2A0006D64F /* File5.jpg in Resources */ = {isa = PBXBuildFile; fileRef = A982784C257E5B290006D64F /* File5.jpg */; }; - A9827851257E5B2A0006D64F /* File5.jpg in Resources */ = {isa = PBXBuildFile; fileRef = A982784C257E5B290006D64F /* File5.jpg */; }; - A9827852257E5B2A0006D64F /* File4.txt in Resources */ = {isa = PBXBuildFile; fileRef = A982784D257E5B290006D64F /* File4.txt */; }; - A9827853257E5B2A0006D64F /* File4.txt in Resources */ = {isa = PBXBuildFile; fileRef = A982784D257E5B290006D64F /* File4.txt */; }; - A9827854257E5B2A0006D64F /* File2.pdf in Resources */ = {isa = PBXBuildFile; fileRef = A982784E257E5B290006D64F /* File2.pdf */; }; - A9827855257E5B2A0006D64F /* File2.pdf in Resources */ = {isa = PBXBuildFile; fileRef = A982784E257E5B290006D64F /* File2.pdf */; }; - A9827856257E5B2A0006D64F /* File3.gif in Resources */ = {isa = PBXBuildFile; fileRef = A982784F257E5B2A0006D64F /* File3.gif */; }; - A9827857257E5B2A0006D64F /* File3.gif in Resources */ = {isa = PBXBuildFile; fileRef = A982784F257E5B2A0006D64F /* File3.gif */; }; - A982786A257E5D550006D64F /* GeoScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827869257E5D550006D64F /* GeoScreen.swift */; }; - A982786B257E5D550006D64F /* GeoScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827869257E5D550006D64F /* GeoScreen.swift */; }; - A9827871257E5DE80006D64F /* WorldCoordinateScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827870257E5DE80006D64F /* WorldCoordinateScreen.swift */; }; - 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 */; }; - 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 */; }; - A982788D257E67660006D64F /* KeychainServiceScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982788B257E67660006D64F /* KeychainServiceScreen.swift */; }; - A9827892257E73D40006D64F /* LocalizationScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827891257E73D40006D64F /* LocalizationScreen.swift */; }; - A9827893257E73D40006D64F /* LocalizationScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827891257E73D40006D64F /* LocalizationScreen.swift */; }; - A9827897257E74040006D64F /* LocalizationServiceScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827896257E74040006D64F /* LocalizationServiceScreen.swift */; }; - A9827898257E74040006D64F /* LocalizationServiceScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9827896257E74040006D64F /* LocalizationServiceScreen.swift */; }; - A982789C257E740E0006D64F /* TranslatorScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982789B257E740E0006D64F /* TranslatorScreen.swift */; }; - A982789D257E740E0006D64F /* TranslatorScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A982789B257E740E0006D64F /* TranslatorScreen.swift */; }; - A98278A0257E74440006D64F /* DeviceScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A90CD6B2257E2E6E008A1749 /* DeviceScreen.swift */; }; - A98278A8257E76940006D64F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A98278AB257E76940006D64F /* Localizable.strings */; }; - A98278A9257E76940006D64F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A98278AB257E76940006D64F /* Localizable.strings */; }; - A98278B6257E7AC20006D64F /* NetworkScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98278B5257E7AC20006D64F /* NetworkScreen.swift */; }; - A98278B7257E7AC20006D64F /* NetworkScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98278B5257E7AC20006D64F /* NetworkScreen.swift */; }; - A98278BC257E7B3D0006D64F /* ServicesScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98278BB257E7B3D0006D64F /* ServicesScreen.swift */; }; - A98278BD257E7B3D0006D64F /* ServicesScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98278BB257E7B3D0006D64F /* ServicesScreen.swift */; }; - A98278D3257E83250006D64F /* Color+Demo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98278D2257E83250006D64F /* Color+Demo.swift */; }; - A98278D4257E83250006D64F /* Color+Demo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A98278D2257E83250006D64F /* Color+Demo.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - A90CD6A2257E2403008A1749 /* DateScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateScreen.swift; sourceTree = ""; }; - A90CD6B2257E2E6E008A1749 /* DeviceScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceScreen.swift; sourceTree = ""; }; - A90CD6B6257E3343008A1749 /* DeviceIdentifierScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceIdentifierScreen.swift; sourceTree = ""; }; - A9544BC32571CBC800522141 /* DemoApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoApp.swift; sourceTree = ""; }; - A9544BC42571CBC800522141 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; - A9544BC52571CBC900522141 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - A9544BCA2571CBC900522141 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - A9544BCD2571CBC900522141 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A9544BD22571CBC900522141 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - A9544BD42571CBC900522141 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - A9544BD52571CBC900522141 /* macOS.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = macOS.entitlements; sourceTree = ""; }; - A9544BEB2571CC4900522141 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; - A9544BEC2571CC4900522141 /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Package.swift; path = ../Package.swift; sourceTree = ""; }; - A9544BED2571CC4900522141 /* Release Notes.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = "Release Notes.md"; path = "../Release Notes.md"; sourceTree = ""; }; - A9544BEE2571CC4900522141 /* Package.resolved */ = {isa = PBXFileReference; lastKnownFileType = text; name = Package.resolved; path = ../Package.resolved; sourceTree = ""; }; - A9544BEF2571CC4900522141 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; - A9544BF02571CC4900522141 /* DSSwiftKit.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; name = DSSwiftKit.podspec; path = ../DSSwiftKit.podspec; sourceTree = ""; }; - A9544BF12571CC5800522141 /* .swiftlint.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; name = .swiftlint.yml; path = ../.swiftlint.yml; sourceTree = ""; }; - A9544BF22571CC5800522141 /* .gitignore */ = {isa = PBXFileReference; lastKnownFileType = text; name = .gitignore; path = ../.gitignore; sourceTree = ""; }; - A9544C0E2571CD6B00522141 /* Image+Demo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Image+Demo.swift"; sourceTree = ""; }; - A9544D3A2574446A00522141 /* AuthenticationScreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AuthenticationScreen.swift; sourceTree = ""; }; - A9544D41257444DE00522141 /* BiometricAuthenticationServiceScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BiometricAuthenticationServiceScreen.swift; sourceTree = ""; }; - A9544D482574450600522141 /* CachedAuthenticationServiceProxyScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CachedAuthenticationServiceProxyScreen.swift; sourceTree = ""; }; - A9544D5E2574C51A00522141 /* DataScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataScreen.swift; sourceTree = ""; }; - A9544D6F2574C81700522141 /* Base64StringCoderScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Base64StringCoderScreen.swift; sourceTree = ""; }; - A9544D732574C82300522141 /* StandardCsvParserScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StandardCsvParserScreen.swift; sourceTree = ""; }; - A9544D772574CAFC00522141 /* Persons.csv */ = {isa = PBXFileReference; lastKnownFileType = text; path = Persons.csv; sourceTree = ""; }; - A971DC512860ABD600F30DEF /* swiftkit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = swiftkit; path = ..; sourceTree = ""; }; - A982781A257E523B0006D64F /* ExtensionsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionsScreen.swift; sourceTree = ""; }; - A9827824257E53510006D64F /* FilesScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FilesScreen.swift; sourceTree = ""; }; - A982783A257E55000006D64F /* FileFinderScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileFinderScreen.swift; sourceTree = ""; }; - A982783F257E550B0006D64F /* DirectoryServiceScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DirectoryServiceScreen.swift; sourceTree = ""; }; - A9827847257E5B060006D64F /* File1.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = File1.txt; sourceTree = ""; }; - A982784C257E5B290006D64F /* File5.jpg */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = image.jpeg; path = File5.jpg; sourceTree = ""; }; - A982784D257E5B290006D64F /* File4.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = File4.txt; sourceTree = ""; }; - A982784E257E5B290006D64F /* File2.pdf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = image.pdf; path = File2.pdf; sourceTree = ""; }; - A982784F257E5B2A0006D64F /* File3.gif */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = image.gif; path = File3.gif; sourceTree = ""; }; - A9827869257E5D550006D64F /* GeoScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeoScreen.swift; sourceTree = ""; }; - A9827870257E5DE80006D64F /* WorldCoordinateScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WorldCoordinateScreen.swift; sourceTree = ""; }; - A9827875257E5E0E0006D64F /* ExternalMapServicesScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExternalMapServicesScreen.swift; sourceTree = ""; }; - A9827884257E67080006D64F /* KeychainScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainScreen.swift; sourceTree = ""; }; - A982788B257E67660006D64F /* KeychainServiceScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainServiceScreen.swift; sourceTree = ""; }; - A9827891257E73D40006D64F /* LocalizationScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizationScreen.swift; sourceTree = ""; }; - A9827896257E74040006D64F /* LocalizationServiceScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalizationServiceScreen.swift; sourceTree = ""; }; - A982789B257E740E0006D64F /* TranslatorScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TranslatorScreen.swift; sourceTree = ""; }; - A98278AA257E76940006D64F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; - A98278AE257E76A50006D64F /* sv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sv; path = sv.lproj/Localizable.strings; sourceTree = ""; }; - A98278B5257E7AC20006D64F /* NetworkScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkScreen.swift; sourceTree = ""; }; - A98278BB257E7B3D0006D64F /* ServicesScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServicesScreen.swift; sourceTree = ""; }; - A98278D2257E83250006D64F /* Color+Demo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Color+Demo.swift"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - A9544BC72571CBC900522141 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A9544D53257455CA00522141 /* SwiftUIKit in Frameworks */, - A971DC532860ABEE00F30DEF /* SwiftKit in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A9544BCF2571CBC900522141 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A9544D58257455DA00522141 /* SwiftUIKit in Frameworks */, - A971DC552860ABF200F30DEF /* SwiftKit in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - A90CD6A1257E23F7008A1749 /* Date */ = { - isa = PBXGroup; - children = ( - A90CD6A2257E2403008A1749 /* DateScreen.swift */, - ); - path = Date; - sourceTree = ""; - }; - A90CD6B1257E2E5E008A1749 /* Device */ = { - isa = PBXGroup; - children = ( - A90CD6B2257E2E6E008A1749 /* DeviceScreen.swift */, - A90CD6B6257E3343008A1749 /* DeviceIdentifierScreen.swift */, - ); - path = Device; - sourceTree = ""; - }; - A9544BBD2571CBC800522141 = { - isa = PBXGroup; - children = ( - A971DC502860ABD600F30DEF /* Packages */, - A9544BCC2571CBC900522141 /* iOS */, - A9544BD32571CBC900522141 /* macOS */, - A9544BC22571CBC800522141 /* Shared */, - A9544BCB2571CBC900522141 /* Products */, - A9544BEA2571CC3200522141 /* Project Files */, - A9544D56257455DA00522141 /* Frameworks */, - ); - sourceTree = ""; - }; - A9544BC22571CBC800522141 /* Shared */ = { - isa = PBXGroup; - children = ( - A9544D392574445900522141 /* Authentication */, - A9544D5D2574C50700522141 /* Data */, - A90CD6A1257E23F7008A1749 /* Date */, - A9544BF32571CCB600522141 /* Demo */, - A90CD6B1257E2E5E008A1749 /* Device */, - A9827819257E522E0006D64F /* Extensions */, - A9827823257E53440006D64F /* Files */, - A9827868257E5D4B0006D64F /* Geo */, - A9827882257E66F20006D64F /* Keychain */, - A9827890257E73C80006D64F /* Localization */, - A98278B4257E7AB50006D64F /* Network */, - A9544BF82571CCC800522141 /* Resources */, - A98278BA257E7B310006D64F /* Services */, - A98278B1257E79690006D64F /* Supporting Files */, - ); - path = Shared; - sourceTree = ""; - }; - A9544BCB2571CBC900522141 /* Products */ = { - isa = PBXGroup; - children = ( - A9544BCA2571CBC900522141 /* Demo.app */, - A9544BD22571CBC900522141 /* Demo.app */, - ); - name = Products; - sourceTree = ""; - }; - A9544BCC2571CBC900522141 /* iOS */ = { - isa = PBXGroup; - children = ( - A9544BCD2571CBC900522141 /* Info.plist */, - ); - path = iOS; - sourceTree = ""; - }; - A9544BD32571CBC900522141 /* macOS */ = { - isa = PBXGroup; - children = ( - A9544BD42571CBC900522141 /* Info.plist */, - A9544BD52571CBC900522141 /* macOS.entitlements */, - ); - path = macOS; - sourceTree = ""; - }; - A9544BEA2571CC3200522141 /* Project Files */ = { - isa = PBXGroup; - children = ( - A9544BF22571CC5800522141 /* .gitignore */, - A9544BF12571CC5800522141 /* .swiftlint.yml */, - A9544BF02571CC4900522141 /* DSSwiftKit.podspec */, - A9544BEB2571CC4900522141 /* LICENSE */, - A9544BEE2571CC4900522141 /* Package.resolved */, - A9544BEC2571CC4900522141 /* Package.swift */, - A9544BEF2571CC4900522141 /* README.md */, - A9544BED2571CC4900522141 /* Release Notes.md */, - ); - name = "Project Files"; - sourceTree = ""; - }; - A9544BF32571CCB600522141 /* Demo */ = { - isa = PBXGroup; - children = ( - A9544BC42571CBC800522141 /* ContentView.swift */, - A9544BC32571CBC800522141 /* DemoApp.swift */, - ); - path = Demo; - sourceTree = ""; - }; - A9544BF82571CCC800522141 /* Resources */ = { - isa = PBXGroup; - children = ( - A9544BC52571CBC900522141 /* Assets.xcassets */, - A9827846257E5AE30006D64F /* Files */, - A9544C0E2571CD6B00522141 /* Image+Demo.swift */, - A98278D2257E83250006D64F /* Color+Demo.swift */, - ); - path = Resources; - sourceTree = ""; - }; - A9544D392574445900522141 /* Authentication */ = { - isa = PBXGroup; - children = ( - A9544D3A2574446A00522141 /* AuthenticationScreen.swift */, - A9544D41257444DE00522141 /* BiometricAuthenticationServiceScreen.swift */, - A9544D482574450600522141 /* CachedAuthenticationServiceProxyScreen.swift */, - ); - path = Authentication; - sourceTree = ""; - }; - A9544D56257455DA00522141 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; - A9544D5D2574C50700522141 /* Data */ = { - isa = PBXGroup; - children = ( - A9544D5E2574C51A00522141 /* DataScreen.swift */, - A9544D6F2574C81700522141 /* Base64StringCoderScreen.swift */, - A9544D732574C82300522141 /* StandardCsvParserScreen.swift */, - A9544D772574CAFC00522141 /* Persons.csv */, - ); - path = Data; - sourceTree = ""; - }; - A971DC502860ABD600F30DEF /* Packages */ = { - isa = PBXGroup; - children = ( - A971DC512860ABD600F30DEF /* swiftkit */, - ); - name = Packages; - sourceTree = ""; - }; - A9827819257E522E0006D64F /* Extensions */ = { - isa = PBXGroup; - children = ( - A982781A257E523B0006D64F /* ExtensionsScreen.swift */, - ); - path = Extensions; - sourceTree = ""; - }; - A9827823257E53440006D64F /* Files */ = { - isa = PBXGroup; - children = ( - A9827824257E53510006D64F /* FilesScreen.swift */, - A982783F257E550B0006D64F /* DirectoryServiceScreen.swift */, - A982783A257E55000006D64F /* FileFinderScreen.swift */, - ); - path = Files; - sourceTree = ""; - }; - A9827846257E5AE30006D64F /* Files */ = { - isa = PBXGroup; - children = ( - A9827847257E5B060006D64F /* File1.txt */, - A982784E257E5B290006D64F /* File2.pdf */, - A982784F257E5B2A0006D64F /* File3.gif */, - A982784D257E5B290006D64F /* File4.txt */, - A982784C257E5B290006D64F /* File5.jpg */, - ); - path = Files; - sourceTree = ""; - }; - A9827868257E5D4B0006D64F /* Geo */ = { - isa = PBXGroup; - children = ( - A9827869257E5D550006D64F /* GeoScreen.swift */, - A9827870257E5DE80006D64F /* WorldCoordinateScreen.swift */, - A9827875257E5E0E0006D64F /* ExternalMapServicesScreen.swift */, - ); - path = Geo; - sourceTree = ""; - }; - A9827882257E66F20006D64F /* Keychain */ = { - isa = PBXGroup; - children = ( - A9827884257E67080006D64F /* KeychainScreen.swift */, - A982788B257E67660006D64F /* KeychainServiceScreen.swift */, - ); - path = Keychain; - sourceTree = ""; - }; - A9827890257E73C80006D64F /* Localization */ = { - isa = PBXGroup; - children = ( - A9827891257E73D40006D64F /* LocalizationScreen.swift */, - A9827896257E74040006D64F /* LocalizationServiceScreen.swift */, - A982789B257E740E0006D64F /* TranslatorScreen.swift */, - ); - path = Localization; - sourceTree = ""; - }; - A98278B1257E79690006D64F /* Supporting Files */ = { - isa = PBXGroup; - children = ( - A98278AB257E76940006D64F /* Localizable.strings */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - A98278B4257E7AB50006D64F /* Network */ = { - isa = PBXGroup; - children = ( - A98278B5257E7AC20006D64F /* NetworkScreen.swift */, - ); - path = Network; - sourceTree = ""; - }; - A98278BA257E7B310006D64F /* Services */ = { - isa = PBXGroup; - children = ( - A98278BB257E7B3D0006D64F /* ServicesScreen.swift */, - ); - path = Services; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - A9544BC92571CBC900522141 /* Demo (iOS) */ = { - isa = PBXNativeTarget; - buildConfigurationList = A9544BDE2571CBC900522141 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */; - buildPhases = ( - A98278E9257ECDAE0006D64F /* [SwiftLint] */, - A9544BC62571CBC900522141 /* Sources */, - A9544BC72571CBC900522141 /* Frameworks */, - A9544BC82571CBC900522141 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Demo (iOS)"; - packageProductDependencies = ( - A9544D52257455CA00522141 /* SwiftUIKit */, - A971DC522860ABEE00F30DEF /* SwiftKit */, - ); - productName = "Demo (iOS)"; - productReference = A9544BCA2571CBC900522141 /* Demo.app */; - productType = "com.apple.product-type.application"; - }; - A9544BD12571CBC900522141 /* Demo (macOS) */ = { - isa = PBXNativeTarget; - buildConfigurationList = A9544BE12571CBC900522141 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */; - buildPhases = ( - A9544BCE2571CBC900522141 /* Sources */, - A9544BCF2571CBC900522141 /* Frameworks */, - A9544BD02571CBC900522141 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Demo (macOS)"; - packageProductDependencies = ( - A9544D57257455DA00522141 /* SwiftUIKit */, - A971DC542860ABF200F30DEF /* SwiftKit */, - ); - productName = "Demo (macOS)"; - productReference = A9544BD22571CBC900522141 /* Demo.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - A9544BBE2571CBC800522141 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 1220; - LastUpgradeCheck = 1220; - ORGANIZATIONNAME = "Daniel Saidi"; - TargetAttributes = { - A9544BC92571CBC900522141 = { - CreatedOnToolsVersion = 12.2; - }; - A9544BD12571CBC900522141 = { - CreatedOnToolsVersion = 12.2; - }; - }; - }; - buildConfigurationList = A9544BC12571CBC800522141 /* Build configuration list for PBXProject "Demo" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - sv, - ); - mainGroup = A9544BBD2571CBC800522141; - packageReferences = ( - A9544D51257455CA00522141 /* XCRemoteSwiftPackageReference "SwiftUIKit" */, - ); - productRefGroup = A9544BCB2571CBC900522141 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - A9544BC92571CBC900522141 /* Demo (iOS) */, - A9544BD12571CBC900522141 /* Demo (macOS) */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - A9544BC82571CBC900522141 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A9827850257E5B2A0006D64F /* File5.jpg in Resources */, - A9827854257E5B2A0006D64F /* File2.pdf in Resources */, - A9827852257E5B2A0006D64F /* File4.txt in Resources */, - A9544BDA2571CBC900522141 /* Assets.xcassets in Resources */, - A9827848257E5B060006D64F /* File1.txt in Resources */, - A98278A8257E76940006D64F /* Localizable.strings in Resources */, - A9544D782574CAFC00522141 /* Persons.csv in Resources */, - A9827856257E5B2A0006D64F /* File3.gif in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A9544BD02571CBC900522141 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A9827851257E5B2A0006D64F /* File5.jpg in Resources */, - A9827855257E5B2A0006D64F /* File2.pdf in Resources */, - A9827853257E5B2A0006D64F /* File4.txt in Resources */, - A9544BDB2571CBC900522141 /* Assets.xcassets in Resources */, - A9827849257E5B060006D64F /* File1.txt in Resources */, - A98278A9257E76940006D64F /* Localizable.strings in Resources */, - A90CD6AB257E241B008A1749 /* Persons.csv in Resources */, - A9827857257E5B2A0006D64F /* File3.gif in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - A98278E9257ECDAE0006D64F /* [SwiftLint] */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "[SwiftLint]"; - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\n swiftlint\nfi\n"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - A9544BC62571CBC900522141 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A9827876257E5E0E0006D64F /* ExternalMapServicesScreen.swift in Sources */, - A9544D742574C82300522141 /* StandardCsvParserScreen.swift in Sources */, - A982789C257E740E0006D64F /* TranslatorScreen.swift in Sources */, - A9544D42257444DE00522141 /* BiometricAuthenticationServiceScreen.swift in Sources */, - A9544BD82571CBC900522141 /* ContentView.swift in Sources */, - A90CD6B3257E2E6E008A1749 /* DeviceScreen.swift in Sources */, - A9827840257E550B0006D64F /* DirectoryServiceScreen.swift in Sources */, - A90CD6B7257E3343008A1749 /* DeviceIdentifierScreen.swift in Sources */, - A98278BC257E7B3D0006D64F /* ServicesScreen.swift in Sources */, - A9827825257E53510006D64F /* FilesScreen.swift in Sources */, - A9827871257E5DE80006D64F /* WorldCoordinateScreen.swift in Sources */, - A9544D5F2574C51A00522141 /* DataScreen.swift in Sources */, - A9827892257E73D40006D64F /* LocalizationScreen.swift in Sources */, - A90CD6A3257E2403008A1749 /* DateScreen.swift in Sources */, - A982788C257E67660006D64F /* KeychainServiceScreen.swift in Sources */, - A982781B257E523B0006D64F /* ExtensionsScreen.swift in Sources */, - A9827897257E74040006D64F /* LocalizationServiceScreen.swift in Sources */, - A9544D492574450600522141 /* CachedAuthenticationServiceProxyScreen.swift in Sources */, - A982786A257E5D550006D64F /* GeoScreen.swift in Sources */, - A9827885257E67080006D64F /* KeychainScreen.swift in Sources */, - A9544D3B2574446A00522141 /* AuthenticationScreen.swift in Sources */, - A9544C0F2571CD6B00522141 /* Image+Demo.swift in Sources */, - A98278D3257E83250006D64F /* Color+Demo.swift in Sources */, - A9544D702574C81700522141 /* Base64StringCoderScreen.swift in Sources */, - A98278B6257E7AC20006D64F /* NetworkScreen.swift in Sources */, - A982783B257E55000006D64F /* FileFinderScreen.swift in Sources */, - A9544BD62571CBC900522141 /* DemoApp.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A9544BCE2571CBC900522141 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A98278B7257E7AC20006D64F /* NetworkScreen.swift in Sources */, - A9544D43257444DE00522141 /* BiometricAuthenticationServiceScreen.swift in Sources */, - A9544BD92571CBC900522141 /* ContentView.swift in Sources */, - A982786B257E5D550006D64F /* GeoScreen.swift in Sources */, - A982788D257E67660006D64F /* KeychainServiceScreen.swift in Sources */, - A98278D4257E83250006D64F /* Color+Demo.swift in Sources */, - A982781E257E52680006D64F /* ExtensionsScreen.swift in Sources */, - A982783C257E55000006D64F /* FileFinderScreen.swift in Sources */, - A9827835257E54EA0006D64F /* FilesScreen.swift in Sources */, - A98278BD257E7B3D0006D64F /* ServicesScreen.swift in Sources */, - A9827893257E73D40006D64F /* LocalizationScreen.swift in Sources */, - A9544D4A2574450600522141 /* CachedAuthenticationServiceProxyScreen.swift in Sources */, - A9827872257E5DE80006D64F /* WorldCoordinateScreen.swift in Sources */, - A90CD6BA257E334A008A1749 /* DeviceIdentifierScreen.swift in Sources */, - A9827886257E67080006D64F /* KeychainScreen.swift in Sources */, - A982789D257E740E0006D64F /* TranslatorScreen.swift in Sources */, - A98278A0257E74440006D64F /* DeviceScreen.swift in Sources */, - A90CD6AC257E241B008A1749 /* DataScreen.swift in Sources */, - A9827841257E550B0006D64F /* DirectoryServiceScreen.swift in Sources */, - A90CD6AE257E241B008A1749 /* StandardCsvParserScreen.swift in Sources */, - A9544D3C2574446A00522141 /* AuthenticationScreen.swift in Sources */, - A90CD6AD257E241B008A1749 /* Base64StringCoderScreen.swift in Sources */, - A9827877257E5E0E0006D64F /* ExternalMapServicesScreen.swift in Sources */, - A9544C102571CD6B00522141 /* Image+Demo.swift in Sources */, - A9827898257E74040006D64F /* LocalizationServiceScreen.swift in Sources */, - A90CD6A8257E2412008A1749 /* DateScreen.swift in Sources */, - A9544BD72571CBC900522141 /* DemoApp.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - A98278AB257E76940006D64F /* Localizable.strings */ = { - isa = PBXVariantGroup; - children = ( - A98278AA257E76940006D64F /* en */, - A98278AE257E76A50006D64F /* sv */, - ); - name = Localizable.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - A9544BDC2571CBC900522141 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - 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; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - 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; - MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; - MTL_FAST_MATH = YES; - ONLY_ACTIVE_ARCH = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - A9544BDD2571CBC900522141 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - 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; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - 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; - MTL_ENABLE_DEBUG_INFO = NO; - MTL_FAST_MATH = YES; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Release; - }; - A9544BDF2571CBC900522141 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = PMEDFW438U; - ENABLE_PREVIEWS = YES; - INFOPLIST_FILE = iOS/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.danielsaidi.swiftkit.demo; - PRODUCT_NAME = Demo; - SDKROOT = iphoneos; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - A9544BE02571CBC900522141 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = PMEDFW438U; - ENABLE_PREVIEWS = YES; - INFOPLIST_FILE = iOS/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 14.0; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.danielsaidi.swiftkit.demo; - PRODUCT_NAME = Demo; - SDKROOT = iphoneos; - SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - A9544BE22571CBC900522141 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = PMEDFW438U; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_PREVIEWS = YES; - INFOPLIST_FILE = macOS/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.0; - PRODUCT_BUNDLE_IDENTIFIER = com.danielsaidi.swiftkit.demo; - PRODUCT_NAME = Demo; - SDKROOT = macosx; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - A9544BE32571CBC900522141 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CODE_SIGN_ENTITLEMENTS = macOS/macOS.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - DEVELOPMENT_TEAM = PMEDFW438U; - ENABLE_HARDENED_RUNTIME = YES; - ENABLE_PREVIEWS = YES; - INFOPLIST_FILE = macOS/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - MACOSX_DEPLOYMENT_TARGET = 11.0; - PRODUCT_BUNDLE_IDENTIFIER = com.danielsaidi.swiftkit.demo; - PRODUCT_NAME = Demo; - SDKROOT = macosx; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - A9544BC12571CBC800522141 /* Build configuration list for PBXProject "Demo" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A9544BDC2571CBC900522141 /* Debug */, - A9544BDD2571CBC900522141 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A9544BDE2571CBC900522141 /* Build configuration list for PBXNativeTarget "Demo (iOS)" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A9544BDF2571CBC900522141 /* Debug */, - A9544BE02571CBC900522141 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A9544BE12571CBC900522141 /* Build configuration list for PBXNativeTarget "Demo (macOS)" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A9544BE22571CBC900522141 /* Debug */, - A9544BE32571CBC900522141 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - -/* Begin XCRemoteSwiftPackageReference section */ - A9544D51257455CA00522141 /* XCRemoteSwiftPackageReference "SwiftUIKit" */ = { - isa = XCRemoteSwiftPackageReference; - repositoryURL = "https://github.com/danielsaidi/SwiftUIKit.git"; - requirement = { - kind = upToNextMajorVersion; - minimumVersion = 2.7.0; - }; - }; -/* End XCRemoteSwiftPackageReference section */ - -/* Begin XCSwiftPackageProductDependency section */ - A9544D52257455CA00522141 /* SwiftUIKit */ = { - isa = XCSwiftPackageProductDependency; - package = A9544D51257455CA00522141 /* XCRemoteSwiftPackageReference "SwiftUIKit" */; - productName = SwiftUIKit; - }; - A9544D57257455DA00522141 /* SwiftUIKit */ = { - isa = XCSwiftPackageProductDependency; - 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 */; -} diff --git a/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a..0000000 --- a/Demo/Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index b23c967..0000000 --- a/Demo/Demo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,68 +0,0 @@ -{ - "pins" : [ - { - "identity" : "cwlcatchexception", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mattgallagher/CwlCatchException.git", - "state" : { - "revision" : "35f9e770f54ce62dd8526470f14c6e137cef3eea", - "version" : "2.1.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 -} diff --git a/Demo/Demo.xcodeproj/project.xcworkspace/xcuserdata/danielsaidi.xcuserdatad/UserInterfaceState.xcuserstate b/Demo/Demo.xcodeproj/project.xcworkspace/xcuserdata/danielsaidi.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 833fbc4..0000000 Binary files a/Demo/Demo.xcodeproj/project.xcworkspace/xcuserdata/danielsaidi.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/Demo/Demo.xcodeproj/xcshareddata/xcschemes/Demo (iOS).xcscheme b/Demo/Demo.xcodeproj/xcshareddata/xcschemes/Demo (iOS).xcscheme deleted file mode 100644 index 6efcc53..0000000 --- a/Demo/Demo.xcodeproj/xcshareddata/xcschemes/Demo (iOS).xcscheme +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Demo/Demo.xcodeproj/xcuserdata/danielsaidi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Demo/Demo.xcodeproj/xcuserdata/danielsaidi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist deleted file mode 100644 index 85307c8..0000000 --- a/Demo/Demo.xcodeproj/xcuserdata/danielsaidi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ /dev/null @@ -1,6 +0,0 @@ - - - diff --git a/Demo/Demo.xcodeproj/xcuserdata/danielsaidi.xcuserdatad/xcschemes/xcschememanagement.plist b/Demo/Demo.xcodeproj/xcuserdata/danielsaidi.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index e757904..0000000 --- a/Demo/Demo.xcodeproj/xcuserdata/danielsaidi.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,27 +0,0 @@ - - - - - SchemeUserState - - Demo (iOS).xcscheme_^#shared#^_ - - orderHint - 0 - - Demo (macOS).xcscheme_^#shared#^_ - - orderHint - 1 - - - SuppressBuildableAutocreation - - A9544BC92571CBC900522141 - - primary - - - - - diff --git a/Demo/Shared/Authentication/AuthenticationScreen.swift b/Demo/Shared/Authentication/AuthenticationScreen.swift deleted file mode 100644 index ebd4585..0000000 --- a/Demo/Shared/Authentication/AuthenticationScreen.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// AuthenticationScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-11-29. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -#if os(iOS) || os(macOS) -import SwiftUI -import SwiftUIKit - -struct AuthenticationScreen: View { - - var body: some View { - List { - Section { - ListText("SwiftKit has auth services that simplifies using biometric authentication.") - } - - Section(header: Text("Services")) { - ListNavigationLink(destination: BiometricAuthenticationServiceScreen()) { - Label("Biometric Authentication", image: .authentication) - } - ListNavigationLink(destination: CachedAuthenticationServiceProxyScreen()) { - Label("Cached Authentication", image: .data) - } - } - }.navigationTitle("Authentication") - } -} - -struct AuthenticationScreen_Previews: PreviewProvider { - static var previews: some View { - NavigationView { - AuthenticationScreen() - } - } -} -#endif diff --git a/Demo/Shared/Authentication/BiometricAuthenticationServiceScreen.swift b/Demo/Shared/Authentication/BiometricAuthenticationServiceScreen.swift deleted file mode 100644 index fac4c98..0000000 --- a/Demo/Shared/Authentication/BiometricAuthenticationServiceScreen.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// BiometricAuthenticationServiceScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-11-29. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -#if os(iOS) || os(macOS) -import SwiftKit -import SwiftUI -import SwiftUIKit - -struct BiometricAuthenticationServiceScreen: View { - - private let service: AuthenticationService = BiometricAuthenticationService() - - @StateObject private var alertContext = AlertContext() - - var body: some View { - List { - Section { - ListText("BiometricAuthenticationService can be used to identify the user with FaceID or TouchID.") - } - - Section(header: Text("Actions")) { - ListButton(action: performAuthentication) { - Label("Perform authentication", image: .authentication) - } - } - }.alert(alertContext) - } -} - -private extension BiometricAuthenticationServiceScreen { - - func alert(_ text: String) { - let alert = Alert(title: Text(text)) - DispatchQueue.main.asyncAfter(seconds: 1.0) { - alertContext.present(alert) - } - } - - func handleAuthResult(_ result: AuthenticationService.AuthResult) { - switch result { - case .failure(let error): alert("Authentication failed with error .\(error)!") - case .success: alert("Authentication succeeded!") - } - } - - func performAuthentication() { - service.authenticateUser(for: .standard, reason: "Test purposes", completion: handleAuthResult) - } -} - -struct BiometricAuthenticationServiceScreen_Previews: PreviewProvider { - static var previews: some View { - NavigationView { - BiometricAuthenticationServiceScreen() - } - } -} -#endif diff --git a/Demo/Shared/Authentication/CachedAuthenticationServiceProxyScreen.swift b/Demo/Shared/Authentication/CachedAuthenticationServiceProxyScreen.swift deleted file mode 100644 index 86b678b..0000000 --- a/Demo/Shared/Authentication/CachedAuthenticationServiceProxyScreen.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// CachedAuthenticationServiceProxyScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-11-29. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -#if os(iOS) || os(macOS) -import SwiftKit -import SwiftUI -import SwiftUIKit - -struct CachedAuthenticationServiceProxyScreen: View { - - private let service: CachedAuthenticationService = CachedAuthenticationServiceProxy( - baseService: BiometricAuthenticationService()) - - @StateObject private var alertContext = AlertContext() - - var body: some View { - List { - Section { - ListText("CachedAuthenticationServiceProxy wraps another service and stores its latest result.") - } - - Section(header: Text("Actions")) { - ListButton(action: performAuthentication) { - Label("Perform authentication", image: .authentication) - } - ListButton(action: resetAuthentication) { - Label("Clear authentication", image: .clear) - } - } - } - .alert(alertContext) - .navigationTitle("Cached Authentication") - } -} - -private extension CachedAuthenticationServiceProxyScreen { - - func alert(_ text: String) { - let alert = Alert(title: Text(text)) - DispatchQueue.main.asyncAfter(seconds: 1.0) { - alertContext.present(alert) - } - } - - func handleAuthResult(_ result: AuthenticationService.AuthResult) { - switch result { - case .failure(let error): alert("Authentication failed with error .\(error)!") - case .success: alert("Authentication succeeded!") - } - } - - func performAuthentication() { - service.authenticateUser(for: .standard, reason: "Test purposes", completion: handleAuthResult) - } - - func resetAuthentication() { - service.resetUserAuthentication(for: .standard) - alert("Authentication has been reset. You now have to perform a new authentication.") - } -} - -struct CachedAuthenticationServiceProxyScreen_Previews: PreviewProvider { - static var previews: some View { - NavigationView { - CachedAuthenticationServiceProxyScreen() - } - } -} -#endif diff --git a/Demo/Shared/Data/Base64StringCoderScreen.swift b/Demo/Shared/Data/Base64StringCoderScreen.swift deleted file mode 100644 index 2cbed08..0000000 --- a/Demo/Shared/Data/Base64StringCoderScreen.swift +++ /dev/null @@ -1,46 +0,0 @@ -// -// Base64StringCoderScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-11-30. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftKit -import SwiftUI -import SwiftUIKit - -struct Base64StringCoderScreen: View { - - private let service: StringCoder = Base64StringCoder() - - @State private var text = "" - - private var encoded: String { service.encode(text) ?? "-" } - private var decoded: String { service.decode(encoded) ?? "-" } - - var body: some View { - List { - Section { - ListText("Base64StringCoder can encode and decode base64. Type text below to encode it.") - } - - Section(header: Text("Text")) { - TextField("Enter text", text: $text) - } - - Section(header: Text("Result")) { - Text("Encoded: \(encoded)") - Text("Decoded: \(decoded)") - } - }.navigationTitle("Base64StringCoder") - } -} - -struct Base64StringCoderScreen_Previews: PreviewProvider { - static var previews: some View { - NavigationView { - Base64StringCoderScreen() - } - } -} diff --git a/Demo/Shared/Data/DataScreen.swift b/Demo/Shared/Data/DataScreen.swift deleted file mode 100644 index 23891a4..0000000 --- a/Demo/Shared/Data/DataScreen.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// DataScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-11-29. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftUI -import SwiftUIKit - -struct DataScreen: View { - - var body: some View { - List { - Section { - ListText("SwiftKit has data utils for encoding and decoding strings, parse csv files etc.") - } - - Section(header: Text("Services")) { - ListNavigationLink(destination: Base64StringCoderScreen()) { - Label("Base64 String Coder", image: .base64) - } - ListNavigationLink(destination: StandardCsvParserScreen()) { - Label("CSV Parser", image: .file) - } - } - }.navigationTitle("Data") - } -} - -struct DataScreen_Previews: PreviewProvider { - static var previews: some View { - NavigationView { - DataScreen() - } - } -} diff --git a/Demo/Shared/Data/Persons.csv b/Demo/Shared/Data/Persons.csv deleted file mode 100644 index 7c1b78c..0000000 --- a/Demo/Shared/Data/Persons.csv +++ /dev/null @@ -1,5 +0,0 @@ -Aaron A. Aaronson;31 -Baron B. Baronson;28 -Carol C. Carolson;35 -Daryl D. Darylson;21 -Eagle E. Eagleson;90 diff --git a/Demo/Shared/Data/StandardCsvParserScreen.swift b/Demo/Shared/Data/StandardCsvParserScreen.swift deleted file mode 100644 index e27a5b0..0000000 --- a/Demo/Shared/Data/StandardCsvParserScreen.swift +++ /dev/null @@ -1,60 +0,0 @@ -// -// StandardCsvParserScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-11-30. -// Copyright © 2020-2022 Daniel Saidi. All rights reserved. -// - -import SwiftKit -import SwiftUI -import SwiftUIKit - -struct StandardCsvParserScreen: View { - - private let parser: CsvParser = StandardCsvParser() - - @State private var result = [[String]]() - - var body: some View { - List { - Section { - ListText("A CsvParser can parse CSV strings. This demo uses StandardCsvParser to parse a demo file.") - } - - ConditionalView(result.hasContent) { - Section(header: Text("Result")) { - ForEach(result, id: \.[0]) { person in - Text("\(person[0]) (age \(person[1]))") - } - } - } - - Section(header: Text("Result")) { - ListButton(action: parseFile) { - Label("Parse CSV file", image: .file) - } - } - }.navigationTitle("StandardCsvParser") - } -} - -private extension StandardCsvParserScreen { - - func parseFile() { - guard - let path = Bundle.main.path(forResource: "Persons", ofType: "csv"), - let data = FileManager.default.contents(atPath: path), - let string = String(data: data, encoding: .utf8) - else { return } - result = parser.parseCsvString(string, componentSeparator: ";") - } -} - -struct StandardCsvParserScreen_Previews: PreviewProvider { - static var previews: some View { - NavigationView { - StandardCsvParserScreen() - } - } -} diff --git a/Demo/Shared/Date/DateScreen.swift b/Demo/Shared/Date/DateScreen.swift deleted file mode 100644 index 689c682..0000000 --- a/Demo/Shared/Date/DateScreen.swift +++ /dev/null @@ -1,65 +0,0 @@ -// -// DateScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftKit -import SwiftUI -import SwiftUIKit - -struct DateScreen: View { - - init(formatter: DateFormatter = DateFormatter()) { - self.formatter = formatter - formatter.dateStyle = .medium - formatter.timeStyle = .short - } - - @State private var date = Date() - - private let formatter: DateFormatter - - var body: some View { - List { - Section { - ListText("SwiftKit contains Date utils and extensions. For now, they're all in this one, single screen.") - } - - Section(header: Text("Date")) { - DatePicker("Select date", selection: $date) - } - - Section(header: Text("Difference")) { - ListText("Date is \(date.months(from: Date())) months from now") - ListText("Date is \(date.weeks(from: Date())) weeks from now") - ListText("Date is \(date.days(from: Date())) days from now") - ListText("Date is \(date.hours(from: Date())) hours from now") - } - - Section(header: Text("Adding to selected date")) { - ListText("1000 seconds: \(formatter.string(from: date.adding(seconds: 1000)))") - ListText("2000 minutes: \(formatter.string(from: date.adding(minutes: 2000)))") - ListText("3000 hours: \(formatter.string(from: date.adding(hours: 3000)))") - ListText("4000 days: \(formatter.string(from: date.adding(days: 4000)))") - } - - Section(header: Text("Removing from selected date")) { - ListText("1000 seconds: \(formatter.string(from: date.removing(seconds: 1000)))") - ListText("2000 minutes: \(formatter.string(from: date.removing(minutes: 2000)))") - ListText("3000 hours: \(formatter.string(from: date.removing(hours: 3000)))") - ListText("4000 days: \(formatter.string(from: date.removing(days: 4000)))") - } - }.navigationTitle("Date") - } -} - -struct DateScreen_Previews: PreviewProvider { - static var previews: some View { - NavigationView { - DateScreen() - } - } -} diff --git a/Demo/Shared/Demo/ContentView.swift b/Demo/Shared/Demo/ContentView.swift deleted file mode 100644 index 6efabd7..0000000 --- a/Demo/Shared/Demo/ContentView.swift +++ /dev/null @@ -1,90 +0,0 @@ -// -// ContentView.swift -// Demo -// -// Created by Daniel Saidi on 2020-11-27. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftUI -import SwiftUIKit - -struct ContentView: View { - - var body: some View { - NavigationView { - List { - Section(header: Text("Sections")) { - list1 - list2 - } - } - .navigationTitle("SwiftKit") - }.withPlatformSpecificNavigationStyle() - } -} - -private extension ContentView { - - var list1: some View { - Group { - #if os(iOS) || os(macOS) - ListNavigationLink(destination: AuthenticationScreen()) { - Label("Authentication", image: .authentication) - } - #endif - ListNavigationLink(destination: DataScreen()) { - Label("Data", image: .data) - } - ListNavigationLink(destination: DateScreen()) { - Label("Date", image: .date) - } - ListNavigationLink(destination: DeviceScreen()) { - Label("Device", image: .device) - } - ListNavigationLink(destination: ExtensionsScreen()) { - Label("Extensions", image: .extensions) - } - ListNavigationLink(destination: FilesScreen()) { - Label("Files", image: .files) - } - ListNavigationLink(destination: GeoScreen()) { - Label("Geo", image: .globe) - } - ListNavigationLink(destination: KeychainScreen()) { - Label("Keychain", image: .key) - } - ListNavigationLink(destination: LocalizationScreen()) { - Label("Localization", image: .flag) - } - } - } - - var list2: some View { - Group { - ListNavigationLink(destination: NetworkScreen()) { - Label("Network", image: .cloud) - } - ListNavigationLink(destination: ServicesScreen()) { - Label("Services", image: .service) - } - } - } -} - -private extension View { - - func withPlatformSpecificNavigationStyle() -> some View { - #if os(iOS) - return self.navigationViewStyle(StackNavigationViewStyle()) - #else - return self - #endif - } -} - -struct ContentView_Previews: PreviewProvider { - static var previews: some View { - ContentView() - } -} diff --git a/Demo/Shared/Demo/DemoApp.swift b/Demo/Shared/Demo/DemoApp.swift deleted file mode 100644 index 9e76d11..0000000 --- a/Demo/Shared/Demo/DemoApp.swift +++ /dev/null @@ -1,19 +0,0 @@ -// -// DemoApp.swift -// Demo -// -// Created by Daniel Saidi on 2020-11-27. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftUI - -@main -struct DemoApp: App { - - var body: some Scene { - WindowGroup { - ContentView() - } - } -} diff --git a/Demo/Shared/Device/DeviceIdentifierScreen.swift b/Demo/Shared/Device/DeviceIdentifierScreen.swift deleted file mode 100644 index 1efb2d5..0000000 --- a/Demo/Shared/Device/DeviceIdentifierScreen.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// DeviceIdentifierScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftKit -import SwiftUI -import SwiftUIKit - -struct DeviceIdentifierScreen: View { - - enum IdentifierType: String, Identifiable { - case keychain, userDefaults - - var id: String { rawValue } - } - - private var identifier: DeviceIdentifier { - switch identifierType { - case .keychain: return KeychainBasedDeviceIdentifier( - keychainService: StandardKeychainService(), - backupIdentifier: UserDefaultsBasedDeviceIdentifier()) - case .userDefaults: return UserDefaultsBasedDeviceIdentifier() - } - } - - @State private var identifierType = IdentifierType.keychain - - var body: some View { - List { - Section { - ListText("SwiftKit contains device identifiers. The keychain-based one remembers the unique id even if you delete the app, while the user defaults-based one does not. Here, the two identifiers are kept in sync.") - } - - Section(header: Text("identifier")) { - Picker("Select identifier", selection: $identifierType) { - Text("Keychain").tag(IdentifierType.keychain) - Text("User Defaults").tag(IdentifierType.userDefaults) - }.pickerStyle(SegmentedPickerStyle()) - } - - Section(header: Text("Device identifier")) { - ListText(identifier.getDeviceIdentifier()) - } - }.navigationTitle("DeviceIdentifier") - } -} - -struct DeviceIdentifierScreen_Previews: PreviewProvider { - static var previews: some View { - NavigationView { - DeviceIdentifierScreen() - } - } -} diff --git a/Demo/Shared/Device/DeviceScreen.swift b/Demo/Shared/Device/DeviceScreen.swift deleted file mode 100644 index 19cadde..0000000 --- a/Demo/Shared/Device/DeviceScreen.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// DeviceScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftUI -import SwiftUIKit - -struct DeviceScreen: View { - - var body: some View { - List { - Section { - ListText("SwiftKit has device utils for e.g. generating a unique id for the current device.") - } - - Section(header: Text("Services")) { - ListNavigationLink(destination: DeviceIdentifierScreen()) { - Label("Device Identifier", image: .device) - } - } - }.navigationTitle("Device") - } -} - -struct DeviceScreen_Previews: PreviewProvider { - static var previews: some View { - NavigationView { - DeviceScreen() - } - } -} diff --git a/Demo/Shared/Extensions/ExtensionsScreen.swift b/Demo/Shared/Extensions/ExtensionsScreen.swift deleted file mode 100644 index fdca1ae..0000000 --- a/Demo/Shared/Extensions/ExtensionsScreen.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// ExtensionsScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftUI -import SwiftUIKit - -struct ExtensionsScreen: View { - - var body: some View { - List { - Section { - ListText(""" -SwiftKit contains a bunch of extensions that aim at making it easier to work with SwiftUI. - -Since this namespace contains a lot will grow over time, extensions are not demonstrated. Instead, checkout the source code. -""") - } - }.navigationTitle("Extension") - } -} - -struct ExtensionsScreen_Previews: PreviewProvider { - static var previews: some View { - ExtensionsScreen() - } -} diff --git a/Demo/Shared/Files/DirectoryServiceScreen.swift b/Demo/Shared/Files/DirectoryServiceScreen.swift deleted file mode 100644 index 4ac0ce9..0000000 --- a/Demo/Shared/Files/DirectoryServiceScreen.swift +++ /dev/null @@ -1,91 +0,0 @@ -// -// DirectoryServiceScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftKit -import SwiftUI -import SwiftUIKit - -struct DirectoryServiceScreen: View { - - init(service: DirectoryService = StandardDirectoryService(directory: .cachesDirectory)!) { - self.service = service - refreshFiles() - } - - private let service: DirectoryService - - @State private var files: [String] = [] - @State private var isFilterEnabled = false - - var body: some View { - List { - Section { - ListText("SwiftKit has services that lets you handle files within local directoriers. This demo uses a StandardDirectoryService that targets the local cache directory.") - } - - if files.hasContent { - Section(header: Text("Files")) { - ForEach(files, id: \.self) { - ListText("\($0) (\(service.getSizeOfFile(named: $0) ?? 0) bytes)") - } - } - } - - Section(header: Text("Total")) { - ListText("\(files.count) files (\(service.getSizeOfAllFiles()) bytes)") - } - - Section(header: Text("Actions")) { - ListButton(action: createRandomFile) { - Label("Create file with random name", image: .fileAdd) - } - ListButton(action: deleteRandomFile) { - Label("Delete random file", image: .trash) - } - ListButton(action: toggleFileFilter) { - Label("Show only files that start with \"1\"", image: isFilterEnabled ? .circleFilled : .circle) - } - } - } - .onAppear(perform: refreshFiles) - .navigationTitle("Directory Service") - } -} - -private extension DirectoryServiceScreen { - - func createRandomFile() { - let fileName = "\(Int.random(in: 1...10_000)).txt" - let data = "Hello, world!".data(using: .utf8) - _ = service.createFile(named: fileName, contents: data) - refreshFiles() - } - - func deleteRandomFile() { - guard let fileName = files.randomElement() else { return } - try? service.removeFile(named: fileName) - refreshFiles() - } - - func toggleFileFilter() { - isFilterEnabled.toggle() - refreshFiles() - } - - func refreshFiles() { - self.files = service.getFileNames() - guard isFilterEnabled else { return } - self.files = files.filter { $0.hasPrefix("1") } - } -} - -struct DirectoryServiceScreen_Previews: PreviewProvider { - static var previews: some View { - DirectoryServiceScreen() - } -} diff --git a/Demo/Shared/Files/FileFinderScreen.swift b/Demo/Shared/Files/FileFinderScreen.swift deleted file mode 100644 index f958975..0000000 --- a/Demo/Shared/Files/FileFinderScreen.swift +++ /dev/null @@ -1,58 +0,0 @@ -// -// FileFinderScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftKit -import SwiftUI -import SwiftUIKit - -struct FileFinderScreen: View { - - init(finder: FileFinder = BundleFileFinder()) { - self.finder = finder - } - - private let finder: FileFinder - - private var fileFiles: [String] { finder.findFilesWithFileNamePrefix("File").sorted() } - private var textFiles: [String] { finder.findFilesWithFileNameSuffix(".txt").sorted() } - - - var body: some View { - List { - Section { - ListText("SwiftKit has file finders that let you get files in various ways. This demo uses a BundleFileFinder that looks for files in a certain bundle.") - } - - Section(header: Text("Files that start with \"File\"")) { - if fileFiles.hasContent { - ForEach(fileFiles, id: \.self) { - ListText("\($0)") - } - } else { - ListText("No files") - } - } - - Section(header: Text("Files that end with \".txt\"")) { - if textFiles.hasContent { - ForEach(textFiles, id: \.self) { - ListText("\($0)") - } - } else { - ListText("No files") - } - } - }.navigationTitle("File Finder") - } -} - -struct FileFinderScreen_Previews: PreviewProvider { - static var previews: some View { - FileFinderScreen() - } -} diff --git a/Demo/Shared/Files/FilesScreen.swift b/Demo/Shared/Files/FilesScreen.swift deleted file mode 100644 index 1a26328..0000000 --- a/Demo/Shared/Files/FilesScreen.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// FilesScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftUI -import SwiftUIKit - -struct FilesScreen: View { - - var body: some View { - List { - Section { - ListText(""" -SwiftKit contains services that aim at making it easier to work with files. -""") - } - - Section(header: Text("Services")) { - ListNavigationLink(destination: DirectoryServiceScreen()) { - Label("Directory Service", image: .folder) - } - ListNavigationLink(destination: FileFinderScreen()) { - Label("File Finder", image: .fileSearch) - } - } - }.navigationTitle("Files") - } -} - -struct FilesScreen_Previews: PreviewProvider { - static var previews: some View { - FilesScreen() - } -} diff --git a/Demo/Shared/Geo/ExternalMapServicesScreen.swift b/Demo/Shared/Geo/ExternalMapServicesScreen.swift deleted file mode 100644 index 0191f7d..0000000 --- a/Demo/Shared/Geo/ExternalMapServicesScreen.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// ExternalMapServicesScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftKit -import SwiftUI -import SwiftUIKit - -struct ExternalMapServicesScreen: View { - - @State private var coordinate = WorldCoordinate.manhattan - - private let appleMaps = AppleMapsService() - private let googleMaps = GoogleMapsService() - - private var coordinates: [WorldCoordinate] { - [.manhattan,.newYork, .sanFrancisco, .tokyo] - } - - var body: some View { - List { - Section { - ListText("SwiftKit has external maps services that let you show a coordinate or trigger a navigation in an external map app.") - } - - Section(header: Text("Coordinate")) { - Picker("Pick Coordinate", selection: $coordinate) { - ForEach(coordinates) { - Text($0.name).tag($0) - } - } - } - - Section(header: Text("Actions")) { - ListButton(action: showInAppleMaps) { - Label("Open in Apple Maps", image: .pin) - } - ListButton(action: showInGoogleMaps) { - Label("Open in Google Maps", image: .pin) - } - } - }.navigationTitle("External Maps") - } -} - -private extension ExternalMapServicesScreen { - - func showInAppleMaps() { - open(appleMaps.getUrl(for: coordinate.coordinate)) - } - - func showInGoogleMaps() { - open(googleMaps.getUrl(for: coordinate.coordinate)) - } - - func open(_ url: URL?) { - guard let url = url else { return } - #if os(iOS) || os(tvOS) - UIApplication.shared.open(url, options: [:], completionHandler: nil) - #elseif os(macOS) - NSWorkspace.shared.open(url) - #endif - } -} - -struct ExternalMapServicesScreen_Previews: PreviewProvider { - static var previews: some View { - ExternalMapServicesScreen() - } -} diff --git a/Demo/Shared/Geo/GeoScreen.swift b/Demo/Shared/Geo/GeoScreen.swift deleted file mode 100644 index 21c5a79..0000000 --- a/Demo/Shared/Geo/GeoScreen.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// GeoScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftUI -import SwiftUIKit - -struct GeoScreen: View { - - var body: some View { - List { - Section { - ListText("SwiftKit has geo utils that simplifies working with maps and coordinates.") - } - - Section(header: Text("Utils")) { - ListNavigationLink(destination: ExternalMapServicesScreen()) { - Label("External Map Services", image: .map) - } - ListNavigationLink(destination: WorldCoordinateScreen()) { - Label("World Coordinates", image: .pin) - } - } - }.navigationTitle("Geo") - } -} - -struct GeoScreen_Previews: PreviewProvider { - static var previews: some View { - NavigationView { - GeoScreen() - } - } -} diff --git a/Demo/Shared/Geo/WorldCoordinateScreen.swift b/Demo/Shared/Geo/WorldCoordinateScreen.swift deleted file mode 100644 index 4e8d18f..0000000 --- a/Demo/Shared/Geo/WorldCoordinateScreen.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// WorldCoordinateScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import MapKit -import SwiftKit -import SwiftUI -import SwiftUIKit - -struct WorldCoordinateScreen: View { - - @State private var coordinate = WorldCoordinate.manhattan - - private var mapRegion: MKCoordinateRegion { - MKCoordinateRegion(center: coordinate.coordinate, latitudinalMeters: 10_000, longitudinalMeters: 10_000) - } - - private var coordinates: [WorldCoordinate] { - [.manhattan,.newYork, .sanFrancisco, .tokyo] - } - - var body: some View { - List { - Section { - ListText("SwiftKit has a world coordinate struct with static coordinate properties.") - } - - Section(header: Text("Coordinate")) { - Picker("Pick Coordinate", selection: $coordinate) { - ForEach(coordinates) { - Text($0.name).tag($0) - } - } - } - - Section(header: Text("Result")) { - Map(coordinateRegion: .constant(mapRegion)) - .frame(height: 250) - } - }.navigationTitle("World Coordinate") - } -} - -struct WorldCoordinateScreen_Previews: PreviewProvider { - static var previews: some View { - WorldCoordinateScreen() - } -} diff --git a/Demo/Shared/Keychain/KeychainScreen.swift b/Demo/Shared/Keychain/KeychainScreen.swift deleted file mode 100644 index 0a74d09..0000000 --- a/Demo/Shared/Keychain/KeychainScreen.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// KeychainScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftUI -import SwiftUIKit - -struct KeychainScreen: View { - - var body: some View { - List { - Section { - ListText("SwiftKit has utils that simplify working with the device keychain.") - } - - Section(header: Text("Services")) { - ListNavigationLink(destination: KeychainServiceScreen()) { - Label("Keychain Service", image: .key) - } - } - }.navigationTitle("Keychain") - } -} - -struct KeychainScreen_Previews: PreviewProvider { - static var previews: some View { - NavigationView { - KeychainScreen() - } - } -} diff --git a/Demo/Shared/Keychain/KeychainServiceScreen.swift b/Demo/Shared/Keychain/KeychainServiceScreen.swift deleted file mode 100644 index 0c2e7f7..0000000 --- a/Demo/Shared/Keychain/KeychainServiceScreen.swift +++ /dev/null @@ -1,131 +0,0 @@ -// -// KeychainServiceScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftKit -import SwiftUI -import SwiftUIKit - -struct KeychainServiceScreen: View { - - init(service: KeychainService = StandardKeychainService()) { - self.service = service - } - - private let service: KeychainService - - @State private var boolText = "" - @State private var doubleText = "" - @State private var intText = "" - @State private var stringText = "" - - var body: some View { - List { - Section { - ListText("SwiftKit has services that let you use the keychain like UserDefaults, but where the data is still around if the user deletes the app.") - } - - Section(header: Text("Persisted Data")) { - ListText("Bool: \(boolText)") - ListText("Double: \(doubleText)") - ListText("Int: \(intText)") - ListText("String: \(stringText)") - } - - Section(header: Text("Actions")) { - ListButton(action: storeRandomBool) { - Label("Store Random Bool", image: .data) - } - ListButton(action: storeRandomDouble) { - Label("Store Random Double", image: .data) - } - ListButton(action: storeRandomInt) { - Label("Store Random Int", image: .data) - } - ListButton(action: storeRandomString) { - Label("Store Random String", image: .data) - } - } - } - .onAppear(perform: refresh) - .navigationTitle("Keychain Services") - } -} - -private extension KeychainServiceScreen { - - func key(for type: String) -> String { - "com.swiftkit.demo.keychain.\(type)" - } - - func storeRandomBool() { - service.set(Bool.random(), for: key(for: "bool"), with: nil) - refresh() - } - - func storeRandomDouble() { - service.set(Double.random(in: 0...10_000), for: key(for: "double"), with: nil) - refresh() - } - - func storeRandomInt() { - service.set(Int.random(in: 0...10_000), for: key(for: "int"), with: nil) - refresh() - } - - func storeRandomString() { - service.set("\(Int.random(in: 0...10_000))", for: key(for: "string"), with: nil) - refresh() - } - - func refresh() { - refreshBool() - refreshDouble() - refreshInteger() - refreshString() - } - - func refreshBool() { - if let bool = service.bool(for: key(for: "bool"), with: nil) { - boolText = "\(bool)" - } else { - boolText = "-" - } - } - - func refreshDouble() { - if let double = service.double(for: key(for: "double"), with: nil) { - doubleText = "\(double)" - } else { - doubleText = "-" - } - } - - func refreshInteger() { - if let int = service.integer(for: key(for: "int"), with: nil) { - intText = "\(int)" - } else { - intText = "-" - } - } - - func refreshString() { - if let string = service.string(for: key(for: "string"), with: nil) { - stringText = "\(string)" - } else { - stringText = "-" - } - } -} - -struct KeychainServiceScreen_Previews: PreviewProvider { - static var previews: some View { - NavigationView { - KeychainServiceScreen() - } - } -} diff --git a/Demo/Shared/Localization/LocalizationScreen.swift b/Demo/Shared/Localization/LocalizationScreen.swift deleted file mode 100644 index 931cbac..0000000 --- a/Demo/Shared/Localization/LocalizationScreen.swift +++ /dev/null @@ -1,38 +0,0 @@ -// -// LocalizationScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftUI -import SwiftUIKit - -struct LocalizationScreen: View { - - var body: some View { - List { - Section { - ListText("SwiftKit has utils for working with localized content.") - } - - Section(header: Text("Services")) { - ListNavigationLink(destination: LocalizationServiceScreen()) { - Label("Localization Service", image: .service) - } - ListNavigationLink(destination: TranslatorScreen()) { - Label("Translator", image: .flag) - } - } - }.navigationTitle("Keychain") - } -} - -struct LocalizationScreen_Previews: PreviewProvider { - static var previews: some View { - NavigationView { - LocalizationScreen() - } - } -} diff --git a/Demo/Shared/Localization/LocalizationServiceScreen.swift b/Demo/Shared/Localization/LocalizationServiceScreen.swift deleted file mode 100644 index a5c3eb1..0000000 --- a/Demo/Shared/Localization/LocalizationServiceScreen.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// LocalizationServiceScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftKit -import SwiftUI -import SwiftUIKit - -struct LocalizationServiceScreen: View { - - init(service: LocalizationService = StandardLocalizationService()) { - self.service = service - } - - class ViewModel: ObservableObject { - - @Published var locale = Locale(identifier: "en") - } - - private let service: LocalizationService - private let english = Locale(identifier: "en") - private let swedish = Locale(identifier: "sv") - - @State private var title = "" - @State private var text = "" - @StateObject private var state = ViewModel() - - var body: some View { - List { - Section { - ListText("SwiftKit has services for working with localized content and changing locale without restarting the app. This demo uses a StandardLocalizationService.") - } - - Section(header: Text("Locales")) { - Picker("Select locale", selection: $state.locale) { - Text("English").tag(english) - Text("Swedish").tag(swedish) - }.pickerStyle(SegmentedPickerStyle()) - } - - Section(header: Text("Translations")) { - ListText(title).font(.headline) - ListText(text) - } - } - .onAppear(perform: refresh) - .onReceive(state.$locale, perform: { _ in refreshAsync() }) - .navigationTitle("Localization Service") - } -} - -extension LocalizationServiceScreen { - - func refresh() { - try? service.setLocale(state.locale) - title = service.translate("localization_service_title") - text = service.translate("localization_service_text") - } - - func refreshAsync() { - DispatchQueue.main.async(execute: refresh) - } -} - -struct LocalizationServiceScreen_Previews: PreviewProvider { - static var previews: some View { - LocalizationServiceScreen() - } -} diff --git a/Demo/Shared/Localization/TranslatorScreen.swift b/Demo/Shared/Localization/TranslatorScreen.swift deleted file mode 100644 index e13fa9c..0000000 --- a/Demo/Shared/Localization/TranslatorScreen.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// TranslatorScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftKit -import SwiftUI -import SwiftUIKit - -struct TranslatorScreen: View { - - init(service: Translator = StandardTranslator()) { - self.service = service - } - - private let service: Translator - - @State private var title = "" - @State private var text = "" - - var body: some View { - List { - Section { - ListText("SwiftKit has translators that can be used to abstract how localized strings are translated. This demo uses a StandardTranslator, which uses the latest locale set for this app.") - } - - Section(header: Text("Translations")) { - ListText(title).font(.headline) - ListText(text) - } - } - .onAppear(perform: refresh) - .navigationTitle("Translator") - } -} - -extension TranslatorScreen { - - func refresh() { - title = service.translate("localization_service_title") - text = service.translate("localization_service_text") - } -} - -struct TranslatorScreen_Previews: PreviewProvider { - static var previews: some View { - TranslatorScreen() - } -} diff --git a/Demo/Shared/Network/NetworkScreen.swift b/Demo/Shared/Network/NetworkScreen.swift deleted file mode 100644 index 1e225a2..0000000 --- a/Demo/Shared/Network/NetworkScreen.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// NetworkScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftUI -import SwiftUIKit - -struct NetworkScreen: View { - - var body: some View { - List { - Section { - ListText(""" -SwiftKit contains a bunch of utils for working with network and api-related operations, like requesting and parsing data from an external api. - -This namespace is currently not available as a demo. Instead, checkout the source code. -""") - } - }.navigationTitle("Network") - } -} - -struct NetworkScreen_Previews: PreviewProvider { - static var previews: some View { - NetworkScreen() - } -} diff --git a/Demo/Shared/Resources/Assets.xcassets/AccentColor.colorset/Contents.json b/Demo/Shared/Resources/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index d385e1b..0000000 --- a/Demo/Shared/Resources/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "display-p3", - "components" : { - "alpha" : "1.000", - "blue" : "0x32", - "green" : "0x6A", - "red" : "0xFF" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index e814d9b..0000000 --- a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "images" : [ - { - "filename" : "Icon-40.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "filename" : "Icon-60.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "filename" : "Icon-58.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "filename" : "Icon-87.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "filename" : "Icon-80.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "Icon-120.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "filename" : "Icon-120.png", - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "filename" : "Icon-180.png", - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "filename" : "Icon-20.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "20x20" - }, - { - "filename" : "Icon-40.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "20x20" - }, - { - "filename" : "Icon-29.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "29x29" - }, - { - "filename" : "Icon-58.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "29x29" - }, - { - "filename" : "Icon-40.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "40x40" - }, - { - "filename" : "Icon-80.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "40x40" - }, - { - "filename" : "Icon-76.png", - "idiom" : "ipad", - "scale" : "1x", - "size" : "76x76" - }, - { - "filename" : "Icon-152.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "76x76" - }, - { - "filename" : "Icon-167.png", - "idiom" : "ipad", - "scale" : "2x", - "size" : "83.5x83.5" - }, - { - "filename" : "Icon-1024.png", - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - }, - { - "filename" : "Icon-16.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "16x16" - }, - { - "filename" : "Icon-32.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "16x16" - }, - { - "filename" : "Icon-32.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "32x32" - }, - { - "filename" : "Icon-64.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "32x32" - }, - { - "filename" : "Icon-128.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "128x128" - }, - { - "filename" : "Icon-256.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "128x128" - }, - { - "filename" : "Icon-256.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "256x256" - }, - { - "filename" : "Icon-512.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "256x256" - }, - { - "filename" : "Icon-512.png", - "idiom" : "mac", - "scale" : "1x", - "size" : "512x512" - }, - { - "filename" : "Icon-1024.png", - "idiom" : "mac", - "scale" : "2x", - "size" : "512x512" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-1024.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-1024.png deleted file mode 100644 index 9e3e304..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-1024.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-120.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-120.png deleted file mode 100644 index c650721..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-120.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-128.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-128.png deleted file mode 100644 index 46b3ceb..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-128.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-152.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-152.png deleted file mode 100644 index b210026..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-152.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-16.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-16.png deleted file mode 100644 index ae1029b..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-16.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-167.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-167.png deleted file mode 100644 index ea706ce..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-167.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-180.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-180.png deleted file mode 100644 index 120de37..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-180.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-20.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-20.png deleted file mode 100644 index 651c335..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-20.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-256.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-256.png deleted file mode 100644 index da68964..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-256.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-29.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-29.png deleted file mode 100644 index 255d635..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-29.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-32.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-32.png deleted file mode 100644 index 5522c7c..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-32.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-40.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-40.png deleted file mode 100644 index 3c3edb2..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-40.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-512.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-512.png deleted file mode 100644 index 92becab..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-512.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-58.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-58.png deleted file mode 100644 index b776d4d..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-58.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60.png deleted file mode 100644 index 877267b..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-60.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-64.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-64.png deleted file mode 100644 index f7abb92..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-64.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76.png deleted file mode 100644 index f9c6db5..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-76.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-80.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-80.png deleted file mode 100644 index a191631..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-80.png and /dev/null differ diff --git a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-87.png b/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-87.png deleted file mode 100644 index 1cec402..0000000 Binary files a/Demo/Shared/Resources/Assets.xcassets/AppIcon.appiconset/Icon-87.png and /dev/null differ diff --git a/Demo/Shared/Resources/Color+Demo.swift b/Demo/Shared/Resources/Color+Demo.swift deleted file mode 100644 index 4bae2a8..0000000 --- a/Demo/Shared/Resources/Color+Demo.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// Color+Demo.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -#if os(iOS) -import UIKit - -extension UIColor { - - static var accent: UIColor { - UIColor(named: "AccentColor") ?? .black - } -} -#endif diff --git a/Demo/Shared/Resources/Files/File1.txt b/Demo/Shared/Resources/Files/File1.txt deleted file mode 100644 index 8b13789..0000000 --- a/Demo/Shared/Resources/Files/File1.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Demo/Shared/Resources/Files/File2.pdf b/Demo/Shared/Resources/Files/File2.pdf deleted file mode 100644 index 8b13789..0000000 --- a/Demo/Shared/Resources/Files/File2.pdf +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Demo/Shared/Resources/Files/File3.gif b/Demo/Shared/Resources/Files/File3.gif deleted file mode 100644 index 8b13789..0000000 --- a/Demo/Shared/Resources/Files/File3.gif +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Demo/Shared/Resources/Files/File4.txt b/Demo/Shared/Resources/Files/File4.txt deleted file mode 100644 index 8b13789..0000000 --- a/Demo/Shared/Resources/Files/File4.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Demo/Shared/Resources/Files/File5.jpg b/Demo/Shared/Resources/Files/File5.jpg deleted file mode 100644 index 8b13789..0000000 --- a/Demo/Shared/Resources/Files/File5.jpg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Demo/Shared/Resources/Image+Demo.swift b/Demo/Shared/Resources/Image+Demo.swift deleted file mode 100644 index 8a25263..0000000 --- a/Demo/Shared/Resources/Image+Demo.swift +++ /dev/null @@ -1,39 +0,0 @@ -// -// Image+Demo.swift -// Demo -// -// Created by Daniel Saidi on 2020-11-26. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftUI - -extension Image { - - static var alert: Image { Image(systemName: "rectangle.center.inset.fill") } - static var authentication: Image { Image(systemName: "faceid") } - static var base64: Image { Image(systemName: "hryvniasign.square") } - static var bundle: Image { Image(systemName: "app.gift") } - static var circle: Image { Image(systemName: "circle") } - static var circleFilled: Image { Image(systemName: "circle.fill") } - static var clear: Image { Image(systemName: "xmark.circle") } - static var cloud: Image { Image(systemName: "cloud") } - static var data: Image { Image(systemName: "cylinder.split.1x2") } - static var date: Image { Image(systemName: "calendar") } - static var device: Image { Image(systemName: "apps.iphone") } - static var dismiss: Image { Image(systemName: "xmark") } - static var extensions: Image { Image(systemName: "puzzlepiece") } - static var file: Image { Image(systemName: "doc") } - static var fileAdd: Image { Image(systemName: "doc.badge.plus") } - static var fileSearch: Image { Image(systemName: "doc.text.magnifyingglass") } - static var files: Image { Image(systemName: "doc.on.doc") } - static var flag: Image { Image(systemName: "flag") } - static var folder: Image { Image(systemName: "folder") } - static var globe: Image { Image(systemName: "globe") } - static var ioc: Image { Image(systemName: "shippingbox") } - static var key: Image { Image(systemName: "key") } - static var map: Image { Image(systemName: "map") } - static var pin: Image { Image(systemName: "mappin") } - static var service: Image { Image(systemName: "gearshape") } - static var trash: Image { Image(systemName: "trash") } -} diff --git a/Demo/Shared/Services/ServicesScreen.swift b/Demo/Shared/Services/ServicesScreen.swift deleted file mode 100644 index 89e6d0e..0000000 --- a/Demo/Shared/Services/ServicesScreen.swift +++ /dev/null @@ -1,31 +0,0 @@ -// -// ServicesScreen.swift -// Demo -// -// Created by Daniel Saidi on 2020-12-07. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import SwiftUI -import SwiftUIKit - -struct ServicesScreen: View { - - var body: some View { - List { - Section { - ListText(""" -SwiftKit contains a bunch of service base classes, which helps you implement service decorators, proxies etc. - -This namespace is currently not available as a demo. Instead, checkout the source code. -""") - } - }.navigationTitle("Services") - } -} - -struct ServicesScreen_Previews: PreviewProvider { - static var previews: some View { - ServicesScreen() - } -} diff --git a/Demo/Shared/en.lproj/Localizable.strings b/Demo/Shared/en.lproj/Localizable.strings deleted file mode 100644 index ca51255..0000000 --- a/Demo/Shared/en.lproj/Localizable.strings +++ /dev/null @@ -1,10 +0,0 @@ -/* - Localizable.strings - Demo - - Created by Daniel Saidi on 2020-12-07. - Copyright © 2020 Daniel Saidi. All rights reserved. -*/ - -"localization_service_title" = "Hello!"; -"localization_service_text" = "Welcome to the SwiftKit demo! This is an English text. I hope you like it :)"; diff --git a/Demo/Shared/sv.lproj/Localizable.strings b/Demo/Shared/sv.lproj/Localizable.strings deleted file mode 100644 index caa02ea..0000000 --- a/Demo/Shared/sv.lproj/Localizable.strings +++ /dev/null @@ -1,10 +0,0 @@ -/* - Localizable.strings - Demo - - Created by Daniel Saidi on 2020-12-07. - Copyright © 2020 Daniel Saidi. All rights reserved. -*/ - -"localization_service_title" = "Hallå!"; -"localization_service_text" = "Välkommen till SwiftKit-demot! Det här är en svensk text. Jag hoppas att du gillar den :)"; diff --git a/Demo/iOS/Info.plist b/Demo/iOS/Info.plist deleted file mode 100644 index 14ee6ab..0000000 --- a/Demo/iOS/Info.plist +++ /dev/null @@ -1,54 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundleDisplayName - SwiftKit - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIApplicationSceneManifest - - UIApplicationSupportsMultipleScenes - - - UIApplicationSupportsIndirectInputEvents - - UILaunchScreen - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/Demo/macOS/Info.plist b/Demo/macOS/Info.plist deleted file mode 100644 index dd2e32e..0000000 --- a/Demo/macOS/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundleDisplayName - SwiftKit - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0 - CFBundleVersion - 1 - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - - diff --git a/Demo/macOS/macOS.entitlements b/Demo/macOS/macOS.entitlements deleted file mode 100644 index f2ef3ae..0000000 --- a/Demo/macOS/macOS.entitlements +++ /dev/null @@ -1,10 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.files.user-selected.read-only - - - diff --git a/Release Notes.md b/Release Notes.md index 58d8a77..35d5028 100644 --- a/Release Notes.md +++ b/Release Notes.md @@ -11,15 +11,19 @@ This version contains a few breaking changes, that should be easy to fix. * `DateFormatter+Init` has a new convenience initializer. * `CsvParser` can now parse CSV files at urls as well. +* `CsvParserError` has a new convenience initializer. ### 💡 Behavior changes * `StandardCsvParser` now throws native errors for file parsing. +### 🗑 Deprecations + +* The `Network` namespace has been deprecated and moved to `ApiKit`. + ### 💥 Breaking changes -* `CsvParserError` has a new convenience initializer. -* `String+Slugifies` has been removed due to conflicts with TagKit. +* `String+Slugified` has been removed due to conflicts with TagKit. diff --git a/Resources/Icon.sketch b/Resources/Icon.sketch deleted file mode 100644 index 3e579d4..0000000 Binary files a/Resources/Icon.sketch and /dev/null differ diff --git a/Resources/Logo_solid.png b/Resources/Logo_solid.png new file mode 100644 index 0000000..68e4c8b Binary files /dev/null and b/Resources/Logo_solid.png differ diff --git a/Sources/SwiftKit/Authentication/Authentication.swift b/Sources/SwiftKit/Authentication/Authentication.swift index 54b424f..13d7177 100644 --- a/Sources/SwiftKit/Authentication/Authentication.swift +++ b/Sources/SwiftKit/Authentication/Authentication.swift @@ -22,7 +22,7 @@ public struct Authentication: Identifiable, Equatable { - Parameters: - id: The ID of the authentication. */ - public init (id: String) { + public init(id: String) { self.id = id } diff --git a/Sources/SwiftKit/Authentication/LAContext+Async.swift b/Sources/SwiftKit/Authentication/LAContext+Async.swift index 3144d13..0462ffa 100644 --- a/Sources/SwiftKit/Authentication/LAContext+Async.swift +++ b/Sources/SwiftKit/Authentication/LAContext+Async.swift @@ -20,7 +20,7 @@ extension LAContext { - localizedReason: The localized reason to show to the user. */ func evaluatePolicy(_ policy: LAPolicy, localizedReason reason: String) async throws -> Bool { - return try await withCheckedThrowingContinuation { cont in + try await withCheckedThrowingContinuation { cont in LAContext().evaluatePolicy(policy, localizedReason: reason) { result, error in if let error = error { return cont.resume(throwing: error) } cont.resume(returning: result) diff --git a/Sources/SwiftKit/Extensions/String/String+UrlEncode.swift b/Sources/SwiftKit/Extensions/String/String+UrlEncode.swift index 64be787..42b9e06 100644 --- a/Sources/SwiftKit/Extensions/String/String+UrlEncode.swift +++ b/Sources/SwiftKit/Extensions/String/String+UrlEncode.swift @@ -11,17 +11,27 @@ import Foundation public extension String { - + /** - URL encode the string. - - This will first call `addingPercentEncoding`, using the - `.urlPathAllowed` character set, then replace every `&` - with `%26` and + with %2B. + Encode the string to work with `x-www-form-urlencoded`. + + This will first call `urlEncoded()`, then replace every + `+` with `%2B`. */ - func urlEncoded() -> String? { - addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)? - .replacingOccurrences(of: "&", with: "%26") + func formEncoded() -> String? { + self.urlEncoded()? .replacingOccurrences(of: "+", with: "%2B") } + + /** + Encode the string to work with quary parameters. + + This will first call `addingPercentEncoding`, using the + `.urlPathAllowed` character set, then replace every `&` + with `%26`. + */ + func urlEncoded() -> String? { + self.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed)? + .replacingOccurrences(of: "&", with: "%26") + } } diff --git a/Sources/SwiftKit/Network/ApiEnvironment.swift b/Sources/SwiftKit/Network/ApiEnvironment.swift deleted file mode 100644 index 37d53db..0000000 --- a/Sources/SwiftKit/Network/ApiEnvironment.swift +++ /dev/null @@ -1,18 +0,0 @@ -// -// ApiEnvironment.swift -// SwiftKit -// -// Created by Daniel Saidi on 2020-10-24. -// Copyright © 2020 Cineasterna. All rights reserved. -// - -import Foundation - -/** - This protocol represents an external api environment with a - specific root `url`, e.g. test, staging or production. - */ -public protocol ApiEnvironment { - - var url: URL { get } -} diff --git a/Sources/SwiftKit/Network/ApiService.swift b/Sources/SwiftKit/Network/ApiService.swift index 01aef49..26b081e 100644 --- a/Sources/SwiftKit/Network/ApiService.swift +++ b/Sources/SwiftKit/Network/ApiService.swift @@ -34,7 +34,7 @@ public extension ApiService { This function returns a `URLRequest` that is configured for the given `httpMethod` and the route's `queryItems`. */ - func request(for route: ApiRoute, httpMethod: HttpMethod) -> URLRequest { + func request(for route: ApiRoute) -> URLRequest { route.request(for: environment, httpMethod: httpMethod) } @@ -42,7 +42,8 @@ public extension ApiService { for route: ApiRoute, type: Model.Type, httpMethod: HttpMethod = .get, - completion: @escaping ApiCompletion) -> URLSessionDataTask { + completion: @escaping ApiCompletion + ) -> URLSessionDataTask { let request = self.request(for: route, httpMethod: httpMethod) return task(for: request, type: type, completion: completion) } diff --git a/Sources/SwiftKit/_Deprecated/Network/ApiEnvironment.swift b/Sources/SwiftKit/_Deprecated/Network/ApiEnvironment.swift new file mode 100644 index 0000000..e23a807 --- /dev/null +++ b/Sources/SwiftKit/_Deprecated/Network/ApiEnvironment.swift @@ -0,0 +1,7 @@ +import Foundation + +// @available(*, deprecated, message: "Use ApiKit instead.") +public protocol ApiEnvironment { + + var url: URL { get } +} diff --git a/Sources/SwiftKit/Network/ApiRoute.swift b/Sources/SwiftKit/_Deprecated/Network/ApiRoute.swift similarity index 90% rename from Sources/SwiftKit/Network/ApiRoute.swift rename to Sources/SwiftKit/_Deprecated/Network/ApiRoute.swift index 973702e..e84dc61 100644 --- a/Sources/SwiftKit/Network/ApiRoute.swift +++ b/Sources/SwiftKit/_Deprecated/Network/ApiRoute.swift @@ -1,19 +1,12 @@ -// -// ApiRoute.swift -// SwiftKit -// -// Created by Daniel Saidi on 2020-10-24. -// Copyright © 2020 Cineasterna. All rights reserved. -// - import Foundation -/** - This protocol represents an external api route, e.g. `login` - or `user`. Each route is a separate action that defines all - information required to perform an api request. - */ +// @available(*, deprecated, message: "Use ApiKit instead.") public protocol ApiRoute { + + /** + The HTTP method to use. + */ + var httpMethod: HttpMethod { get } /** The route's environment-relative path, that is appended @@ -43,6 +36,7 @@ public protocol ApiRoute { var queryParams: [String: String] { get } } +// @available(*, deprecated, message: "Use ApiKit instead.") public extension ApiRoute { /** diff --git a/Sources/SwiftKit/Network/HttpMethod.swift b/Sources/SwiftKit/_Deprecated/Network/HttpMethod.swift similarity index 51% rename from Sources/SwiftKit/Network/HttpMethod.swift rename to Sources/SwiftKit/_Deprecated/Network/HttpMethod.swift index 23222c9..df79657 100644 --- a/Sources/SwiftKit/Network/HttpMethod.swift +++ b/Sources/SwiftKit/_Deprecated/Network/HttpMethod.swift @@ -1,17 +1,6 @@ -// -// HttpMethod.swift -// SwiftKit -// -// Created by Daniel Saidi on 2020-09-30. -// Copyright © 2021 Daniel Saidi. All rights reserved. -// - import Foundation -/** - This enum lists the various HTTP methods that are supported - by REST. - */ +// @available(*, deprecated, message: "Use ApiKit instead.") public enum HttpMethod: String { case connect diff --git a/Tests/SwiftKitTests/Network/ApiRouteTests.swift b/Tests/SwiftKitTests/Network/ApiRouteTests.swift deleted file mode 100644 index c299f1d..0000000 --- a/Tests/SwiftKitTests/Network/ApiRouteTests.swift +++ /dev/null @@ -1,88 +0,0 @@ -// -// ApiRouteTests.swift -// SwiftKitTests -// -// Created by Daniel Saidi on 2020-10-25. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import Quick -import Nimble -import Foundation -import SwiftKit - -class ApiRouteTests: QuickSpec { - - override func spec() { - - let env = TestEnvironment() - let route = TestRoute() - - describe("post params string") { - - it("url encodes values") { - let str = route.postParamsString - expect(str).to(equal("baz?=BAM%3F&foo&=bar%26")) - } - } - - describe("form data request") { - - it("is correctly configured") { - let req = route.formDataRequest(for: env) - let expectedData = "baz?=BAM%3F&foo&=bar%26".data(using: .utf8) - expect(req.url?.absoluteString).to(equal("http://example.com/1/2/3?anyone?=there?&hello%26=world%26")) - expect(req.allHTTPHeaderFields?["Content-Type"]).to(equal("application/x-www-form-urlencoded")) - expect(req.httpBody).to(equal(expectedData)) - } - } - - describe("query items") { - - it("are mapped query params without url encoding") { - let items = route.queryItems.sorted { $0.name < $1.name } - expect(items.count).to(equal(2)) - expect(items[0].name).to(equal("anyone?")) - expect(items[0].value).to(equal("there?")) - expect(items[1].name).to(equal("hello&")) - expect(items[1].value).to(equal("world&")) - } - } - - describe("data request") { - - it("is correctly configured") { - let req = route.request(for: env) - expect(req.url?.absoluteString).to(equal("http://example.com/1/2/3?anyone?=there?&hello%26=world%26")) - expect(req.allHTTPHeaderFields?["Content-Type"]).to(equal("application/json")) - } - } - - describe("url in environment") { - - it("appends path to environment url") { - let env = TestEnvironment() - let route = TestRoute() - let url = route.url(in: env).absoluteString - expect(url).to(equal("http://example.com/1/2/3")) - } - } - } -} - -private struct TestEnvironment: ApiEnvironment { - - var url: URL { - guard let url = URL(string: "http://example.com") else { fatalError() } - return url - } -} - -private struct TestRoute: ApiRoute { - - var path: String { "1/2/3" } - var postData: Data? { nil } - var postParams: [String: String] { ["foo&": "bar&", "baz?": "BAM?"] } - var queryParams: [String: String] { ["hello&": "world&", "anyone?": "there?"] } - var urlEncodeParams: Bool { true } -} diff --git a/Tests/SwiftKitTests/Network/HttpMethodTests.swift b/Tests/SwiftKitTests/Network/HttpMethodTests.swift deleted file mode 100644 index 2662092..0000000 --- a/Tests/SwiftKitTests/Network/HttpMethodTests.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// HttpMethodTests.swift -// SwiftKitTests -// -// Created by Daniel Saidi on 2020-10-25. -// Copyright © 2020 Daniel Saidi. All rights reserved. -// - -import Quick -import Nimble -import SwiftKit - -class HttpMethodTests: QuickSpec { - - override func spec() { - - describe("method") { - - func result(for method: HttpMethod) -> String { - method.method - } - - it("is correct for all cases") { - expect(result(for: .connect)).to(equal("CONNECT")) - expect(result(for: .delete)).to(equal("DELETE")) - expect(result(for: .get)).to(equal("GET")) - expect(result(for: .head)).to(equal("HEAD")) - expect(result(for: .options)).to(equal("OPTIONS")) - expect(result(for: .post)).to(equal("POST")) - expect(result(for: .put)).to(equal("PUT")) - expect(result(for: .trace)).to(equal("TRACE")) - } - } - } -}