From f7e412fa589f42314cf645991cf7960a67b3c8e1 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Fri, 4 Oct 2024 20:43:37 +0200 Subject: [PATCH] Initial Commit --- Piper.xcodeproj/project.pbxproj | 556 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcschemes/xcschememanagement.plist | 14 + .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 58 ++ Piper/Assets.xcassets/Contents.json | 6 + Piper/ContentView.swift | 59 ++ Piper/Item.swift | 18 + Piper/Piper.entitlements | 10 + Piper/PiperApp.swift | 32 + .../Preview Assets.xcassets/Contents.json | 6 + PiperTests/PiperTests.swift | 17 + PiperUITests/PiperUITests.swift | 43 ++ PiperUITests/PiperUITestsLaunchTests.swift | 33 ++ 14 files changed, 870 insertions(+) create mode 100644 Piper.xcodeproj/project.pbxproj create mode 100644 Piper.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Piper.xcodeproj/xcuserdata/logansama.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 Piper/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 Piper/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Piper/Assets.xcassets/Contents.json create mode 100644 Piper/ContentView.swift create mode 100644 Piper/Item.swift create mode 100644 Piper/Piper.entitlements create mode 100644 Piper/PiperApp.swift create mode 100644 Piper/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 PiperTests/PiperTests.swift create mode 100644 PiperUITests/PiperUITests.swift create mode 100644 PiperUITests/PiperUITestsLaunchTests.swift diff --git a/Piper.xcodeproj/project.pbxproj b/Piper.xcodeproj/project.pbxproj new file mode 100644 index 0000000..bd37e63 --- /dev/null +++ b/Piper.xcodeproj/project.pbxproj @@ -0,0 +1,556 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXContainerItemProxy section */ + 46D4BE8B2CB06ED500FCFB84 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 46D4BE6F2CB06ED300FCFB84 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 46D4BE762CB06ED300FCFB84; + remoteInfo = Piper; + }; + 46D4BE952CB06ED500FCFB84 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 46D4BE6F2CB06ED300FCFB84 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 46D4BE762CB06ED300FCFB84; + remoteInfo = Piper; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 46D4BE772CB06ED300FCFB84 /* Piper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Piper.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 46D4BE8A2CB06ED500FCFB84 /* PiperTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PiperTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 46D4BE942CB06ED500FCFB84 /* PiperUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PiperUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 46D4BE792CB06ED300FCFB84 /* Piper */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = Piper; + sourceTree = ""; + }; + 46D4BE8D2CB06ED500FCFB84 /* PiperTests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = PiperTests; + sourceTree = ""; + }; + 46D4BE972CB06ED500FCFB84 /* PiperUITests */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = PiperUITests; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 46D4BE742CB06ED300FCFB84 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 46D4BE872CB06ED500FCFB84 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 46D4BE912CB06ED500FCFB84 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 46D4BE6E2CB06ED300FCFB84 = { + isa = PBXGroup; + children = ( + 46D4BE792CB06ED300FCFB84 /* Piper */, + 46D4BE8D2CB06ED500FCFB84 /* PiperTests */, + 46D4BE972CB06ED500FCFB84 /* PiperUITests */, + 46D4BE782CB06ED300FCFB84 /* Products */, + ); + sourceTree = ""; + }; + 46D4BE782CB06ED300FCFB84 /* Products */ = { + isa = PBXGroup; + children = ( + 46D4BE772CB06ED300FCFB84 /* Piper.app */, + 46D4BE8A2CB06ED500FCFB84 /* PiperTests.xctest */, + 46D4BE942CB06ED500FCFB84 /* PiperUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 46D4BE762CB06ED300FCFB84 /* Piper */ = { + isa = PBXNativeTarget; + buildConfigurationList = 46D4BE9E2CB06ED500FCFB84 /* Build configuration list for PBXNativeTarget "Piper" */; + buildPhases = ( + 46D4BE732CB06ED300FCFB84 /* Sources */, + 46D4BE742CB06ED300FCFB84 /* Frameworks */, + 46D4BE752CB06ED300FCFB84 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 46D4BE792CB06ED300FCFB84 /* Piper */, + ); + name = Piper; + packageProductDependencies = ( + ); + productName = Piper; + productReference = 46D4BE772CB06ED300FCFB84 /* Piper.app */; + productType = "com.apple.product-type.application"; + }; + 46D4BE892CB06ED500FCFB84 /* PiperTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 46D4BEA12CB06ED500FCFB84 /* Build configuration list for PBXNativeTarget "PiperTests" */; + buildPhases = ( + 46D4BE862CB06ED500FCFB84 /* Sources */, + 46D4BE872CB06ED500FCFB84 /* Frameworks */, + 46D4BE882CB06ED500FCFB84 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 46D4BE8C2CB06ED500FCFB84 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 46D4BE8D2CB06ED500FCFB84 /* PiperTests */, + ); + name = PiperTests; + packageProductDependencies = ( + ); + productName = PiperTests; + productReference = 46D4BE8A2CB06ED500FCFB84 /* PiperTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 46D4BE932CB06ED500FCFB84 /* PiperUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 46D4BEA42CB06ED500FCFB84 /* Build configuration list for PBXNativeTarget "PiperUITests" */; + buildPhases = ( + 46D4BE902CB06ED500FCFB84 /* Sources */, + 46D4BE912CB06ED500FCFB84 /* Frameworks */, + 46D4BE922CB06ED500FCFB84 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 46D4BE962CB06ED500FCFB84 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 46D4BE972CB06ED500FCFB84 /* PiperUITests */, + ); + name = PiperUITests; + packageProductDependencies = ( + ); + productName = PiperUITests; + productReference = 46D4BE942CB06ED500FCFB84 /* PiperUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 46D4BE6F2CB06ED300FCFB84 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1600; + LastUpgradeCheck = 1600; + TargetAttributes = { + 46D4BE762CB06ED300FCFB84 = { + CreatedOnToolsVersion = 16.0; + }; + 46D4BE892CB06ED500FCFB84 = { + CreatedOnToolsVersion = 16.0; + TestTargetID = 46D4BE762CB06ED300FCFB84; + }; + 46D4BE932CB06ED500FCFB84 = { + CreatedOnToolsVersion = 16.0; + TestTargetID = 46D4BE762CB06ED300FCFB84; + }; + }; + }; + buildConfigurationList = 46D4BE722CB06ED300FCFB84 /* Build configuration list for PBXProject "Piper" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 46D4BE6E2CB06ED300FCFB84; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 46D4BE782CB06ED300FCFB84 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 46D4BE762CB06ED300FCFB84 /* Piper */, + 46D4BE892CB06ED500FCFB84 /* PiperTests */, + 46D4BE932CB06ED500FCFB84 /* PiperUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 46D4BE752CB06ED300FCFB84 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 46D4BE882CB06ED500FCFB84 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 46D4BE922CB06ED500FCFB84 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 46D4BE732CB06ED300FCFB84 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 46D4BE862CB06ED500FCFB84 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 46D4BE902CB06ED500FCFB84 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 46D4BE8C2CB06ED500FCFB84 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 46D4BE762CB06ED300FCFB84 /* Piper */; + targetProxy = 46D4BE8B2CB06ED500FCFB84 /* PBXContainerItemProxy */; + }; + 46D4BE962CB06ED500FCFB84 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 46D4BE762CB06ED300FCFB84 /* Piper */; + targetProxy = 46D4BE952CB06ED500FCFB84 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 46D4BE9C2CB06ED500FCFB84 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 15.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 46D4BE9D2CB06ED500FCFB84 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MACOSX_DEPLOYMENT_TARGET = 15.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + }; + name = Release; + }; + 46D4BE9F2CB06ED500FCFB84 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = Piper/Piper.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Piper/Preview Content\""; + DEVELOPMENT_TEAM = 7FMNM89WKG; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.rock-n-code.app.Piper"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 46D4BEA02CB06ED500FCFB84 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_ENTITLEMENTS = Piper/Piper.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Piper/Preview Content\""; + DEVELOPMENT_TEAM = 7FMNM89WKG; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.rock-n-code.app.Piper"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 46D4BEA22CB06ED500FCFB84 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 7FMNM89WKG; + GENERATE_INFOPLIST_FILE = YES; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.rock-n-code.app.PiperTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Piper.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Piper"; + }; + name = Debug; + }; + 46D4BEA32CB06ED500FCFB84 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 7FMNM89WKG; + GENERATE_INFOPLIST_FILE = YES; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.rock-n-code.app.PiperTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Piper.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Piper"; + }; + name = Release; + }; + 46D4BEA52CB06ED500FCFB84 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 7FMNM89WKG; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.rock-n-code.app.PiperUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_TARGET_NAME = Piper; + }; + name = Debug; + }; + 46D4BEA62CB06ED500FCFB84 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 7FMNM89WKG; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.rock-n-code.app.PiperUITests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TEST_TARGET_NAME = Piper; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 46D4BE722CB06ED300FCFB84 /* Build configuration list for PBXProject "Piper" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 46D4BE9C2CB06ED500FCFB84 /* Debug */, + 46D4BE9D2CB06ED500FCFB84 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 46D4BE9E2CB06ED500FCFB84 /* Build configuration list for PBXNativeTarget "Piper" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 46D4BE9F2CB06ED500FCFB84 /* Debug */, + 46D4BEA02CB06ED500FCFB84 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 46D4BEA12CB06ED500FCFB84 /* Build configuration list for PBXNativeTarget "PiperTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 46D4BEA22CB06ED500FCFB84 /* Debug */, + 46D4BEA32CB06ED500FCFB84 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 46D4BEA42CB06ED500FCFB84 /* Build configuration list for PBXNativeTarget "PiperUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 46D4BEA52CB06ED500FCFB84 /* Debug */, + 46D4BEA62CB06ED500FCFB84 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 46D4BE6F2CB06ED300FCFB84 /* Project object */; +} diff --git a/Piper.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Piper.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Piper.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Piper.xcodeproj/xcuserdata/logansama.xcuserdatad/xcschemes/xcschememanagement.plist b/Piper.xcodeproj/xcuserdata/logansama.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..4e13d94 --- /dev/null +++ b/Piper.xcodeproj/xcuserdata/logansama.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + Piper.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/Piper/Assets.xcassets/AccentColor.colorset/Contents.json b/Piper/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Piper/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Piper/Assets.xcassets/AppIcon.appiconset/Contents.json b/Piper/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..3f00db4 --- /dev/null +++ b/Piper/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/Piper/Assets.xcassets/Contents.json b/Piper/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Piper/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Piper/ContentView.swift b/Piper/ContentView.swift new file mode 100644 index 0000000..4c252ad --- /dev/null +++ b/Piper/ContentView.swift @@ -0,0 +1,59 @@ +// +// ContentView.swift +// Piper +// +// Created by Javier Cicchelli on 04/10/2024. +// + +import SwiftUI +import SwiftData + +struct ContentView: View { + @Environment(\.modelContext) private var modelContext + @Query private var items: [Item] + + var body: some View { + NavigationSplitView { + List { + ForEach(items) { item in + NavigationLink { + Text("Item at \(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard))") + } label: { + Text(item.timestamp, format: Date.FormatStyle(date: .numeric, time: .standard)) + } + } + .onDelete(perform: deleteItems) + } + .navigationSplitViewColumnWidth(min: 180, ideal: 200) + .toolbar { + ToolbarItem { + Button(action: addItem) { + Label("Add Item", systemImage: "plus") + } + } + } + } detail: { + Text("Select an item") + } + } + + private func addItem() { + withAnimation { + let newItem = Item(timestamp: Date()) + modelContext.insert(newItem) + } + } + + private func deleteItems(offsets: IndexSet) { + withAnimation { + for index in offsets { + modelContext.delete(items[index]) + } + } + } +} + +#Preview { + ContentView() + .modelContainer(for: Item.self, inMemory: true) +} diff --git a/Piper/Item.swift b/Piper/Item.swift new file mode 100644 index 0000000..22a78a3 --- /dev/null +++ b/Piper/Item.swift @@ -0,0 +1,18 @@ +// +// Item.swift +// Piper +// +// Created by Javier Cicchelli on 04/10/2024. +// + +import Foundation +import SwiftData + +@Model +final class Item { + var timestamp: Date + + init(timestamp: Date) { + self.timestamp = timestamp + } +} diff --git a/Piper/Piper.entitlements b/Piper/Piper.entitlements new file mode 100644 index 0000000..18aff0c --- /dev/null +++ b/Piper/Piper.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-only + + + diff --git a/Piper/PiperApp.swift b/Piper/PiperApp.swift new file mode 100644 index 0000000..8328c48 --- /dev/null +++ b/Piper/PiperApp.swift @@ -0,0 +1,32 @@ +// +// PiperApp.swift +// Piper +// +// Created by Javier Cicchelli on 04/10/2024. +// + +import SwiftUI +import SwiftData + +@main +struct PiperApp: App { + var sharedModelContainer: ModelContainer = { + let schema = Schema([ + Item.self, + ]) + let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false) + + do { + return try ModelContainer(for: schema, configurations: [modelConfiguration]) + } catch { + fatalError("Could not create ModelContainer: \(error)") + } + }() + + var body: some Scene { + WindowGroup { + ContentView() + } + .modelContainer(sharedModelContainer) + } +} diff --git a/Piper/Preview Content/Preview Assets.xcassets/Contents.json b/Piper/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Piper/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PiperTests/PiperTests.swift b/PiperTests/PiperTests.swift new file mode 100644 index 0000000..41e8492 --- /dev/null +++ b/PiperTests/PiperTests.swift @@ -0,0 +1,17 @@ +// +// PiperTests.swift +// PiperTests +// +// Created by Javier Cicchelli on 04/10/2024. +// + +import Testing +@testable import Piper + +struct PiperTests { + + @Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. + } + +} diff --git a/PiperUITests/PiperUITests.swift b/PiperUITests/PiperUITests.swift new file mode 100644 index 0000000..5ed216d --- /dev/null +++ b/PiperUITests/PiperUITests.swift @@ -0,0 +1,43 @@ +// +// PiperUITests.swift +// PiperUITests +// +// Created by Javier Cicchelli on 04/10/2024. +// + +import XCTest + +final class PiperUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // 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() + app.launch() + + // 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. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/PiperUITests/PiperUITestsLaunchTests.swift b/PiperUITests/PiperUITestsLaunchTests.swift new file mode 100644 index 0000000..779cc10 --- /dev/null +++ b/PiperUITests/PiperUITestsLaunchTests.swift @@ -0,0 +1,33 @@ +// +// PiperUITestsLaunchTests.swift +// PiperUITests +// +// Created by Javier Cicchelli on 04/10/2024. +// + +import XCTest + +final class PiperUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + @MainActor + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +}