diff --git a/NearFuture.xcodeproj/project.pbxproj b/NearFuture.xcodeproj/project.pbxproj index ed3bf40..36f44a1 100644 --- a/NearFuture.xcodeproj/project.pbxproj +++ b/NearFuture.xcodeproj/project.pbxproj @@ -3,59 +3,74 @@ archiveVersion = 1; classes = { }; - objectVersion = 70; + objectVersion = 56; objects = { /* Begin PBXBuildFile section */ - A91288592D1C7E3000912B3C /* SFSymbolsPicker in Frameworks */ = {isa = PBXBuildFile; productRef = A91288582D1C7E3000912B3C /* SFSymbolsPicker */; }; + A920C2882D24011400E4F9B1 /* NearFutureApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = A920C2872D24011400E4F9B1 /* NearFutureApp.swift */; }; + A920C28C2D24011400E4F9B1 /* Item.swift in Sources */ = {isa = PBXBuildFile; fileRef = A920C28B2D24011400E4F9B1 /* Item.swift */; }; + A920C28E2D24011A00E4F9B1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A920C28D2D24011A00E4F9B1 /* Assets.xcassets */; }; + A920C2922D24011A00E4F9B1 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A920C2912D24011A00E4F9B1 /* Preview Assets.xcassets */; }; + A920C29C2D24011A00E4F9B1 /* NearFutureTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A920C29B2D24011A00E4F9B1 /* NearFutureTests.swift */; }; + A920C2A62D24011B00E4F9B1 /* NearFutureUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A920C2A52D24011B00E4F9B1 /* NearFutureUITests.swift */; }; + A920C2A82D24011B00E4F9B1 /* NearFutureUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A920C2A72D24011B00E4F9B1 /* NearFutureUITestsLaunchTests.swift */; }; + A920C2B82D2401A300E4F9B1 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A920C2B42D2401A100E4F9B1 /* SettingsView.swift */; }; + A920C2BB2D2401A400E4F9B1 /* AddEventView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A920C2B72D2401A300E4F9B1 /* AddEventView.swift */; }; + A920C2BE2D24021A00E4F9B1 /* SFSymbolsPicker in Frameworks */ = {isa = PBXBuildFile; productRef = A920C2BD2D24021A00E4F9B1 /* SFSymbolsPicker */; }; + A920C2C12D2403CA00E4F9B1 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A920C2C02D2403CA00E4F9B1 /* ContentView.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - A9B4BFDC2D1AE66700212CE2 /* PBXContainerItemProxy */ = { + A920C2982D24011A00E4F9B1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = A9B4BFC02D1AE66000212CE2 /* Project object */; + containerPortal = A920C27C2D24011300E4F9B1 /* Project object */; proxyType = 1; - remoteGlobalIDString = A9B4BFC72D1AE66000212CE2; + remoteGlobalIDString = A920C2832D24011300E4F9B1; remoteInfo = NearFuture; }; - A9B4BFE62D1AE66700212CE2 /* PBXContainerItemProxy */ = { + A920C2A22D24011B00E4F9B1 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = A9B4BFC02D1AE66000212CE2 /* Project object */; + containerPortal = A920C27C2D24011300E4F9B1 /* Project object */; proxyType = 1; - remoteGlobalIDString = A9B4BFC72D1AE66000212CE2; + remoteGlobalIDString = A920C2832D24011300E4F9B1; remoteInfo = NearFuture; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - A9B4BFC82D1AE66000212CE2 /* NearFuture.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NearFuture.app; sourceTree = BUILT_PRODUCTS_DIR; }; - A9B4BFDB2D1AE66700212CE2 /* NearFutureTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NearFutureTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - A9B4BFE52D1AE66700212CE2 /* NearFutureUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NearFutureUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + A920C2842D24011400E4F9B1 /* NearFuture.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NearFuture.app; sourceTree = BUILT_PRODUCTS_DIR; }; + A920C2872D24011400E4F9B1 /* NearFutureApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NearFutureApp.swift; sourceTree = ""; }; + A920C28B2D24011400E4F9B1 /* Item.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Item.swift; sourceTree = ""; }; + A920C28D2D24011A00E4F9B1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + A920C28F2D24011A00E4F9B1 /* NearFuture.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NearFuture.entitlements; sourceTree = ""; }; + A920C2912D24011A00E4F9B1 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + A920C2972D24011A00E4F9B1 /* NearFutureTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NearFutureTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + A920C29B2D24011A00E4F9B1 /* NearFutureTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NearFutureTests.swift; sourceTree = ""; }; + A920C2A12D24011B00E4F9B1 /* NearFutureUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NearFutureUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + A920C2A52D24011B00E4F9B1 /* NearFutureUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NearFutureUITests.swift; sourceTree = ""; }; + A920C2A72D24011B00E4F9B1 /* NearFutureUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NearFutureUITestsLaunchTests.swift; sourceTree = ""; }; + A920C2B42D2401A100E4F9B1 /* SettingsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = ""; }; + A920C2B72D2401A300E4F9B1 /* AddEventView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AddEventView.swift; sourceTree = ""; }; + A920C2C02D2403CA00E4F9B1 /* ContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; /* End PBXFileReference section */ -/* Begin PBXFileSystemSynchronizedRootGroup section */ - A9B4BFCA2D1AE66000212CE2 /* NearFuture */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = NearFuture; sourceTree = ""; }; - A9B4BFDE2D1AE66700212CE2 /* NearFutureTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = NearFutureTests; sourceTree = ""; }; - A9B4BFE82D1AE66700212CE2 /* NearFutureUITests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = NearFutureUITests; sourceTree = ""; }; -/* End PBXFileSystemSynchronizedRootGroup section */ - /* Begin PBXFrameworksBuildPhase section */ - A9B4BFC52D1AE66000212CE2 /* Frameworks */ = { + A920C2812D24011300E4F9B1 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A91288592D1C7E3000912B3C /* SFSymbolsPicker in Frameworks */, + A920C2BE2D24021A00E4F9B1 /* SFSymbolsPicker in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - A9B4BFD82D1AE66700212CE2 /* Frameworks */ = { + A920C2942D24011A00E4F9B1 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - A9B4BFE22D1AE66700212CE2 /* Frameworks */ = { + A920C29E2D24011B00E4F9B1 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( @@ -65,161 +80,189 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - A9B4BFBF2D1AE66000212CE2 = { + A920C27B2D24011300E4F9B1 = { isa = PBXGroup; children = ( - A9B4BFCA2D1AE66000212CE2 /* NearFuture */, - A9B4BFDE2D1AE66700212CE2 /* NearFutureTests */, - A9B4BFE82D1AE66700212CE2 /* NearFutureUITests */, - A9B4BFC92D1AE66000212CE2 /* Products */, + A920C2862D24011400E4F9B1 /* NearFuture */, + A920C29A2D24011A00E4F9B1 /* NearFutureTests */, + A920C2A42D24011B00E4F9B1 /* NearFutureUITests */, + A920C2852D24011400E4F9B1 /* Products */, ); sourceTree = ""; }; - A9B4BFC92D1AE66000212CE2 /* Products */ = { + A920C2852D24011400E4F9B1 /* Products */ = { isa = PBXGroup; children = ( - A9B4BFC82D1AE66000212CE2 /* NearFuture.app */, - A9B4BFDB2D1AE66700212CE2 /* NearFutureTests.xctest */, - A9B4BFE52D1AE66700212CE2 /* NearFutureUITests.xctest */, + A920C2842D24011400E4F9B1 /* NearFuture.app */, + A920C2972D24011A00E4F9B1 /* NearFutureTests.xctest */, + A920C2A12D24011B00E4F9B1 /* NearFutureUITests.xctest */, ); name = Products; sourceTree = ""; }; + A920C2862D24011400E4F9B1 /* NearFuture */ = { + isa = PBXGroup; + children = ( + A920C2B72D2401A300E4F9B1 /* AddEventView.swift */, + A920C2C02D2403CA00E4F9B1 /* ContentView.swift */, + A920C2B42D2401A100E4F9B1 /* SettingsView.swift */, + A920C2872D24011400E4F9B1 /* NearFutureApp.swift */, + A920C28B2D24011400E4F9B1 /* Item.swift */, + A920C28D2D24011A00E4F9B1 /* Assets.xcassets */, + A920C28F2D24011A00E4F9B1 /* NearFuture.entitlements */, + A920C2902D24011A00E4F9B1 /* Preview Content */, + ); + path = NearFuture; + sourceTree = ""; + }; + A920C2902D24011A00E4F9B1 /* Preview Content */ = { + isa = PBXGroup; + children = ( + A920C2912D24011A00E4F9B1 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + A920C29A2D24011A00E4F9B1 /* NearFutureTests */ = { + isa = PBXGroup; + children = ( + A920C29B2D24011A00E4F9B1 /* NearFutureTests.swift */, + ); + path = NearFutureTests; + sourceTree = ""; + }; + A920C2A42D24011B00E4F9B1 /* NearFutureUITests */ = { + isa = PBXGroup; + children = ( + A920C2A52D24011B00E4F9B1 /* NearFutureUITests.swift */, + A920C2A72D24011B00E4F9B1 /* NearFutureUITestsLaunchTests.swift */, + ); + path = NearFutureUITests; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ - A9B4BFC72D1AE66000212CE2 /* NearFuture */ = { + A920C2832D24011300E4F9B1 /* NearFuture */ = { isa = PBXNativeTarget; - buildConfigurationList = A9B4BFEF2D1AE66700212CE2 /* Build configuration list for PBXNativeTarget "NearFuture" */; + buildConfigurationList = A920C2AB2D24011B00E4F9B1 /* Build configuration list for PBXNativeTarget "NearFuture" */; buildPhases = ( - A9B4BFC42D1AE66000212CE2 /* Sources */, - A9B4BFC52D1AE66000212CE2 /* Frameworks */, - A9B4BFC62D1AE66000212CE2 /* Resources */, + A920C2802D24011300E4F9B1 /* Sources */, + A920C2812D24011300E4F9B1 /* Frameworks */, + A920C2822D24011300E4F9B1 /* Resources */, ); buildRules = ( ); dependencies = ( ); - fileSystemSynchronizedGroups = ( - A9B4BFCA2D1AE66000212CE2 /* NearFuture */, - ); name = NearFuture; packageProductDependencies = ( - A91288582D1C7E3000912B3C /* SFSymbolsPicker */, + A920C2BD2D24021A00E4F9B1 /* SFSymbolsPicker */, ); productName = NearFuture; - productReference = A9B4BFC82D1AE66000212CE2 /* NearFuture.app */; + productReference = A920C2842D24011400E4F9B1 /* NearFuture.app */; productType = "com.apple.product-type.application"; }; - A9B4BFDA2D1AE66700212CE2 /* NearFutureTests */ = { + A920C2962D24011A00E4F9B1 /* NearFutureTests */ = { isa = PBXNativeTarget; - buildConfigurationList = A9B4BFF22D1AE66700212CE2 /* Build configuration list for PBXNativeTarget "NearFutureTests" */; + buildConfigurationList = A920C2AE2D24011B00E4F9B1 /* Build configuration list for PBXNativeTarget "NearFutureTests" */; buildPhases = ( - A9B4BFD72D1AE66700212CE2 /* Sources */, - A9B4BFD82D1AE66700212CE2 /* Frameworks */, - A9B4BFD92D1AE66700212CE2 /* Resources */, + A920C2932D24011A00E4F9B1 /* Sources */, + A920C2942D24011A00E4F9B1 /* Frameworks */, + A920C2952D24011A00E4F9B1 /* Resources */, ); buildRules = ( ); dependencies = ( - A9B4BFDD2D1AE66700212CE2 /* PBXTargetDependency */, - ); - fileSystemSynchronizedGroups = ( - A9B4BFDE2D1AE66700212CE2 /* NearFutureTests */, + A920C2992D24011A00E4F9B1 /* PBXTargetDependency */, ); name = NearFutureTests; - packageProductDependencies = ( - ); productName = NearFutureTests; - productReference = A9B4BFDB2D1AE66700212CE2 /* NearFutureTests.xctest */; + productReference = A920C2972D24011A00E4F9B1 /* NearFutureTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; - A9B4BFE42D1AE66700212CE2 /* NearFutureUITests */ = { + A920C2A02D24011B00E4F9B1 /* NearFutureUITests */ = { isa = PBXNativeTarget; - buildConfigurationList = A9B4BFF52D1AE66700212CE2 /* Build configuration list for PBXNativeTarget "NearFutureUITests" */; + buildConfigurationList = A920C2B12D24011B00E4F9B1 /* Build configuration list for PBXNativeTarget "NearFutureUITests" */; buildPhases = ( - A9B4BFE12D1AE66700212CE2 /* Sources */, - A9B4BFE22D1AE66700212CE2 /* Frameworks */, - A9B4BFE32D1AE66700212CE2 /* Resources */, + A920C29D2D24011B00E4F9B1 /* Sources */, + A920C29E2D24011B00E4F9B1 /* Frameworks */, + A920C29F2D24011B00E4F9B1 /* Resources */, ); buildRules = ( ); dependencies = ( - A9B4BFE72D1AE66700212CE2 /* PBXTargetDependency */, - ); - fileSystemSynchronizedGroups = ( - A9B4BFE82D1AE66700212CE2 /* NearFutureUITests */, + A920C2A32D24011B00E4F9B1 /* PBXTargetDependency */, ); name = NearFutureUITests; - packageProductDependencies = ( - ); productName = NearFutureUITests; - productReference = A9B4BFE52D1AE66700212CE2 /* NearFutureUITests.xctest */; + productReference = A920C2A12D24011B00E4F9B1 /* NearFutureUITests.xctest */; productType = "com.apple.product-type.bundle.ui-testing"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - A9B4BFC02D1AE66000212CE2 /* Project object */ = { + A920C27C2D24011300E4F9B1 /* Project object */ = { isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = 1; - LastSwiftUpdateCheck = 1620; - LastUpgradeCheck = 1620; + LastSwiftUpdateCheck = 1540; + LastUpgradeCheck = 1540; TargetAttributes = { - A9B4BFC72D1AE66000212CE2 = { - CreatedOnToolsVersion = 16.2; + A920C2832D24011300E4F9B1 = { + CreatedOnToolsVersion = 15.4; }; - A9B4BFDA2D1AE66700212CE2 = { - CreatedOnToolsVersion = 16.2; - TestTargetID = A9B4BFC72D1AE66000212CE2; + A920C2962D24011A00E4F9B1 = { + CreatedOnToolsVersion = 15.4; + TestTargetID = A920C2832D24011300E4F9B1; }; - A9B4BFE42D1AE66700212CE2 = { - CreatedOnToolsVersion = 16.2; - TestTargetID = A9B4BFC72D1AE66000212CE2; + A920C2A02D24011B00E4F9B1 = { + CreatedOnToolsVersion = 15.4; + TestTargetID = A920C2832D24011300E4F9B1; }; }; }; - buildConfigurationList = A9B4BFC32D1AE66000212CE2 /* Build configuration list for PBXProject "NearFuture" */; - compatibilityVersion = "Xcode 15.3"; + buildConfigurationList = A920C27F2D24011300E4F9B1 /* Build configuration list for PBXProject "NearFuture" */; + compatibilityVersion = "Xcode 14.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); - mainGroup = A9B4BFBF2D1AE66000212CE2; - minimizedProjectReferenceProxies = 1; + mainGroup = A920C27B2D24011300E4F9B1; packageReferences = ( - A91288572D1C7E3000912B3C /* XCRemoteSwiftPackageReference "SFSymbolsPicker" */, + A920C2BC2D24021900E4F9B1 /* XCRemoteSwiftPackageReference "SFSymbolsPicker" */, ); - productRefGroup = A9B4BFC92D1AE66000212CE2 /* Products */; + productRefGroup = A920C2852D24011400E4F9B1 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - A9B4BFC72D1AE66000212CE2 /* NearFuture */, - A9B4BFDA2D1AE66700212CE2 /* NearFutureTests */, - A9B4BFE42D1AE66700212CE2 /* NearFutureUITests */, + A920C2832D24011300E4F9B1 /* NearFuture */, + A920C2962D24011A00E4F9B1 /* NearFutureTests */, + A920C2A02D24011B00E4F9B1 /* NearFutureUITests */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ - A9B4BFC62D1AE66000212CE2 /* Resources */ = { + A920C2822D24011300E4F9B1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A920C2922D24011A00E4F9B1 /* Preview Assets.xcassets in Resources */, + A920C28E2D24011A00E4F9B1 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A920C2952D24011A00E4F9B1 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - A9B4BFD92D1AE66700212CE2 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A9B4BFE32D1AE66700212CE2 /* Resources */ = { + A920C29F2D24011B00E4F9B1 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( @@ -229,44 +272,52 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ - A9B4BFC42D1AE66000212CE2 /* Sources */ = { + A920C2802D24011300E4F9B1 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + A920C2BB2D2401A400E4F9B1 /* AddEventView.swift in Sources */, + A920C2C12D2403CA00E4F9B1 /* ContentView.swift in Sources */, + A920C2B82D2401A300E4F9B1 /* SettingsView.swift in Sources */, + A920C28C2D24011400E4F9B1 /* Item.swift in Sources */, + A920C2882D24011400E4F9B1 /* NearFutureApp.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - A9B4BFD72D1AE66700212CE2 /* Sources */ = { + A920C2932D24011A00E4F9B1 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + A920C29C2D24011A00E4F9B1 /* NearFutureTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - A9B4BFE12D1AE66700212CE2 /* Sources */ = { + A920C29D2D24011B00E4F9B1 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + A920C2A62D24011B00E4F9B1 /* NearFutureUITests.swift in Sources */, + A920C2A82D24011B00E4F9B1 /* NearFutureUITestsLaunchTests.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - A9B4BFDD2D1AE66700212CE2 /* PBXTargetDependency */ = { + A920C2992D24011A00E4F9B1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = A9B4BFC72D1AE66000212CE2 /* NearFuture */; - targetProxy = A9B4BFDC2D1AE66700212CE2 /* PBXContainerItemProxy */; + target = A920C2832D24011300E4F9B1 /* NearFuture */; + targetProxy = A920C2982D24011A00E4F9B1 /* PBXContainerItemProxy */; }; - A9B4BFE72D1AE66700212CE2 /* PBXTargetDependency */ = { + A920C2A32D24011B00E4F9B1 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = A9B4BFC72D1AE66000212CE2 /* NearFuture */; - targetProxy = A9B4BFE62D1AE66700212CE2 /* PBXContainerItemProxy */; + target = A920C2832D24011300E4F9B1 /* NearFuture */; + targetProxy = A920C2A22D24011B00E4F9B1 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - A9B4BFED2D1AE66700212CE2 /* Debug */ = { + A920C2A92D24011B00E4F9B1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -301,7 +352,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_HARDENED_RUNTIME = YES; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -328,7 +378,7 @@ }; name = Debug; }; - A9B4BFEE2D1AE66700212CE2 /* Release */ = { + A920C2AA2D24011B00E4F9B1 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -363,7 +413,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_HARDENED_RUNTIME = YES; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_USER_SCRIPT_SANDBOXING = YES; @@ -382,19 +431,17 @@ }; name = Release; }; - A9B4BFF02D1AE66700212CE2 /* Debug */ = { + A920C2AC2D24011B00E4F9B1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; - CLANG_CXX_STANDARD_LIBRARY_HARDENING = none; CODE_SIGN_ENTITLEMENTS = NearFuture/NearFuture.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"NearFuture/Preview Content\""; DEVELOPMENT_TEAM = P6PV2R9443; - ENABLE_HARDENED_RUNTIME = NO; + ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; @@ -407,35 +454,32 @@ "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 17; + IPHONEOS_DEPLOYMENT_TARGET = 17.5; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 14.0; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.hack.NearFuture; + PRODUCT_BUNDLE_IDENTIFIER = dev.neon443.NearFuture; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; - XROS_DEPLOYMENT_TARGET = 2.2; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; }; - A9B4BFF12D1AE66700212CE2 /* Release */ = { + A920C2AD2D24011B00E4F9B1 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_ENTITLEMENTS = NearFuture/NearFuture.entitlements; - CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_ASSET_PATHS = "\"NearFuture/Preview Content\""; DEVELOPMENT_TEAM = P6PV2R9443; - ENABLE_HARDENED_RUNTIME = NO; + ENABLE_HARDENED_RUNTIME = YES; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; @@ -448,147 +492,146 @@ "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - IPHONEOS_DEPLOYMENT_TARGET = 17; + IPHONEOS_DEPLOYMENT_TARGET = 17.5; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 14.0; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.hack.NearFuture; + PRODUCT_BUNDLE_IDENTIFIER = dev.neon443.NearFuture; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; - XROS_DEPLOYMENT_TARGET = 2.2; + TARGETED_DEVICE_FAMILY = "1,2"; }; name = Release; }; - A9B4BFF32D1AE66700212CE2 /* Debug */ = { + A920C2AF2D24011B00E4F9B1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 85Q9QG6DN7; + DEVELOPMENT_TEAM = P6PV2R9443; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17; - MACOSX_DEPLOYMENT_TARGET = 14; + IPHONEOS_DEPLOYMENT_TARGET = 17.5; + MACOSX_DEPLOYMENT_TARGET = 14.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.neon443.NearFuture; + PRODUCT_BUNDLE_IDENTIFIER = dev.neon443.NearFutureTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; + TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NearFuture.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/NearFuture"; - XROS_DEPLOYMENT_TARGET = 1; }; name = Debug; }; - A9B4BFF42D1AE66700212CE2 /* Release */ = { + A920C2B02D24011B00E4F9B1 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 85Q9QG6DN7; + DEVELOPMENT_TEAM = P6PV2R9443; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17; - MACOSX_DEPLOYMENT_TARGET = 14; + IPHONEOS_DEPLOYMENT_TARGET = 17.5; + MACOSX_DEPLOYMENT_TARGET = 14.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.neon443.NearFuture; + PRODUCT_BUNDLE_IDENTIFIER = dev.neon443.NearFutureTests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; + TARGETED_DEVICE_FAMILY = "1,2"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NearFuture.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/NearFuture"; - XROS_DEPLOYMENT_TARGET = 1; }; name = Release; }; - A9B4BFF62D1AE66700212CE2 /* Debug */ = { + A920C2B22D24011B00E4F9B1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 85Q9QG6DN7; + DEVELOPMENT_TEAM = P6PV2R9443; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17; - MACOSX_DEPLOYMENT_TARGET = 14; + IPHONEOS_DEPLOYMENT_TARGET = 17.5; + MACOSX_DEPLOYMENT_TARGET = 14.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.neon443.NearFuture; + PRODUCT_BUNDLE_IDENTIFIER = dev.neon443.NearFutureUITests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; + TARGETED_DEVICE_FAMILY = "1,2"; TEST_TARGET_NAME = NearFuture; - XROS_DEPLOYMENT_TARGET = 1; }; name = Debug; }; - A9B4BFF72D1AE66700212CE2 /* Release */ = { + A920C2B32D24011B00E4F9B1 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 85Q9QG6DN7; + DEVELOPMENT_TEAM = P6PV2R9443; GENERATE_INFOPLIST_FILE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 17; - MACOSX_DEPLOYMENT_TARGET = 14; + IPHONEOS_DEPLOYMENT_TARGET = 17.5; + MACOSX_DEPLOYMENT_TARGET = 14.5; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.neon443.NearFuture; + PRODUCT_BUNDLE_IDENTIFIER = dev.neon443.NearFutureUITests; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = auto; - SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx"; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; - TARGETED_DEVICE_FAMILY = "1,2,7"; + TARGETED_DEVICE_FAMILY = "1,2"; TEST_TARGET_NAME = NearFuture; - XROS_DEPLOYMENT_TARGET = 1; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - A9B4BFC32D1AE66000212CE2 /* Build configuration list for PBXProject "NearFuture" */ = { + A920C27F2D24011300E4F9B1 /* Build configuration list for PBXProject "NearFuture" */ = { isa = XCConfigurationList; buildConfigurations = ( - A9B4BFED2D1AE66700212CE2 /* Debug */, - A9B4BFEE2D1AE66700212CE2 /* Release */, + A920C2A92D24011B00E4F9B1 /* Debug */, + A920C2AA2D24011B00E4F9B1 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A9B4BFEF2D1AE66700212CE2 /* Build configuration list for PBXNativeTarget "NearFuture" */ = { + A920C2AB2D24011B00E4F9B1 /* Build configuration list for PBXNativeTarget "NearFuture" */ = { isa = XCConfigurationList; buildConfigurations = ( - A9B4BFF02D1AE66700212CE2 /* Debug */, - A9B4BFF12D1AE66700212CE2 /* Release */, + A920C2AC2D24011B00E4F9B1 /* Debug */, + A920C2AD2D24011B00E4F9B1 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A9B4BFF22D1AE66700212CE2 /* Build configuration list for PBXNativeTarget "NearFutureTests" */ = { + A920C2AE2D24011B00E4F9B1 /* Build configuration list for PBXNativeTarget "NearFutureTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - A9B4BFF32D1AE66700212CE2 /* Debug */, - A9B4BFF42D1AE66700212CE2 /* Release */, + A920C2AF2D24011B00E4F9B1 /* Debug */, + A920C2B02D24011B00E4F9B1 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - A9B4BFF52D1AE66700212CE2 /* Build configuration list for PBXNativeTarget "NearFutureUITests" */ = { + A920C2B12D24011B00E4F9B1 /* Build configuration list for PBXNativeTarget "NearFutureUITests" */ = { isa = XCConfigurationList; buildConfigurations = ( - A9B4BFF62D1AE66700212CE2 /* Debug */, - A9B4BFF72D1AE66700212CE2 /* Release */, + A920C2B22D24011B00E4F9B1 /* Debug */, + A920C2B32D24011B00E4F9B1 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -596,7 +639,7 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - A91288572D1C7E3000912B3C /* XCRemoteSwiftPackageReference "SFSymbolsPicker" */ = { + A920C2BC2D24021900E4F9B1 /* XCRemoteSwiftPackageReference "SFSymbolsPicker" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/alessiorubicini/SFSymbolsPicker"; requirement = { @@ -607,12 +650,12 @@ /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - A91288582D1C7E3000912B3C /* SFSymbolsPicker */ = { + A920C2BD2D24021A00E4F9B1 /* SFSymbolsPicker */ = { isa = XCSwiftPackageProductDependency; - package = A91288572D1C7E3000912B3C /* XCRemoteSwiftPackageReference "SFSymbolsPicker" */; + package = A920C2BC2D24021900E4F9B1 /* XCRemoteSwiftPackageReference "SFSymbolsPicker" */; productName = SFSymbolsPicker; }; /* End XCSwiftPackageProductDependency section */ }; - rootObject = A9B4BFC02D1AE66000212CE2 /* Project object */; + rootObject = A920C27C2D24011300E4F9B1 /* Project object */; } diff --git a/NearFuture.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/NearFuture.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/NearFuture.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/NearFuture/AddEventView.swift b/NearFuture/AddEventView.swift index b5e16b5..ac9c0f1 100644 --- a/NearFuture/AddEventView.swift +++ b/NearFuture/AddEventView.swift @@ -20,108 +20,122 @@ struct AddEventView: View { @State var isSymbolPickerPresented = false var body: some View { - Form { - Section(header: Text("Event Details").font(.headline).foregroundColor(.blue)) { - // name & symbol - HStack(spacing: 5) { - Button() { - isSymbolPickerPresented.toggle() - } label: { - Image(systemName: eventSymbol) - .resizable() - .scaledToFit() - .frame(width: 25, height: 25) + NavigationStack { + Form { + Section(header: Text("Event Details").font(.headline).foregroundColor(.blue)) { + // name & symbol + HStack(spacing: 5) { + Button() { + isSymbolPickerPresented.toggle() + } label: { + Image(systemName: eventSymbol) + .resizable() + .scaledToFit() + .frame(width: 25, height: 25) + } + // .frame(width: 30) + .buttonStyle(.bordered) + .sheet(isPresented: $isSymbolPickerPresented) { + SymbolsPicker( + selection: $eventSymbol, + title: "Choose a Symbol", + searchLabel: "Search...", + autoDismiss: true) + } + ColorPicker("", selection: $eventColor, supportsOpacity: true) + .fixedSize() + Divider() + ZStack { + TextField("Event Name", text: $eventName) + .textFieldStyle(RoundedBorderTextFieldStyle()) + .padding(.trailing, eventName.isEmpty ? 0 : 30) + .animation(.spring, value: eventName) + MagicClearButton(text: $eventName) + } } -// .frame(width: 30) - .buttonStyle(.bordered) - .sheet(isPresented: $isSymbolPickerPresented) { - SymbolsPicker( - selection: $eventSymbol, - title: "Choose a Symbol", - searchLabel: "Search...", - autoDismiss: true) - } - ColorPicker("", selection: $eventColor, supportsOpacity: true) - .fixedSize() - Divider() + + // dscription ZStack { - TextField("Event Name", text: $eventName) + TextField("Event Description", text: $eventDescription) .textFieldStyle(RoundedBorderTextFieldStyle()) - .padding(.trailing, eventName.isEmpty ? 0 : 30) - .animation(.spring, value: eventName) - MagicClearButton(text: $eventName) + .padding(.trailing, eventDescription.isEmpty ? 0 : 30) + .animation(.spring, value: eventDescription) + MagicClearButton(text: $eventDescription) } - } - - // dscription - ZStack { - TextField("Event Description", text: $eventDescription) - .textFieldStyle(RoundedBorderTextFieldStyle()) - .padding(.trailing, eventDescription.isEmpty ? 0 : 30) - .animation(.spring, value: eventDescription) - MagicClearButton(text: $eventDescription) - } - - - // date picker - DatePicker("Event Date", selection: $eventDate, in: Date()..., displayedComponents: .date) - .datePickerStyle(WheelDatePickerStyle()) - - // re-ocurrence Picker - Picker("Recurrence", selection: $eventRecurrence) { - ForEach(Event.RecurrenceType.allCases, id: \.self) { recurrence in - Text(recurrence.rawValue.capitalized) + + + // date picker + DatePicker("Event Date", selection: $eventDate, in: Date()..., displayedComponents: .date) + .datePickerStyle(WheelDatePickerStyle()) + + // re-ocurrence Picker + Picker("Recurrence", selection: $eventRecurrence) { + ForEach(Event.RecurrenceType.allCases, id: \.self) { recurrence in + Text(recurrence.rawValue.capitalized) + } } + .pickerStyle(SegmentedPickerStyle()) + Text( + describeOccurrence( + date: eventDate, + recurrence: eventRecurrence + ) + ) } - .pickerStyle(SegmentedPickerStyle()) - Text( - describeOccurrence( + + // save button + Button { + viewModel.addEvent( + name: eventName, + symbol: eventSymbol, + color: ColorCodable(eventColor), + description: eventDescription, date: eventDate, recurrence: eventRecurrence ) - ) + //reset addeventView + eventName = "" + eventSymbol = "star" + eventColor = [ + Color.red, + Color.orange, + Color.yellow, + Color.green, + Color.blue, + Color.indigo, + Color.purple + ].randomElement() ?? Color.red + eventDescription = "" + eventDate = Date() + eventRecurrence = .none + isPresented = false + } label: { + Text("Save Event") + .font(.headline) + .cornerRadius(10) + .shadow(radius: 10) + .buttonStyle(BorderedProminentButtonStyle()) + } + .disabled(eventName.isEmpty || eventDescription.isEmpty) + if eventName.isEmpty && eventDescription.isEmpty { + Text("Give your event a name and description.") + } else if eventName.isEmpty { + Text("Give your event a name.") + } else if eventDescription.isEmpty { + Text("Give your event a description.") + } } - - // save button - Button { - viewModel.addEvent( - name: eventName, - symbol: eventSymbol, - color: ColorCodable(eventColor), - description: eventDescription, - date: eventDate, - recurrence: eventRecurrence - ) - //reset addeventView - eventName = "" - eventSymbol = "star" - eventColor = [ - Color.red, - Color.orange, - Color.yellow, - Color.green, - Color.blue, - Color.indigo, - Color.purple - ].randomElement() ?? Color.red - eventDescription = "" - eventDate = Date() - eventRecurrence = .none - isPresented = false - } label: { - Text("Save Event") - .font(.headline) - .cornerRadius(10) - .shadow(radius: 10) - .buttonStyle(BorderedProminentButtonStyle()) - } - .disabled(eventName.isEmpty || eventDescription.isEmpty) - if eventName.isEmpty && eventDescription.isEmpty { - Text("Give your event a name and description.") - } else if eventName.isEmpty { - Text("Give your event a name.") - } else if eventDescription.isEmpty { - Text("Give your event a description.") + .navigationTitle("Add Event") + .navigationBarTitleDisplayMode(.inline) + .toolbar { + ToolbarItem(placement: .topBarTrailing) { + Button() { + isPresented.toggle() + } label: { + Image(systemName: "xmark.circle.fill") + .symbolRenderingMode(.hierarchical) + } + } } } } @@ -143,6 +157,7 @@ struct MagicClearButton: View { .padding(.trailing, -5) .animation(.spring, value: text.isEmpty) } + .buttonStyle(.borderless) } } } diff --git a/NearFuture/Assets.xcassets/AppIcon.appiconset/Contents.json b/NearFuture/Assets.xcassets/AppIcon.appiconset/Contents.json index ffdfe15..532cd72 100644 --- a/NearFuture/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/NearFuture/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -5,28 +5,6 @@ "platform" : "ios", "size" : "1024x1024" }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "dark" - } - ], - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - }, - { - "appearances" : [ - { - "appearance" : "luminosity", - "value" : "tinted" - } - ], - "idiom" : "universal", - "platform" : "ios", - "size" : "1024x1024" - }, { "idiom" : "mac", "scale" : "1x", diff --git a/NearFuture/ContentView.swift b/NearFuture/ContentView.swift index bee8fec..ef32081 100644 --- a/NearFuture/ContentView.swift +++ b/NearFuture/ContentView.swift @@ -117,6 +117,7 @@ struct ContentView: View { ) } } + @State var showSettings: Bool = false var body: some View { NavigationView { @@ -166,16 +167,30 @@ struct ContentView: View { isPresented: $showingAddEventView ) } + .sheet( + isPresented: $showSettings) { + SettingsView( + viewModel: viewModel, + showSettings: $showSettings + ) + } .toolbar { ToolbarItem(placement: .topBarTrailing) { - Button(action: { + Button() { showingAddEventView.toggle() - }) { + } label: { Image(systemName: "plus.circle") .resizable() .scaledToFit() } } + ToolbarItem(placement: .topBarLeading) { + Button() { + showSettings.toggle() + } label: { + Image(systemName: "gear") + } + } } } @@ -198,10 +213,8 @@ struct EventListView: View { .padding(.leading, -5) VStack(alignment: .leading) { HStack { - Image(systemName: event.symbol) - Text(event.name) + Text("\(Image(systemName: event.symbol)) \(event.name)") .font(.headline) - .padding(.bottom, 2) } Text(event.description) .font(.subheadline) diff --git a/NearFuture/Item.swift b/NearFuture/Item.swift index efcebc9..2fc9a0a 100644 --- a/NearFuture/Item.swift +++ b/NearFuture/Item.swift @@ -11,134 +11,186 @@ import SwiftUI @Model final class Item { - var timestamp: Date - - init(timestamp: Date) { - self.timestamp = timestamp - } + var timestamp: Date + + init(timestamp: Date) { + self.timestamp = timestamp + } } struct Event: Identifiable, Codable { - var id = UUID() - var name: String - var symbol: String - var color: ColorCodable - var description: String - var date: Date - var recurrence: RecurrenceType - - enum RecurrenceType: String, Codable, CaseIterable { - case none, daily, weekly, monthly, yearly - } + var id = UUID() + var name: String + var symbol: String + var color: ColorCodable + var description: String + var date: Date + var recurrence: RecurrenceType + + enum RecurrenceType: String, Codable, CaseIterable { + case none, daily, weekly, monthly, yearly + } } struct ColorCodable: Codable { - var red: Double - var green: Double - var blue: Double - var alpha: Double - //for the brainrotted: alpha is the opacity/transparency of the color, - //alpha == 0 completely transparent - //alpha == 1 completely opaque - - var color: Color { - Color(red: red, green: green, blue: blue, opacity: alpha) - } - - init(_ color: Color) { - let uiColor = UIColor(color) - var r: CGFloat = 0, g: CGFloat = 0, b: CGFloat = 0, a: CGFloat = 0 - uiColor.getRed(&r, green: &g, blue: &b, alpha: &a) - - self.red = Double(r) - self.green = Double(g) - self.blue = Double(b) - self.alpha = Double(a) - - } - init(red: Double, green: Double, blue: Double, alpha: Double = 1.0) { - self.red = red - self.green = green - self.blue = blue - self.alpha = alpha - } + var red: Double + var green: Double + var blue: Double + var alpha: Double + //for the brainrotted: alpha is the opacity/transparency of the color, + //alpha == 0 completely transparent + //alpha == 1 completely opaque + + var color: Color { + Color(red: red, green: green, blue: blue, opacity: alpha) + } + + init(_ color: Color) { + let uiColor = UIColor(color) + var r: CGFloat = 0, g: CGFloat = 0, b: CGFloat = 0, a: CGFloat = 0 + uiColor.getRed(&r, green: &g, blue: &b, alpha: &a) + + self.red = Double(r) + self.green = Double(g) + self.blue = Double(b) + self.alpha = Double(a) + + } + init(red: Double, green: Double, blue: Double, alpha: Double = 1.0) { + self.red = red + self.green = green + self.blue = blue + self.alpha = alpha + } } func daysUntilEvent(_ eventDate: Date) -> String { - let calendar = Calendar.current - let currentDate = Date() - let components = calendar.dateComponents([.day], from: currentDate, to: eventDate) - guard let days = components.day else { return "N/A" } - guard days >= 0 else { - return "\(days) days ago" - } - guard days != 0 else { - return "Today" - } - return "\(days) days" + let calendar = Calendar.current + let currentDate = Date() + let components = calendar.dateComponents([.day], from: currentDate, to: eventDate) + guard let days = components.day else { return "N/A" } + guard days >= 0 else { + return "\(days) days ago" + } + guard days != 0 else { + return "Today" + } + return "\(days) days" } class EventViewModel: ObservableObject { - @Published var events: [Event] = [] - - init() { - loadEvents() - } - - func loadEvents() { - if let savedData = UserDefaults.standard.data(forKey: "events") { - let decoder = JSONDecoder() - if let decodedEvents = try? decoder.decode([Event].self, from: savedData) { - self.events = decodedEvents - } - } - } - - func saveEvents() { - let encoder = JSONEncoder() - if let encoded = try? encoder.encode(events) { - UserDefaults.standard.set(encoded, forKey: "events") - } - } - - func addEvent( - name: String, - symbol: String, - color: ColorCodable, - description: String, - date: Date, - recurrence: Event.RecurrenceType - ) { - let newEvent = Event( - name: name, - symbol: symbol, - color: color, - description: description, - date: date, - recurrence: recurrence - ) - events.append(newEvent) - saveEvents() - } - - func removeEvent(at index: IndexSet) { - events.remove(atOffsets: index) - saveEvents() - } + @Published var events: [Event] = [] + @Published var icloudData: [Event] = [] + + init() { + loadEvents() + } + + //icloud + let icloudStore = NSUbiquitousKeyValueStore.default + + func loadEvents() { + //load icloud 1st + if let icData = icloudStore.data(forKey: "events") { + let decoder = JSONDecoder() + if let decodedIcEvents = try? decoder.decode([Event].self, from: icData) { + self.icloudData = decodedIcEvents + self.events = decodedIcEvents + } + } + + if events.isEmpty, let savedData = UserDefaults.standard.data(forKey: "events") { + let decoder = JSONDecoder() + if let decodedEvents = try? decoder.decode([Event].self, from: savedData) { + self.events = decodedEvents + } + } + } + + func saveEvents() { + let encoder = JSONEncoder() + if let encoded = try? encoder.encode(events) { + UserDefaults.standard.set(encoded, forKey: "events") + +// do { + icloudStore.set(encoded, forKey: "events") + icloudStore.synchronize() +// } catch { +// print("Error saving to iCloud: \(error)") +// } + + if icloudStore.data(forKey: "events") != nil { + print(icloudStore.dictionaryRepresentation) + } + } + } + + func addEvent( + name: String, + symbol: String, + color: ColorCodable, + description: String, + date: Date, + recurrence: Event.RecurrenceType + ) { + let newEvent = Event( + name: name, + symbol: symbol, + color: color, + description: description, + date: date, + recurrence: recurrence + ) + events.append(newEvent) + saveEvents() //sync with icloud + } + + func removeEvent(at index: IndexSet) { + events.remove(atOffsets: index) + saveEvents() //sync local and icl + } + + //MARK: Danger Zone + func dangerClearLocalData() { + UserDefaults.standard.removeObject(forKey: "events") + } + func dangerCleariCloudData() { + let icloud = NSUbiquitousKeyValueStore() + icloud.removeObject(forKey: "events") + icloud.synchronize() + } + func dangerResetLocalData() { + let userDFDict = UserDefaults.standard.dictionaryRepresentation() + for key in userDFDict.keys { + UserDefaults.standard.removeObject(forKey: key) + } + } + func dangerResetiCloud() { + let icloud = NSUbiquitousKeyValueStore() + let icloudDict = NSUbiquitousKeyValueStore().dictionaryRepresentation + for key in icloudDict.keys { + icloud.removeObject(forKey: key) + } + icloud.synchronize() + } } -//TODO: make it better lol func describeOccurrence(date: Date, recurrence: Event.RecurrenceType) -> String { - switch recurrence { - case .none: - return "Occurs once on \(date.formatted(date: .long, time: .omitted))" - case .daily: - return "Repeats every day from \(date.formatted(date: .long, time: .omitted))" - case .weekly: - return "Repeats every week from \(date.formatted(date: .long, time: .omitted))" - case .monthly: - return "Repeats every month from \(date.formatted(date: .long, time: .omitted))" - case .yearly: - return "Repeats every month from \(date.formatted(date: .long, time: .omitted))" - } + let dateString = date.formatted(date: .long, time: .omitted) + let recurrenceDescription: String + + switch recurrence { + case .none: + recurrenceDescription = "Occurs once on" + case .daily: + recurrenceDescription = "Repeats every day from" + case .weekly: + recurrenceDescription = "Repeats every week from" + case .monthly: + recurrenceDescription = "Repeats every month from" + case .yearly: + recurrenceDescription = "Repeats every year from" + } + + return "\(recurrenceDescription) \(dateString)" } diff --git a/NearFuture/NearFuture.entitlements b/NearFuture/NearFuture.entitlements index 9da580e..ad259ee 100644 --- a/NearFuture/NearFuture.entitlements +++ b/NearFuture/NearFuture.entitlements @@ -2,11 +2,13 @@ + com.apple.developer.icloud-container-identifiers + + com.apple.developer.ubiquity-kvstore-identifier + $(TeamIdentifierPrefix)$(CFBundleIdentifier) com.apple.security.app-sandbox - + com.apple.security.files.user-selected.read-only - - get-task-allow diff --git a/NearFuture/SettingsView.swift b/NearFuture/SettingsView.swift new file mode 100644 index 0000000..001d763 --- /dev/null +++ b/NearFuture/SettingsView.swift @@ -0,0 +1,59 @@ +// +// SettingsView.swift +// NearFuture +// +// Created by Nihaal Sharma on 29/12/2024. +// + +import SwiftUI + +struct SettingsView: View { + @State var viewModel: EventViewModel + @Binding var showSettings: Bool + + var body: some View { + NavigationStack { + List { + Section("Danger Zone") { + Button("Delete local data", role: .destructive) { + viewModel.dangerClearLocalData() + } + Button("Delete iCloud data", role: .destructive) { + viewModel.dangerCleariCloudData() + } + Button("Delete all data", role: .destructive) { + viewModel.dangerClearLocalData() + viewModel.dangerCleariCloudData() + } + } + Section("Debug") { + Button("Reset UserDefaults", role: .destructive) { + viewModel.dangerResetLocalData() + } + Button("Reset iCloud", role: .destructive) { + viewModel.dangerResetiCloud() + } + } + } + .navigationTitle("Settings") + .navigationBarTitleDisplayMode(.inline) + .toolbar { + ToolbarItem(placement: .topBarTrailing) { + Button() { + showSettings.toggle() + } label: { + Image(systemName: "xmark.circle.fill") + .symbolRenderingMode(.hierarchical) + } + } + } + } + } +} + +#Preview { + SettingsView( + viewModel: EventViewModel(), + showSettings: .constant(true) + ) +} diff --git a/NearFutureTests/NearFutureTests.swift b/NearFutureTests/NearFutureTests.swift index d0f1c6e..d210086 100644 --- a/NearFutureTests/NearFutureTests.swift +++ b/NearFutureTests/NearFutureTests.swift @@ -2,15 +2,34 @@ // NearFutureTests.swift // NearFutureTests // -// Created by Nihaal Sharma on 24/12/2024. +// Created by Nihaal Sharma on 31/12/2024. // -import Testing +import XCTest -struct NearFutureTests { +final class NearFutureTests: XCTestCase { - @Test func example() async throws { - // Write your test here and use APIs like `#expect(...)` to check expected conditions. + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + // Any test you write for XCTest can be annotated as throws and async. + // Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. + // Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + measure { + // Put the code you want to measure the time of here. + } } } diff --git a/NearFutureUITests/NearFutureUITests.swift b/NearFutureUITests/NearFutureUITests.swift index e2dbe1a..2c2e0b0 100644 --- a/NearFutureUITests/NearFutureUITests.swift +++ b/NearFutureUITests/NearFutureUITests.swift @@ -2,7 +2,7 @@ // NearFutureUITests.swift // NearFutureUITests // -// Created by Nihaal Sharma on 24/12/2024. +// Created by Nihaal Sharma on 31/12/2024. // import XCTest @@ -22,7 +22,6 @@ final class NearFutureUITests: XCTestCase { // Put teardown code here. This method is called after the invocation of each test method in the class. } - @MainActor func testExample() throws { // UI tests must launch the application that they test. let app = XCUIApplication() @@ -31,7 +30,6 @@ final class NearFutureUITests: XCTestCase { // Use XCTAssert and related functions to verify your tests produce the correct results. } - @MainActor func testLaunchPerformance() throws { if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { // This measures how long it takes to launch your application. diff --git a/NearFutureUITests/NearFutureUITestsLaunchTests.swift b/NearFutureUITests/NearFutureUITestsLaunchTests.swift index c7f1866..717973f 100644 --- a/NearFutureUITests/NearFutureUITestsLaunchTests.swift +++ b/NearFutureUITests/NearFutureUITestsLaunchTests.swift @@ -2,7 +2,7 @@ // NearFutureUITestsLaunchTests.swift // NearFutureUITests // -// Created by Nihaal Sharma on 24/12/2024. +// Created by Nihaal Sharma on 31/12/2024. // import XCTest @@ -17,7 +17,6 @@ final class NearFutureUITestsLaunchTests: XCTestCase { continueAfterFailure = false } - @MainActor func testLaunch() throws { let app = XCUIApplication() app.launch() diff --git a/README.md b/README.md index ab2a522..729cbb6 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Near Future is a SwiftUI App to help people to track upcoming events - Holidays, - [x] Event colors - [ ] Recurrence - [x] Search +- [ ] Notifications - [ ] Apple Watch App - [ ] Home Screen Widgets - [ ] Lock Screen Widgets