diff --git a/AutoCat2.xcodeproj/project.pbxproj b/AutoCat2.xcodeproj/project.pbxproj index 015b462..ade8738 100644 --- a/AutoCat2.xcodeproj/project.pbxproj +++ b/AutoCat2.xcodeproj/project.pbxproj @@ -18,6 +18,9 @@ 6841A8FF53F0AADF96B138C1 /* UIControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6841AFE790F6FC06838B1E2C /* UIControl.swift */; }; 6841ABD5E4B126DEF3612BBD /* PNKeyboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6841AB0052E9DB6914901EA3 /* PNKeyboard.swift */; }; 6841AF924E165F1B3A3B5FB5 /* AuthController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6841ABEA0314E3B4E438C311 /* AuthController.swift */; }; + 7A0391D6285933EF000EE522 /* AutoCatCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7A49F4D727D4064500AEAAE0 /* AutoCatCore.framework */; }; + 7A0391D7285933EF000EE522 /* AutoCatCore.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 7A49F4D727D4064500AEAAE0 /* AutoCatCore.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 7A0391DD28593DBC000EE522 /* SidebarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A0391DC28593DBC000EE522 /* SidebarController.swift */; }; 7A1D80E027F1F275007BD64F /* DifferenceKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7A1D80DF27F1F275007BD64F /* DifferenceKit */; }; 7A1D80E627F20FCB007BD64F /* DifferenceKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7A1D80E527F20FCB007BD64F /* DifferenceKit */; }; 7A1D80E827F30399007BD64F /* VModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A1D80E727F30399007BD64F /* VModel.swift */; }; @@ -72,6 +75,11 @@ 7A558AB027FA3CCF001A18EE /* SettingsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A558AA527FA3CCF001A18EE /* SettingsTests.swift */; }; 7A558AB127FA3CCF001A18EE /* ApiTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A558AA627FA3CCF001A18EE /* ApiTests.swift */; }; 7A9F2AC327E71531006492A9 /* ACTabBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A9F2AC227E71531006492A9 /* ACTabBarController.swift */; }; + 7A9FD4072857AF590057ECFA /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A9FD4062857AF590057ECFA /* AppDelegate.swift */; }; + 7A9FD4092857AF590057ECFA /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A9FD4082857AF590057ECFA /* ViewController.swift */; }; + 7A9FD40B2857AF5A0057ECFA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7A9FD40A2857AF5A0057ECFA /* Assets.xcassets */; }; + 7A9FD40E2857AF5A0057ECFA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7A9FD40C2857AF5A0057ECFA /* Main.storyboard */; }; + 7A9FD41A2857AF8D0057ECFA /* DifferenceKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7A9FD4192857AF8D0057ECFA /* DifferenceKit */; }; 7ABAB2E427FDF7BC00553691 /* check_success.json in Resources */ = {isa = PBXBuildFile; fileRef = 7ABAB2E327FDF7BC00553691 /* check_success.json */; }; 7ABAB2E627FDF83100553691 /* GenericMethodMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7ABAB2E527FDF83100553691 /* GenericMethodMock.swift */; }; 7AE32D6427F05F89004EF6E0 /* VehicleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AE32D6327F05F89004EF6E0 /* VehicleCell.swift */; }; @@ -91,6 +99,13 @@ /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + 7A0391D8285933EF000EE522 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 7A49F49727D4061900AEAAE0 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 7A49F4D627D4064500AEAAE0; + remoteInfo = AutoCatCore; + }; 7A49F4B627D4061B00AEAAE0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 7A49F49727D4061900AEAAE0 /* Project object */; @@ -129,6 +144,17 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ + 7A0391DA285933EF000EE522 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 7A0391D7285933EF000EE522 /* AutoCatCore.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; 7A49F4F127D4064500AEAAE0 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -154,6 +180,7 @@ 6841ADEEC165FA9124C5EF40 /* UITextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UITextField.swift; sourceTree = ""; }; 6841AFB465BF16E122875D9A /* ACButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ACButton.swift; sourceTree = ""; }; 6841AFE790F6FC06838B1E2C /* UIControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIControl.swift; sourceTree = ""; }; + 7A0391DC28593DBC000EE522 /* SidebarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarController.swift; sourceTree = ""; }; 7A1D80E727F30399007BD64F /* VModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VModel.swift; sourceTree = ""; }; 7A24C19527EE212E00049E7F /* RoadNumbers.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = RoadNumbers.otf; sourceTree = ""; }; 7A24C19627EE212E00049E7F /* RoadNumbers2.0.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = RoadNumbers2.0.otf; sourceTree = ""; }; @@ -207,6 +234,12 @@ 7A558AAE27FA3CCF001A18EE /* MockURLProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockURLProtocol.swift; sourceTree = ""; }; 7A558AAF27FA3CCF001A18EE /* ApiMethodMockProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ApiMethodMockProtocol.swift; sourceTree = ""; }; 7A9F2AC227E71531006492A9 /* ACTabBarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ACTabBarController.swift; sourceTree = ""; }; + 7A9FD4042857AF590057ECFA /* AutoCat2Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AutoCat2Mac.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 7A9FD4062857AF590057ECFA /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7A9FD4082857AF590057ECFA /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 7A9FD40A2857AF5A0057ECFA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 7A9FD40D2857AF5A0057ECFA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 7A9FD40F2857AF5A0057ECFA /* AutoCat2Mac.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AutoCat2Mac.entitlements; sourceTree = ""; }; 7ABAB2E327FDF7BC00553691 /* check_success.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = check_success.json; sourceTree = ""; }; 7ABAB2E527FDF83100553691 /* GenericMethodMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenericMethodMock.swift; sourceTree = ""; }; 7AE32D6327F05F89004EF6E0 /* VehicleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VehicleCell.swift; sourceTree = ""; }; @@ -267,6 +300,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 7A9FD4012857AF590057ECFA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 7A9FD41A2857AF8D0057ECFA /* DifferenceKit in Frameworks */, + 7A0391D6285933EF000EE522 /* AutoCatCore.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -319,6 +361,14 @@ path = Components; sourceTree = ""; }; + 7A0391DB28593DAB000EE522 /* Controller */ = { + isa = PBXGroup; + children = ( + 7A0391DC28593DBC000EE522 /* SidebarController.swift */, + ); + path = Controller; + sourceTree = ""; + }; 7A24C19427EE212E00049E7F /* Fonts */ = { isa = PBXGroup; children = ( @@ -373,7 +423,9 @@ 7A49F4C227D4061B00AEAAE0 /* AutoCat2UITests */, 7A49F4D827D4064500AEAAE0 /* AutoCatCore */, 7A49F4E627D4064500AEAAE0 /* AutoCatCoreTests */, + 7A9FD4052857AF590057ECFA /* AutoCat2Mac */, 7A49F4A027D4061900AEAAE0 /* Products */, + 7A9FD4132857AF860057ECFA /* Frameworks */, ); sourceTree = ""; }; @@ -385,6 +437,7 @@ 7A49F4BF27D4061B00AEAAE0 /* AutoCat2UITests.xctest */, 7A49F4D727D4064500AEAAE0 /* AutoCatCore.framework */, 7A49F4E027D4064500AEAAE0 /* AutoCatCoreTests.xctest */, + 7A9FD4042857AF590057ECFA /* AutoCat2Mac.app */, ); name = Products; sourceTree = ""; @@ -528,6 +581,26 @@ path = Lib; sourceTree = ""; }; + 7A9FD4052857AF590057ECFA /* AutoCat2Mac */ = { + isa = PBXGroup; + children = ( + 7A0391DB28593DAB000EE522 /* Controller */, + 7A9FD4062857AF590057ECFA /* AppDelegate.swift */, + 7A9FD4082857AF590057ECFA /* ViewController.swift */, + 7A9FD40A2857AF5A0057ECFA /* Assets.xcassets */, + 7A9FD40C2857AF5A0057ECFA /* Main.storyboard */, + 7A9FD40F2857AF5A0057ECFA /* AutoCat2Mac.entitlements */, + ); + path = AutoCat2Mac; + sourceTree = ""; + }; + 7A9FD4132857AF860057ECFA /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; 7AE32D6227F05F5D004EF6E0 /* Cells */ = { isa = PBXGroup; children = ( @@ -686,6 +759,28 @@ productReference = 7A49F4E027D4064500AEAAE0 /* AutoCatCoreTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + 7A9FD4032857AF590057ECFA /* AutoCat2Mac */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7A9FD4122857AF5A0057ECFA /* Build configuration list for PBXNativeTarget "AutoCat2Mac" */; + buildPhases = ( + 7A9FD4002857AF590057ECFA /* Sources */, + 7A9FD4012857AF590057ECFA /* Frameworks */, + 7A9FD4022857AF590057ECFA /* Resources */, + 7A0391DA285933EF000EE522 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 7A0391D9285933EF000EE522 /* PBXTargetDependency */, + ); + name = AutoCat2Mac; + packageProductDependencies = ( + 7A9FD4192857AF8D0057ECFA /* DifferenceKit */, + ); + productName = AutoCat2Mac; + productReference = 7A9FD4042857AF590057ECFA /* AutoCat2Mac.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -693,8 +788,8 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1320; - LastUpgradeCheck = 1320; + LastSwiftUpdateCheck = 1340; + LastUpgradeCheck = 1400; TargetAttributes = { 7A49F49E27D4061900AEAAE0 = { CreatedOnToolsVersion = 13.2.1; @@ -714,6 +809,9 @@ CreatedOnToolsVersion = 13.2.1; TestTargetID = 7A49F49E27D4061900AEAAE0; }; + 7A9FD4032857AF590057ECFA = { + CreatedOnToolsVersion = 13.4.1; + }; }; }; buildConfigurationList = 7A49F49A27D4061900AEAAE0 /* Build configuration list for PBXProject "AutoCat2" */; @@ -741,6 +839,7 @@ 7A49F4BE27D4061B00AEAAE0 /* AutoCat2UITests */, 7A49F4D627D4064500AEAAE0 /* AutoCatCore */, 7A49F4DF27D4064500AEAAE0 /* AutoCatCoreTests */, + 7A9FD4032857AF590057ECFA /* AutoCat2Mac */, ); }; /* End PBXProject section */ @@ -788,6 +887,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 7A9FD4022857AF590057ECFA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7A9FD40B2857AF5A0057ECFA /* Assets.xcassets in Resources */, + 7A9FD40E2857AF5A0057ECFA /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -891,9 +999,24 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 7A9FD4002857AF590057ECFA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7A9FD4092857AF590057ECFA /* ViewController.swift in Sources */, + 7A0391DD28593DBC000EE522 /* SidebarController.swift in Sources */, + 7A9FD4072857AF590057ECFA /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + 7A0391D9285933EF000EE522 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 7A49F4D627D4064500AEAAE0 /* AutoCatCore */; + targetProxy = 7A0391D8285933EF000EE522 /* PBXContainerItemProxy */; + }; 7A49F4B727D4061B00AEAAE0 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 7A49F49E27D4061900AEAAE0 /* AutoCat2 */; @@ -938,6 +1061,14 @@ name = LaunchScreen.storyboard; sourceTree = ""; }; + 7A9FD40C2857AF5A0057ECFA /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 7A9FD40D2857AF5A0057ECFA /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -1196,6 +1327,7 @@ 7A49F4EF27D4064500AEAAE0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -1212,13 +1344,16 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = pro.aliencat.AutoCatCore; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "watchsimulator watchos macosx iphonesimulator iphoneos driverkit appletvsimulator appletvos"; + SUPPORTS_MACCATALYST = YES; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "1,2,6"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -1227,6 +1362,7 @@ 7A49F4F027D4064500AEAAE0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -1243,13 +1379,16 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); + MACOSX_DEPLOYMENT_TARGET = 12.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = pro.aliencat.AutoCatCore; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "watchsimulator watchos macosx iphonesimulator iphoneos driverkit appletvsimulator appletvos"; + SUPPORTS_MACCATALYST = YES; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2"; + TARGETED_DEVICE_FAMILY = "1,2,6"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -1291,6 +1430,72 @@ }; name = Release; }; + 7A9FD4102857AF5A0057ECFA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = AutoCat2Mac/AutoCat2Mac.entitlements; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = 46DTTB8X4S; + ENABLE_HARDENED_RUNTIME = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSMainStoryboardFile = Main; + INFOPLIST_KEY_NSPrincipalClass = NSApplication; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 12.3; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = pro.aliencat.AutoCat2Mac; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 7A9FD4112857AF5A0057ECFA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = AutoCat2Mac/AutoCat2Mac.entitlements; + CODE_SIGN_IDENTITY = "-"; + "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development"; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; + DEVELOPMENT_TEAM = 46DTTB8X4S; + ENABLE_HARDENED_RUNTIME = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INFOPLIST_KEY_NSMainStoryboardFile = Main; + INFOPLIST_KEY_NSPrincipalClass = NSApplication; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 12.3; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = pro.aliencat.AutoCat2Mac; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = macosx; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -1348,6 +1553,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 7A9FD4122857AF5A0057ECFA /* Build configuration list for PBXNativeTarget "AutoCat2Mac" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7A9FD4102857AF5A0057ECFA /* Debug */, + 7A9FD4112857AF5A0057ECFA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ @@ -1414,6 +1628,11 @@ package = 7A48B26527D9442A004D1A4B /* XCRemoteSwiftPackageReference "PKHUD" */; productName = PKHUD; }; + 7A9FD4192857AF8D0057ECFA /* DifferenceKit */ = { + isa = XCSwiftPackageProductDependency; + package = 7A1D80DE27F1F275007BD64F /* XCRemoteSwiftPackageReference "DifferenceKit" */; + productName = DifferenceKit; + }; 7AE32D6D27F06D2D004EF6E0 /* SwiftDate */ = { isa = XCSwiftPackageProductDependency; package = 7AE32D6C27F06D2D004EF6E0 /* XCRemoteSwiftPackageReference "SwiftDate" */; diff --git a/AutoCat2.xcodeproj/xcuserdata/selim.xcuserdatad/xcschemes/xcschememanagement.plist b/AutoCat2.xcodeproj/xcuserdata/selim.xcuserdatad/xcschemes/xcschememanagement.plist index b84da60..26c376e 100644 --- a/AutoCat2.xcodeproj/xcuserdata/selim.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/AutoCat2.xcodeproj/xcuserdata/selim.xcuserdatad/xcschemes/xcschememanagement.plist @@ -10,6 +10,11 @@ 0 AutoCat2.xcscheme_^#shared#^_ + + orderHint + 1 + + AutoCat2Mac.xcscheme_^#shared#^_ orderHint 0 @@ -40,6 +45,27 @@ orderHint 4 + DifferenceKit (Playground) 3.xcscheme + + isShown + + orderHint + 8 + + DifferenceKit (Playground) 4.xcscheme + + isShown + + orderHint + 9 + + DifferenceKit (Playground) 5.xcscheme + + isShown + + orderHint + 10 + DifferenceKit (Playground).xcscheme isShown @@ -61,6 +87,27 @@ orderHint 7 + SwiftDate (Playground) 3.xcscheme + + isShown + + orderHint + 11 + + SwiftDate (Playground) 4.xcscheme + + isShown + + orderHint + 12 + + SwiftDate (Playground) 5.xcscheme + + isShown + + orderHint + 13 + SwiftDate (Playground).xcscheme isShown diff --git a/AutoCat2/Controllers/ReportController.swift b/AutoCat2/Controllers/ReportController.swift index 435a542..cff1054 100644 --- a/AutoCat2/Controllers/ReportController.swift +++ b/AutoCat2/Controllers/ReportController.swift @@ -102,13 +102,9 @@ struct ReportItem { class ReportController: UIViewController, UICollectionViewDataSource { - private let reportTextItemId = String(describing: ReportTextItemCell.self) - private lazy var collectionView: UICollectionView = { let collection = UICollectionView(frame: .zero, collectionViewLayout: createLayout()) collection.translatesAutoresizingMaskIntoConstraints = false - collection.register(ReportTextItemCell.self, - forCellWithReuseIdentifier: reportTextItemId) collection.dataSource = self return collection }() diff --git a/AutoCat2Mac/AppDelegate.swift b/AutoCat2Mac/AppDelegate.swift new file mode 100644 index 0000000..6f512b1 --- /dev/null +++ b/AutoCat2Mac/AppDelegate.swift @@ -0,0 +1,21 @@ +// +// AppDelegate.swift +// AutoCat2Mac +// +// Created by Selim Mustafaev on 13.06.2022. +// + +import Cocoa + +@main +class AppDelegate: NSObject, NSApplicationDelegate { + + func applicationDidFinishLaunching(_ aNotification: Notification) { + + } + + func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + true + } +} + diff --git a/AutoCat2Mac/Assets.xcassets/AccentColor.colorset/Contents.json b/AutoCat2Mac/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/AutoCat2Mac/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/AutoCat2Mac/Assets.xcassets/AppIcon.appiconset/Contents.json b/AutoCat2Mac/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..3f00db4 --- /dev/null +++ b/AutoCat2Mac/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/AutoCat2Mac/Assets.xcassets/Contents.json b/AutoCat2Mac/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/AutoCat2Mac/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/AutoCat2Mac/AutoCat2Mac.entitlements b/AutoCat2Mac/AutoCat2Mac.entitlements new file mode 100644 index 0000000..f2ef3ae --- /dev/null +++ b/AutoCat2Mac/AutoCat2Mac.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/AutoCat2Mac/Base.lproj/Main.storyboard b/AutoCat2Mac/Base.lproj/Main.storyboard new file mode 100644 index 0000000..4b31aa1 --- /dev/null +++ b/AutoCat2Mac/Base.lproj/Main.storyboard @@ -0,0 +1,875 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + Default + + + + + + + Left to Right + + + + + + + Right to Left + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/AutoCat2Mac/Controller/SidebarController.swift b/AutoCat2Mac/Controller/SidebarController.swift new file mode 100644 index 0000000..a861e86 --- /dev/null +++ b/AutoCat2Mac/Controller/SidebarController.swift @@ -0,0 +1,94 @@ +// +// MainController.swift +// AutoCat2Mac +// +// Created by Selim Mustafaev on 15.06.2022. +// + +import AppKit + +enum SidebarSection: Int, CaseIterable { + + case source + + var name: String { + switch self { + case .source: + return "Vehicles DB" + } + } +} + +enum VehicleSource: Int, CaseIterable { + + case local + case remote + + var name: String { + switch self { + case .local: + return "Local history" + case .remote: + return "Remote DB" + } + } + + var iconName: String { + switch self { + case .local: + return "internaldrive" + case .remote: + return "externaldrive.connected.to.line.below" + } + } +} + +class SidebarController: NSViewController, NSOutlineViewDataSource, NSOutlineViewDelegate { + + override func viewDidLoad() { + super.viewDidLoad() + } + + // MARK: - NSOutlineViewDataSource + + func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -> Int { + guard item != nil else { + return SidebarSection.allCases.count + } + + if let section = item as? SidebarSection { + return VehicleSource.allCases.count + } else { + return 0 + } + } + + func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -> Any { + guard item != nil else { + return SidebarSection.source + } + + if let section = item as? SidebarSection { + return VehicleSource.allCases[index] + } else { + return SidebarSection.source + } + } + + func outlineView(_ outlineView: NSOutlineView, isItemExpandable item: Any) -> Bool { + return item is SidebarSection + } + + // MARK: - NSOutlineViewDelegate + + func outlineView(_ outlineView: NSOutlineView, viewFor tableColumn: NSTableColumn?, item: Any) -> NSView? { + + if let category = item as? SidebarSection { + let cell = outlineView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "SidebarHeaderCell"), owner: nil) as? NSTableCellView + cell?.textField?.stringValue = category.name + return cell + } + + return nil + } +} diff --git a/AutoCat2Mac/ViewController.swift b/AutoCat2Mac/ViewController.swift new file mode 100644 index 0000000..e217744 --- /dev/null +++ b/AutoCat2Mac/ViewController.swift @@ -0,0 +1,26 @@ +// +// ViewController.swift +// AutoCat2Mac +// +// Created by Selim Mustafaev on 13.06.2022. +// + +import Cocoa + +class ViewController: NSViewController { + + override func viewDidLoad() { + super.viewDidLoad() + + // Do any additional setup after loading the view. + } + + override var representedObject: Any? { + didSet { + // Update the view, if already loaded. + } + } + + +} + diff --git a/AutoCatCore/Utils/Api.swift b/AutoCatCore/Utils/Api.swift index e87bb0a..794905a 100644 --- a/AutoCatCore/Utils/Api.swift +++ b/AutoCatCore/Utils/Api.swift @@ -39,7 +39,7 @@ public class Api: ApiProtocol { // MARK: - Private wrappres - private func createRequest(api: String, method: String, body: B? = nil, params: [String:P]? = nil) -> URLRequest? where B: Encodable, P: LosslessStringConvertible { + private func createRequest(api: String, method: String, body: (some Encodable)? = nil, params: [String: some LosslessStringConvertible]? = nil) -> URLRequest? { guard var urlComponents = URLComponents(string: Constants.baseUrl + api) else { return nil } if let params = params, method.uppercased() == "GET" { @@ -63,7 +63,7 @@ public class Api: ApiProtocol { return request } - private func makeRequest(api: String, method: String = "GET", body: B?, params: [String:P]? = nil) async throws -> T where T: Decodable, B: Encodable, P: LosslessStringConvertible { + private func makeRequest(api: String, method: String = "GET", body: (some Encodable)?, params: [String: some LosslessStringConvertible]? = nil) async throws -> T where T: Decodable { guard let request = self.createRequest(api: api, method: method, body: body, params: params) else { throw ApiError.message("Error creating request") } @@ -116,7 +116,7 @@ public class Api: ApiProtocol { } } - private func makeGetRequest(api: String, params:[String: P]? = nil) async throws -> T where T: Decodable, P: LosslessStringConvertible { + private func makeGetRequest(api: String, params:[String: some LosslessStringConvertible]? = nil) async throws -> T where T: Decodable { return try await self.makeRequest(api: api, method: "GET", body: nil as Int?, params: params) } @@ -128,7 +128,7 @@ public class Api: ApiProtocol { return try await self.makeRequest(api: api, method: method, body: nil as Int?, params: nil as [String:Int]?) } - private func makeBodyRequest(api: String, body: B?, method: String = "POST") async throws -> T where T: Decodable, B: Encodable { + private func makeBodyRequest(api: String, body: (some Encodable)?, method: String = "POST") async throws -> T where T: Decodable { return try await self.makeRequest(api: api, method: method, body: body, params: nil as [String:Int]?) }