Init commit.

This commit is contained in:
Gabriel Brown 2024-05-22 16:06:53 -05:00
commit 259ed6da27
25 changed files with 1429 additions and 0 deletions

View File

@ -0,0 +1,619 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 56;
objects = {
/* Begin PBXBuildFile section */
03308F442BC2035300D59E96 /* Tech_TrackerApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03308F432BC2035300D59E96 /* Tech_TrackerApp.swift */; };
03308F462BC2035300D59E96 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03308F452BC2035300D59E96 /* ContentView.swift */; };
03308F482BC2035500D59E96 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03308F472BC2035500D59E96 /* Assets.xcassets */; };
03308F4B2BC2035500D59E96 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 03308F4A2BC2035500D59E96 /* Preview Assets.xcassets */; };
03308F552BC2035500D59E96 /* Tech_TrackerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03308F542BC2035500D59E96 /* Tech_TrackerTests.swift */; };
03308F5F2BC2035500D59E96 /* Tech_TrackerUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03308F5E2BC2035500D59E96 /* Tech_TrackerUITests.swift */; };
03308F612BC2035500D59E96 /* Tech_TrackerUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03308F602BC2035500D59E96 /* Tech_TrackerUITestsLaunchTests.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
03308F512BC2035500D59E96 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 03308F382BC2035300D59E96 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 03308F3F2BC2035300D59E96;
remoteInfo = "Tech Tracker";
};
03308F5B2BC2035500D59E96 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 03308F382BC2035300D59E96 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 03308F3F2BC2035300D59E96;
remoteInfo = "Tech Tracker";
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
03308F402BC2035300D59E96 /* Tech Tracker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Tech Tracker.app"; sourceTree = BUILT_PRODUCTS_DIR; };
03308F432BC2035300D59E96 /* Tech_TrackerApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tech_TrackerApp.swift; sourceTree = "<group>"; };
03308F452BC2035300D59E96 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
03308F472BC2035500D59E96 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
03308F4A2BC2035500D59E96 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
03308F502BC2035500D59E96 /* Tech TrackerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Tech TrackerTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
03308F542BC2035500D59E96 /* Tech_TrackerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tech_TrackerTests.swift; sourceTree = "<group>"; };
03308F5A2BC2035500D59E96 /* Tech TrackerUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Tech TrackerUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
03308F5E2BC2035500D59E96 /* Tech_TrackerUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tech_TrackerUITests.swift; sourceTree = "<group>"; };
03308F602BC2035500D59E96 /* Tech_TrackerUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tech_TrackerUITestsLaunchTests.swift; sourceTree = "<group>"; };
03C6583F2BC46B55003554A5 /* Config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Config.xcconfig; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
03308F3D2BC2035300D59E96 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
03308F4D2BC2035500D59E96 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
03308F572BC2035500D59E96 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
03308F372BC2035300D59E96 = {
isa = PBXGroup;
children = (
03308F422BC2035300D59E96 /* Tech Tracker */,
03308F532BC2035500D59E96 /* Tech TrackerTests */,
03308F5D2BC2035500D59E96 /* Tech TrackerUITests */,
03308F412BC2035300D59E96 /* Products */,
);
sourceTree = "<group>";
};
03308F412BC2035300D59E96 /* Products */ = {
isa = PBXGroup;
children = (
03308F402BC2035300D59E96 /* Tech Tracker.app */,
03308F502BC2035500D59E96 /* Tech TrackerTests.xctest */,
03308F5A2BC2035500D59E96 /* Tech TrackerUITests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
03308F422BC2035300D59E96 /* Tech Tracker */ = {
isa = PBXGroup;
children = (
03308F6D2BC214AB00D59E96 /* Images */,
03308F432BC2035300D59E96 /* Tech_TrackerApp.swift */,
03308F452BC2035300D59E96 /* ContentView.swift */,
03C6583F2BC46B55003554A5 /* Config.xcconfig */,
03308F472BC2035500D59E96 /* Assets.xcassets */,
03308F492BC2035500D59E96 /* Preview Content */,
);
path = "Tech Tracker";
sourceTree = "<group>";
};
03308F492BC2035500D59E96 /* Preview Content */ = {
isa = PBXGroup;
children = (
03308F4A2BC2035500D59E96 /* Preview Assets.xcassets */,
);
path = "Preview Content";
sourceTree = "<group>";
};
03308F532BC2035500D59E96 /* Tech TrackerTests */ = {
isa = PBXGroup;
children = (
03308F542BC2035500D59E96 /* Tech_TrackerTests.swift */,
);
path = "Tech TrackerTests";
sourceTree = "<group>";
};
03308F5D2BC2035500D59E96 /* Tech TrackerUITests */ = {
isa = PBXGroup;
children = (
03308F5E2BC2035500D59E96 /* Tech_TrackerUITests.swift */,
03308F602BC2035500D59E96 /* Tech_TrackerUITestsLaunchTests.swift */,
);
path = "Tech TrackerUITests";
sourceTree = "<group>";
};
03308F6D2BC214AB00D59E96 /* Images */ = {
isa = PBXGroup;
children = (
);
path = Images;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
03308F3F2BC2035300D59E96 /* Tech Tracker */ = {
isa = PBXNativeTarget;
buildConfigurationList = 03308F642BC2035500D59E96 /* Build configuration list for PBXNativeTarget "Tech Tracker" */;
buildPhases = (
03308F3C2BC2035300D59E96 /* Sources */,
03308F3D2BC2035300D59E96 /* Frameworks */,
03308F3E2BC2035300D59E96 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = "Tech Tracker";
productName = "Tech Tracker";
productReference = 03308F402BC2035300D59E96 /* Tech Tracker.app */;
productType = "com.apple.product-type.application";
};
03308F4F2BC2035500D59E96 /* Tech TrackerTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 03308F672BC2035500D59E96 /* Build configuration list for PBXNativeTarget "Tech TrackerTests" */;
buildPhases = (
03308F4C2BC2035500D59E96 /* Sources */,
03308F4D2BC2035500D59E96 /* Frameworks */,
03308F4E2BC2035500D59E96 /* Resources */,
);
buildRules = (
);
dependencies = (
03308F522BC2035500D59E96 /* PBXTargetDependency */,
);
name = "Tech TrackerTests";
productName = "Tech TrackerTests";
productReference = 03308F502BC2035500D59E96 /* Tech TrackerTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
03308F592BC2035500D59E96 /* Tech TrackerUITests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 03308F6A2BC2035500D59E96 /* Build configuration list for PBXNativeTarget "Tech TrackerUITests" */;
buildPhases = (
03308F562BC2035500D59E96 /* Sources */,
03308F572BC2035500D59E96 /* Frameworks */,
03308F582BC2035500D59E96 /* Resources */,
);
buildRules = (
);
dependencies = (
03308F5C2BC2035500D59E96 /* PBXTargetDependency */,
);
name = "Tech TrackerUITests";
productName = "Tech TrackerUITests";
productReference = 03308F5A2BC2035500D59E96 /* Tech TrackerUITests.xctest */;
productType = "com.apple.product-type.bundle.ui-testing";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
03308F382BC2035300D59E96 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1530;
LastUpgradeCheck = 1530;
TargetAttributes = {
03308F3F2BC2035300D59E96 = {
CreatedOnToolsVersion = 15.3;
};
03308F4F2BC2035500D59E96 = {
CreatedOnToolsVersion = 15.3;
TestTargetID = 03308F3F2BC2035300D59E96;
};
03308F592BC2035500D59E96 = {
CreatedOnToolsVersion = 15.3;
TestTargetID = 03308F3F2BC2035300D59E96;
};
};
};
buildConfigurationList = 03308F3B2BC2035300D59E96 /* Build configuration list for PBXProject "Tech Tracker" */;
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 03308F372BC2035300D59E96;
productRefGroup = 03308F412BC2035300D59E96 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
03308F3F2BC2035300D59E96 /* Tech Tracker */,
03308F4F2BC2035500D59E96 /* Tech TrackerTests */,
03308F592BC2035500D59E96 /* Tech TrackerUITests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
03308F3E2BC2035300D59E96 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
03308F4B2BC2035500D59E96 /* Preview Assets.xcassets in Resources */,
03308F482BC2035500D59E96 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
03308F4E2BC2035500D59E96 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
03308F582BC2035500D59E96 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
03308F3C2BC2035300D59E96 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
03308F462BC2035300D59E96 /* ContentView.swift in Sources */,
03308F442BC2035300D59E96 /* Tech_TrackerApp.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
03308F4C2BC2035500D59E96 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
03308F552BC2035500D59E96 /* Tech_TrackerTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
03308F562BC2035500D59E96 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
03308F5F2BC2035500D59E96 /* Tech_TrackerUITests.swift in Sources */,
03308F612BC2035500D59E96 /* Tech_TrackerUITestsLaunchTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
03308F522BC2035500D59E96 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 03308F3F2BC2035300D59E96 /* Tech Tracker */;
targetProxy = 03308F512BC2035500D59E96 /* PBXContainerItemProxy */;
};
03308F5C2BC2035500D59E96 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 03308F3F2BC2035300D59E96 /* Tech Tracker */;
targetProxy = 03308F5B2BC2035500D59E96 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
03308F622BC2035500D59E96 /* 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;
INFOPLIST_KEY_UIUserInterfaceStyle = Automatic;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
03308F632BC2035500D59E96 /* 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;
INFOPLIST_KEY_UIUserInterfaceStyle = Automatic;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
03308F652BC2035500D59E96 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Tech Tracker/Preview Content\"";
DEVELOPMENT_TEAM = GQJNM5YK2M;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Tech-Tracker-Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Tech Tracker";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleDefault;
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_UIUserInterfaceStyle = Automatic;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.2.3;
PRODUCT_BUNDLE_IDENTIFIER = "GibbyB.Tech-Tracker";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
03308F662BC2035500D59E96 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Tech Tracker/Preview Content\"";
DEVELOPMENT_TEAM = GQJNM5YK2M;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "Tech-Tracker-Info.plist";
INFOPLIST_KEY_CFBundleDisplayName = "Tech Tracker";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.productivity";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UIStatusBarStyle = UIStatusBarStyleDefault;
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
INFOPLIST_KEY_UIUserInterfaceStyle = Automatic;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 0.2.3;
PRODUCT_BUNDLE_IDENTIFIER = "GibbyB.Tech-Tracker";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
03308F682BC2035500D59E96 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIUserInterfaceStyle = Automatic;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "GibbyB.Tech-TrackerTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Tech Tracker.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Tech Tracker";
};
name = Debug;
};
03308F692BC2035500D59E96 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIUserInterfaceStyle = Automatic;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "GibbyB.Tech-TrackerTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Tech Tracker.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Tech Tracker";
};
name = Release;
};
03308F6B2BC2035500D59E96 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIUserInterfaceStyle = Automatic;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "GibbyB.Tech-TrackerUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = "Tech Tracker";
};
name = Debug;
};
03308F6C2BC2035500D59E96 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIUserInterfaceStyle = Automatic;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = "GibbyB.Tech-TrackerUITests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = "Tech Tracker";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
03308F3B2BC2035300D59E96 /* Build configuration list for PBXProject "Tech Tracker" */ = {
isa = XCConfigurationList;
buildConfigurations = (
03308F622BC2035500D59E96 /* Debug */,
03308F632BC2035500D59E96 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
03308F642BC2035500D59E96 /* Build configuration list for PBXNativeTarget "Tech Tracker" */ = {
isa = XCConfigurationList;
buildConfigurations = (
03308F652BC2035500D59E96 /* Debug */,
03308F662BC2035500D59E96 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
03308F672BC2035500D59E96 /* Build configuration list for PBXNativeTarget "Tech TrackerTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
03308F682BC2035500D59E96 /* Debug */,
03308F692BC2035500D59E96 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
03308F6A2BC2035500D59E96 /* Build configuration list for PBXNativeTarget "Tech TrackerUITests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
03308F6B2BC2035500D59E96 /* Debug */,
03308F6C2BC2035500D59E96 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 03308F382BC2035300D59E96 /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildLocationStyle</key>
<string>UseAppPreferences</string>
<key>CustomBuildLocationType</key>
<string>RelativeToDerivedData</string>
<key>DerivedDataLocationStyle</key>
<string>Default</string>
<key>ShowSharedSchemesAutomaticallyEnabled</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Tech Tracker.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>

View File

@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xAE",
"green" : "0x5E",
"red" : "0x4D"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,14 @@
{
"images" : [
{
"filename" : "logo.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

View File

@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFE"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x00",
"green" : "0x00",
"red" : "0x00"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,28 @@
{
"colors" : [
{
"color" : {
"platform" : "ios",
"reference" : "darkTextColor"
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"platform" : "ios",
"reference" : "lightTextColor"
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "logo.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 KiB

View File

@ -0,0 +1,11 @@
//
// Config.xcconfig
// Tech Tracker
//
// Created by Gabriel Brown on 4/8/24.
//
// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974
API_KEY = zAf4vYVN2pszrK
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) API_KEY=@\"$(API_KEY)\"

View File

@ -0,0 +1,486 @@
//
// ContentView.swift
// Tech Tracker
//
// Created by Gabriel Brown on 4/6/24.
//
import SwiftUI
import Foundation
import Combine
// Struct for Technician API
struct Technician: Identifiable, Codable {
let name: String
let status: String
let time: Date
var id: String { name } // Computed property for Identifiable conformance
enum CodingKeys: String, CodingKey {
case name, status, time
}
}
// Struct for Update API
struct TechnicianUpdate: Codable {
let name: String
let status: String
}
// Struct for History API
struct HistoryResponse: Decodable {
let data: [TechnicianHistory]
let meta: MetaData
}
// Struct for the technician portion of the history API
struct TechnicianHistory: Identifiable, Codable {
let name: String
let status: String
let time: Date
var id: UUID { UUID() }
enum CodingKeys: String, CodingKey {
case name, status, time
}
}
// Struct for Metadata from History API
struct MetaData: Decodable {
let current_page: Int
let per_page: Int
let total_pages: Int
let total_count: Int
}
// The Sheet View for updating technician status
struct StatusUpdateView: View {
@Binding var isPresented: Bool
var technicianName: (String)
var technicianStatus: (String)
var updateAction: (String) -> Void
@State private var newStatus: String = ""
var body: some View {
VStack(spacing: 15) {
VStack(alignment: .leading, spacing: 5) {
Text(technicianName).bold()
.font(.largeTitle)
Text(technicianStatus).lineLimit(2).font(.title)
}
TextField("New Status", text: $newStatus)
.padding() // Adds padding inside the TextField, making it taller
.textFieldStyle(RoundedBorderTextFieldStyle())
.font(.title3) // Increases the font size of the text field content
.foregroundColor(.white)
.padding(.horizontal, 20)
Button(action: {
updateAction(newStatus)
isPresented = false
}) {
Text("Update")
.font(.headline) // Make the button text larger
.padding() // Add padding around the button text to make the button larger
.frame(minWidth: 0, maxWidth: .infinity) // Makes the button expand to full width
.background(Color.accent) // Sets the button background color to blue
.foregroundColor(.white) // Sets the button text color to white
.cornerRadius(10) // Rounds the corners of the button
}
.padding(.top, 10) // Adds some space above the button
.padding(.horizontal, 30)
Spacer().frame(width: 0, height: 5)
HStack(spacing: 5) {
Button(action: {
updateAction("In the Office")
isPresented = false
}) {
Text("In the Office")
.font(.headline)
.padding()
.frame(maxWidth: .infinity)
.background(Color.accent)
.foregroundColor(.white)
.cornerRadius(10)
}
Spacer().frame(width: 10)
Button(action: {
updateAction("At desk")
isPresented = false
}) {
Text("At desk")
.font(.headline)
.padding()
.frame(maxWidth: .infinity)
.background(Color.accent)
.foregroundColor(.white)
.cornerRadius(10)
}
}.padding(.horizontal, 25)
HStack(spacing: 5) {
Button(action: {
updateAction("At lunch")
isPresented = false
}) {
Text("At lunch")
.font(.headline)
.padding()
.frame(maxWidth: .infinity)
.background(Color.accent)
.foregroundColor(.white)
.cornerRadius(10)
}
Spacer().frame(width: 10)
Button(action: {
updateAction("At Hardy")
isPresented = false
}) {
Text("At Hardy")
.font(.headline)
.padding()
.frame(maxWidth: /*@START_MENU_TOKEN@*/.infinity/*@END_MENU_TOKEN@*/)
.background(Color.accent)
.foregroundColor(.white)
.cornerRadius(10)
}
}.padding(.horizontal, 25)
HStack(spacing: 5) {
Button(action: {
updateAction("At Police Department")
isPresented = false
}) {
Text("At Police Dpt")
.font(.headline)
.padding()
.frame(maxWidth: .infinity)
.background(Color.accent)
.foregroundColor(.white)
.cornerRadius(10)
}
Spacer().frame(width: 10)
Button(action: {
updateAction("At City Hall")
isPresented = false
}) {
Text("At City Hall")
.font(.headline)
.padding()
.frame(maxWidth: .infinity)
.background(Color.accent)
.foregroundColor(.white)
.cornerRadius(10)
}
}.padding(.horizontal, 25)
HStack(spacing: 5) {
Button(action: {
updateAction("In a meeting")
isPresented = false
}) {
Text("In a meeting")
.font(.headline)
.padding()
.frame(maxWidth: .infinity)
.background(Color.accent)
.foregroundColor(.white)
.cornerRadius(10)
}
Spacer().frame(width: 10)
Button(action: {
updateAction("Out today")
isPresented = false
}) {
Text("Out today")
.font(.headline)
.padding()
.frame(maxWidth: .infinity)
.background(Color.accent)
.foregroundColor(.white)
.cornerRadius(10)
}
}.padding(.horizontal, 25)
HStack(spacing: 5) {
Button(action: {
updateAction("Running late")
isPresented = false
}) {
Text("Running late")
.font(.headline)
.padding()
.frame(maxWidth: .infinity)
.background(Color.accent)
.foregroundColor(.white)
.cornerRadius(10)
}
Spacer().frame(width: 10)
Button(action: {
updateAction("End of Shift")
isPresented = false
}) {
Text("End of Shift")
.font(.headline)
.padding()
.frame(maxWidth: .infinity)
.background(Color.accent)
.foregroundColor(.white)
.cornerRadius(10)
}
}.padding(.horizontal, 25)
}
.padding()
.padding(.top, 150)
}
}
// Single class for interpretting all API's. Has fetch functions for all 3.
class TechnicianViewModel: ObservableObject {
// Variables for containing our data from our APIs
@Published var technicians: [Technician] = []
@Published var technicianHistories: [TechnicianHistory] = []
@Published var currentPage = 1
var totalPageCount = 1
// Fetch technicians function for Technicians API
func fetchTechnicians() {
let urlString = "https://techtracker.gibbyb.com/api/technicians?apikey=APIKEYHERE"
guard let url = URL(string: urlString) else { return }
URLSession.shared.dataTask(with: url) { [weak self] data, response, error in
guard let data = data else {
DispatchQueue.main.async {
print("Networking error: \(error?.localizedDescription ?? "Unknown error")")
}
return
}
let decoder = JSONDecoder()
// Had to make my own formatter because I couldn't get the JSON decoding to work right
// This may have to do with the added ms
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
formatter.locale = Locale(identifier: "en_US_POSIX")
formatter.timeZone = TimeZone(secondsFromGMT: 0)
decoder.dateDecodingStrategy = .formatted(formatter)
// Decode the JSON response.
do {
let decodedResponse = try decoder.decode([Technician].self, from: data)
DispatchQueue.main.async {
self?.technicians = decodedResponse
}
} catch {
DispatchQueue.main.async {
print("Decoding error: \(error)")
}
}
}.resume()
}
// Update Technician Status function for the Update API
func updateTechnicianStatus(name: String, newStatus: String) {
let urlString = "https://techtracker.gibbyb.com/api/update_technicians?apikey=APIKEYHERE"
guard let url = URL(string: urlString) else { return }
let updateData = [TechnicianUpdate(name: name, status: newStatus)]
// Wrap the array in a dictionary with a key that matches the backend expectation of an array.
// Even though this app only lets you update one technician at a time, the API was written for a
// web app that lets you update multiple technicians, so it expects an array.
let wrappedData = ["technicians": updateData]
guard let jsonData = try? JSONEncoder().encode(wrappedData) else {
print("Failed to encode update data")
return
}
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpBody = jsonData
URLSession.shared.dataTask(with: request) { data, response, error in
if let error = error {
DispatchQueue.main.async {
print("Error updating technician: \(error.localizedDescription)")
}
return
}
guard let httpResponse = response as? HTTPURLResponse, httpResponse.statusCode == 200 else {
DispatchQueue.main.async {
print("Error with the response, unexpected status code: \(String(describing: response))")
}
return
}
// The database automatically adds this update to the history so we do not need to think about that in this app.
DispatchQueue.main.async {
print("Technician updated successfully.")
// Refresh technician data
self.fetchTechnicians()
}
}.resume()
}
// Fetch Technician History Function for the History API. Very similar to Technician API
// but with some added metadata
func fetchTechnicianHistory(page: Int = 1) {
let urlString = "https://techtracker.gibbyb.com/api/history?apikey=APIKEYHERE&page=\(page)"
guard let url = URL(string: urlString) else { return }
URLSession.shared.dataTask(with: url) { [weak self] data, response, error in
guard let data = data else {
DispatchQueue.main.async {
print("Networking error: \(error?.localizedDescription ?? "Unknown error")")
}
return
}
let decoder = JSONDecoder()
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
formatter.locale = Locale(identifier: "en_US_POSIX")
formatter.timeZone = TimeZone(secondsFromGMT: 0)
decoder.dateDecodingStrategy = .formatted(formatter)
do {
let jsonResponse = try decoder.decode(HistoryResponse.self, from: data)
DispatchQueue.main.async {
self?.technicianHistories = jsonResponse.data
self?.totalPageCount = jsonResponse.meta.total_pages
self?.currentPage = jsonResponse.meta.current_page
}
} catch {
DispatchQueue.main.async {
print("Decoding error: \(error)")
}
}
}.resume()
}
func nextPage() {
guard currentPage < totalPageCount else {return}
currentPage += 1
fetchTechnicianHistory(page: currentPage)
}
func previousPage() {
guard currentPage > 1 else {return}
currentPage -= 1
fetchTechnicianHistory(page: currentPage)
}
}
struct ContentView: View {
@StateObject var viewModel = TechnicianViewModel()
@State private var showingUpdateView = false
@State private var selectedTechnicianName = ""
@State private var selectedTechnicianCurrStatus = ""
var body: some View {
HStack {
Image("logo")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 50, height:50)
.imageScale(.large)
.foregroundStyle(.tint)
Text("Tech Tracker")
.bold()
.font(.system(size: 36))
}
TabView {
List {
ForEach(viewModel.technicians) { technician in
Button(action: {
self.showingUpdateView = true
self.selectedTechnicianName = technician.name
self.selectedTechnicianCurrStatus = technician.status
}) {
HStack {
VStack(alignment: .leading, spacing: 5) {
Text(technician.name).bold()
.font(.system(size: 23))
Text(technician.status).lineLimit(2)
}
Spacer()
VStack(alignment: .trailing, spacing: 5) {
VStack {
Text(technician.time, format: .dateTime.hour().minute()).font(.system(size: 20))
Text(technician.time, format: .dateTime.day().month()).font(.system(size: 18))
}
}
}
.foregroundColor(.primary)
}
}
}
.tabItem {
Image(systemName: "pencil")
Text("Update")
}
.onAppear {
viewModel.fetchTechnicians()
}
.refreshable {
viewModel.fetchTechnicians()
}
.sheet(isPresented: $showingUpdateView) {
// Pass the selected technician name directly to an explicitly initialized StatusUpdateView
StatusUpdateView(isPresented: $showingUpdateView,
technicianName: selectedTechnicianName,
technicianStatus: selectedTechnicianCurrStatus,
updateAction: { newStatus in
viewModel.updateTechnicianStatus(name: selectedTechnicianName, newStatus: newStatus)
})
}
VStack {
List(viewModel.technicianHistories) { history in
HStack {
VStack(alignment: .leading, spacing: 5) {
Text(history.name).bold().font(.system(size: 22))
Text(history.status).lineLimit(2)
}
Spacer()
VStack(alignment: .trailing, spacing: 5) {
Text(history.time, format: .dateTime.hour().minute()).font(.system(size: 20))
Text(history.time, format: .dateTime.day().month()).font(.system(size: 18))
}
}
}
HStack {
Button("Prev") {
viewModel.previousPage()
}
.disabled(viewModel.currentPage <= 1)
.font(.title2)
Spacer()
Text("Page \(viewModel.currentPage) of \(viewModel.totalPageCount)").font(.title3)
Spacer()
Button("Next") {
viewModel.nextPage()
}
.disabled(viewModel.currentPage >= viewModel.totalPageCount)
.font(.title2)
}.padding()
}
.tabItem {
Image(systemName: "book")
Text("History")
}
.onAppear {
viewModel.fetchTechnicianHistory()
}
.refreshable {
viewModel.fetchTechnicianHistory()
}
}
}
}
#Preview {
ContentView()
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

View File

@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@ -0,0 +1,18 @@
//
// Tech_TrackerApp.swift
// Tech Tracker
//
// Created by Gabriel Brown on 4/6/24.
//
import SwiftUI
@main
struct Tech_TrackerApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.preferredColorScheme(.dark)
}
}
}

View File

@ -0,0 +1,36 @@
//
// Tech_TrackerTests.swift
// Tech TrackerTests
//
// Created by Gabriel Brown on 4/6/24.
//
import XCTest
@testable import Tech_Tracker
final class Tech_TrackerTests: XCTestCase {
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.
self.measure {
// Put the code you want to measure the time of here.
}
}
}

View File

@ -0,0 +1,41 @@
//
// Tech_TrackerUITests.swift
// Tech TrackerUITests
//
// Created by Gabriel Brown on 4/6/24.
//
import XCTest
final class Tech_TrackerUITests: 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 its 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.
}
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.
}
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()
}
}
}
}

View File

@ -0,0 +1,32 @@
//
// Tech_TrackerUITestsLaunchTests.swift
// Tech TrackerUITests
//
// Created by Gabriel Brown on 4/6/24.
//
import XCTest
final class Tech_TrackerUITestsLaunchTests: XCTestCase {
override class var runsForEachTargetApplicationUIConfiguration: Bool {
true
}
override func setUpWithError() throws {
continueAfterFailure = false
}
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)
}
}

5
Tech-Tracker-Info.plist Normal file
View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict/>
</plist>