diff --git a/MyApp.xcodeproj/project.pbxproj b/MyApp.xcodeproj/project.pbxproj new file mode 100644 index 0000000..8b08022 --- /dev/null +++ b/MyApp.xcodeproj/project.pbxproj @@ -0,0 +1,564 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 70; + objects = { + +/* Begin PBXBuildFile section */ + E921DC7B2CFF2CDC009271DB /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = E921DC7A2CFF2CBF009271DB /* README.md */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + E921DC4C2CFF2A70009271DB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E921DC332CFF2A6D009271DB /* Project object */; + proxyType = 1; + remoteGlobalIDString = E921DC3A2CFF2A6D009271DB; + remoteInfo = MyApp; + }; + E921DC562CFF2A70009271DB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = E921DC332CFF2A6D009271DB /* Project object */; + proxyType = 1; + remoteGlobalIDString = E921DC3A2CFF2A6D009271DB; + remoteInfo = MyApp; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + E921DC3B2CFF2A6D009271DB /* MyApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MyApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + E921DC4B2CFF2A70009271DB /* MyAppTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MyAppTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + E921DC552CFF2A70009271DB /* MyAppUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MyAppUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + E921DC7A2CFF2CBF009271DB /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + E921DC3D2CFF2A6D009271DB /* MyApp */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = MyApp; sourceTree = ""; }; + E921DC4E2CFF2A70009271DB /* MyAppTests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = MyAppTests; sourceTree = ""; }; + E921DC582CFF2A70009271DB /* MyAppUITests */ = {isa = PBXFileSystemSynchronizedRootGroup; explicitFileTypes = {}; explicitFolders = (); path = MyAppUITests; sourceTree = ""; }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + E921DC382CFF2A6D009271DB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E921DC482CFF2A70009271DB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E921DC522CFF2A70009271DB /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E921DC322CFF2A6D009271DB = { + isa = PBXGroup; + children = ( + E921DC3D2CFF2A6D009271DB /* MyApp */, + E921DC4E2CFF2A70009271DB /* MyAppTests */, + E921DC582CFF2A70009271DB /* MyAppUITests */, + E921DC3C2CFF2A6D009271DB /* Products */, + E921DC7A2CFF2CBF009271DB /* README.md */, + ); + sourceTree = ""; + }; + E921DC3C2CFF2A6D009271DB /* Products */ = { + isa = PBXGroup; + children = ( + E921DC3B2CFF2A6D009271DB /* MyApp.app */, + E921DC4B2CFF2A70009271DB /* MyAppTests.xctest */, + E921DC552CFF2A70009271DB /* MyAppUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + E921DC3A2CFF2A6D009271DB /* MyApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = E921DC5F2CFF2A70009271DB /* Build configuration list for PBXNativeTarget "MyApp" */; + buildPhases = ( + E921DC372CFF2A6D009271DB /* Sources */, + E921DC382CFF2A6D009271DB /* Frameworks */, + E921DC392CFF2A6D009271DB /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + E921DC3D2CFF2A6D009271DB /* MyApp */, + ); + name = MyApp; + packageProductDependencies = ( + ); + productName = MyApp; + productReference = E921DC3B2CFF2A6D009271DB /* MyApp.app */; + productType = "com.apple.product-type.application"; + }; + E921DC4A2CFF2A70009271DB /* MyAppTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = E921DC622CFF2A70009271DB /* Build configuration list for PBXNativeTarget "MyAppTests" */; + buildPhases = ( + E921DC472CFF2A70009271DB /* Sources */, + E921DC482CFF2A70009271DB /* Frameworks */, + E921DC492CFF2A70009271DB /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + E921DC4D2CFF2A70009271DB /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + E921DC4E2CFF2A70009271DB /* MyAppTests */, + ); + name = MyAppTests; + packageProductDependencies = ( + ); + productName = MyAppTests; + productReference = E921DC4B2CFF2A70009271DB /* MyAppTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + E921DC542CFF2A70009271DB /* MyAppUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = E921DC652CFF2A70009271DB /* Build configuration list for PBXNativeTarget "MyAppUITests" */; + buildPhases = ( + E921DC512CFF2A70009271DB /* Sources */, + E921DC522CFF2A70009271DB /* Frameworks */, + E921DC532CFF2A70009271DB /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + E921DC572CFF2A70009271DB /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + E921DC582CFF2A70009271DB /* MyAppUITests */, + ); + name = MyAppUITests; + packageProductDependencies = ( + ); + productName = MyAppUITests; + productReference = E921DC552CFF2A70009271DB /* MyAppUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E921DC332CFF2A6D009271DB /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1610; + LastUpgradeCheck = 1610; + TargetAttributes = { + E921DC3A2CFF2A6D009271DB = { + CreatedOnToolsVersion = 16.1; + }; + E921DC4A2CFF2A70009271DB = { + CreatedOnToolsVersion = 16.1; + TestTargetID = E921DC3A2CFF2A6D009271DB; + }; + E921DC542CFF2A70009271DB = { + CreatedOnToolsVersion = 16.1; + TestTargetID = E921DC3A2CFF2A6D009271DB; + }; + }; + }; + buildConfigurationList = E921DC362CFF2A6D009271DB /* Build configuration list for PBXProject "MyApp" */; + compatibilityVersion = "Xcode 15.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = E921DC322CFF2A6D009271DB; + minimizedProjectReferenceProxies = 1; + productRefGroup = E921DC3C2CFF2A6D009271DB /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E921DC3A2CFF2A6D009271DB /* MyApp */, + E921DC4A2CFF2A70009271DB /* MyAppTests */, + E921DC542CFF2A70009271DB /* MyAppUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E921DC392CFF2A6D009271DB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + E921DC7B2CFF2CDC009271DB /* README.md in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E921DC492CFF2A70009271DB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E921DC532CFF2A70009271DB /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E921DC372CFF2A6D009271DB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E921DC472CFF2A70009271DB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E921DC512CFF2A70009271DB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + E921DC4D2CFF2A70009271DB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = E921DC3A2CFF2A6D009271DB /* MyApp */; + targetProxy = E921DC4C2CFF2A70009271DB /* PBXContainerItemProxy */; + }; + E921DC572CFF2A70009271DB /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = E921DC3A2CFF2A6D009271DB /* MyApp */; + targetProxy = E921DC562CFF2A70009271DB /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + E921DC5D2CFF2A70009271DB /* 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; + IPHONEOS_DEPLOYMENT_TARGET = 18.1; + 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; + }; + E921DC5E2CFF2A70009271DB /* 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; + IPHONEOS_DEPLOYMENT_TARGET = 18.1; + 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; + }; + E921DC602CFF2A70009271DB /* 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 = "\"MyApp/Preview Content\""; + DEVELOPMENT_TEAM = 5LC5PRUDEE; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = "(Boilerplate)MyApp"; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 0.0.1; + PRODUCT_BUNDLE_IDENTIFIER = com.boilerplate.combine.swiftui.mvvm.di.my.app; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + E921DC612CFF2A70009271DB /* 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 = "\"MyApp/Preview Content\""; + DEVELOPMENT_TEAM = 5LC5PRUDEE; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = "(Boilerplate)MyApp"; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 0.0.1; + PRODUCT_BUNDLE_IDENTIFIER = com.boilerplate.combine.swiftui.mvvm.di.my.app; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + E921DC632CFF2A70009271DB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 5LC5PRUDEE; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.boilerplate.combine.swiftui.mvvm.di.my.app; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyApp.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/MyApp"; + }; + name = Debug; + }; + E921DC642CFF2A70009271DB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 5LC5PRUDEE; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.boilerplate.combine.swiftui.mvvm.di.my.app; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/MyApp.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/MyApp"; + }; + name = Release; + }; + E921DC662CFF2A70009271DB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 5LC5PRUDEE; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.boilerplate.combine.swiftui.mvvm.di.my.app; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MyApp; + }; + name = Debug; + }; + E921DC672CFF2A70009271DB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = 5LC5PRUDEE; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 15.6; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.boilerplate.combine.swiftui.mvvm.di.my.app; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = MyApp; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E921DC362CFF2A6D009271DB /* Build configuration list for PBXProject "MyApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E921DC5D2CFF2A70009271DB /* Debug */, + E921DC5E2CFF2A70009271DB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E921DC5F2CFF2A70009271DB /* Build configuration list for PBXNativeTarget "MyApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E921DC602CFF2A70009271DB /* Debug */, + E921DC612CFF2A70009271DB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E921DC622CFF2A70009271DB /* Build configuration list for PBXNativeTarget "MyAppTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E921DC632CFF2A70009271DB /* Debug */, + E921DC642CFF2A70009271DB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E921DC652CFF2A70009271DB /* Build configuration list for PBXNativeTarget "MyAppUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E921DC662CFF2A70009271DB /* Debug */, + E921DC672CFF2A70009271DB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = E921DC332CFF2A6D009271DB /* Project object */; +} diff --git a/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/MyApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/MyApp/Assets.xcassets/AccentColor.colorset/Contents.json b/MyApp/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/MyApp/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MyApp/Assets.xcassets/AppIcon.appiconset/Contents.json b/MyApp/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2305880 --- /dev/null +++ b/MyApp/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "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" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MyApp/Assets.xcassets/Contents.json b/MyApp/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MyApp/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MyApp/ContentView.swift b/MyApp/ContentView.swift new file mode 100644 index 0000000..c2ece9a --- /dev/null +++ b/MyApp/ContentView.swift @@ -0,0 +1,18 @@ +// +// ContentView.swift +// MyApp +// +// Created by Thomas on 12/3/24. +// + +import SwiftUI + +struct ContentView: View { + var body: some View { + UserListView() + } +} + +#Preview { + ContentView() +} diff --git a/MyApp/Models/User.swift b/MyApp/Models/User.swift new file mode 100644 index 0000000..8304da2 --- /dev/null +++ b/MyApp/Models/User.swift @@ -0,0 +1,15 @@ +// +// User.swift +// Boilerplate +// +// Created by Thomas on 12/3/24. +// + +// Models/User.swift +import Foundation + +struct User: Identifiable { + let id: UUID + let name: String + let age: Int +} diff --git a/MyApp/MyApp.swift b/MyApp/MyApp.swift new file mode 100644 index 0000000..ef4ea0c --- /dev/null +++ b/MyApp/MyApp.swift @@ -0,0 +1,46 @@ +// +// MyApp.swift +// MyApp +// +// Created by Thomas on 12/3/24. +// + + +import SwiftUI + +@main +struct MyApp: App { + @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate + + @Environment(\.scenePhase) var scenePhase + + var body: some Scene { + WindowGroup { + ContentView() + } + .onChange(of: scenePhase) { newPhase in + switch newPhase { + case .active: + print("App is active") + case .inactive: + print("App is inactive") + case .background: + print("App is in background") + @unknown default: + break + } + } + } +} + +class AppDelegate: NSObject, UIApplicationDelegate { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { + // Notification + UNUserNotificationCenter.current().delegate = self + return true + } +} + +extension AppDelegate: UNUserNotificationCenterDelegate { + // Notification +} diff --git a/MyApp/Preview Content/Preview Assets.xcassets/Contents.json b/MyApp/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/MyApp/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/MyApp/Services/UserService.swift b/MyApp/Services/UserService.swift new file mode 100644 index 0000000..39bf9f6 --- /dev/null +++ b/MyApp/Services/UserService.swift @@ -0,0 +1,27 @@ +// +// UserService.swift +// Boilerplate +// +// Created by Thomas on 12/3/24. +// + +// Services/UserService.swift +import Combine +import Foundation + +protocol UserServiceProtocol { + func fetchUsers() -> AnyPublisher<[User], Never> +} + +class UserService: UserServiceProtocol { + func fetchUsers() -> AnyPublisher<[User], Never> { + let users = [ + User(id: UUID(), name: "Alice", age: 25), + User(id: UUID(), name: "Bob", age: 30), + User(id: UUID(), name: "Charlie", age: 35) + ] + return Just(users) + .delay(for: .seconds(1), scheduler: DispatchQueue.main) //Mock delay + .eraseToAnyPublisher() + } +} diff --git a/MyApp/ViewModels/UserViewModel.swift b/MyApp/ViewModels/UserViewModel.swift new file mode 100644 index 0000000..19b3689 --- /dev/null +++ b/MyApp/ViewModels/UserViewModel.swift @@ -0,0 +1,31 @@ +// +// UserViewModel.swift +// Boilerplate +// +// Created by Thomas on 12/3/24. +// + +// ViewModels/UserViewModel.swift +import Combine +import Foundation + +class UserViewModel: ObservableObject { + @Published var users: [User] = [] + @Published var isLoading: Bool = false + private var cancellables = Set() + private let userService: UserServiceProtocol + + init(userService: UserServiceProtocol = UserService()) { + self.userService = userService + } + + func fetchUsers() { + isLoading = true + userService.fetchUsers() + .sink { [weak self] users in + self?.users = users + self?.isLoading = false + } + .store(in: &cancellables) + } +} diff --git a/MyApp/Views/UserDetailView.swift b/MyApp/Views/UserDetailView.swift new file mode 100644 index 0000000..0874042 --- /dev/null +++ b/MyApp/Views/UserDetailView.swift @@ -0,0 +1,23 @@ +// +// UserDetailView.swift +// Boilerplate +// +// Created by Thomas on 12/3/24. +// + +// Views/UserDetailView.swift +import SwiftUI + +struct UserDetailView: View { + let user: User + + var body: some View { + VStack { + Text("Name: \(user.name)") + .font(.title) + Text("Age: \(user.age)") + .font(.subheadline) + } + .padding() + } +} diff --git a/MyApp/Views/UserListView.swift b/MyApp/Views/UserListView.swift new file mode 100644 index 0000000..21cb937 --- /dev/null +++ b/MyApp/Views/UserListView.swift @@ -0,0 +1,33 @@ +// +// UserListView.swift +// Boilerplate +// +// Created by Thomas on 12/3/24. +// + +// Views/UserListView.swift +import SwiftUI + +struct UserListView: View { + @StateObject private var viewModel = UserViewModel() + + var body: some View { + NavigationView { + VStack { + if viewModel.isLoading { + ProgressView("Loading...") + } else { + List(viewModel.users) { user in + NavigationLink(destination: UserDetailView(user: user)) { + Text(user.name) + } + } + } + } + .navigationBarTitle(Text("Users"), displayMode: .automatic) + .onAppear { + viewModel.fetchUsers() + } + } + } +} diff --git a/MyAppTests/MyAppTests.swift b/MyAppTests/MyAppTests.swift new file mode 100644 index 0000000..ce8fd62 --- /dev/null +++ b/MyAppTests/MyAppTests.swift @@ -0,0 +1,17 @@ +// +// MyAppTests.swift +// MyAppTests +// +// Created by Thomas on 12/3/24. +// + +import Testing +@testable import MyApp + +struct MyAppTests { + + @Test func example() async throws { + // Write your test here and use APIs like `#expect(...)` to check expected conditions. + } + +} diff --git a/MyAppUITests/MyAppUITests.swift b/MyAppUITests/MyAppUITests.swift new file mode 100644 index 0000000..751741f --- /dev/null +++ b/MyAppUITests/MyAppUITests.swift @@ -0,0 +1,43 @@ +// +// MyAppUITests.swift +// MyAppUITests +// +// Created by Thomas on 12/3/24. +// + +import XCTest + +final class MyAppUITests: 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/MyAppUITests/MyAppUITestsLaunchTests.swift b/MyAppUITests/MyAppUITestsLaunchTests.swift new file mode 100644 index 0000000..59c21eb --- /dev/null +++ b/MyAppUITests/MyAppUITestsLaunchTests.swift @@ -0,0 +1,33 @@ +// +// MyAppUITestsLaunchTests.swift +// MyAppUITests +// +// Created by Thomas on 12/3/24. +// + +import XCTest + +final class MyAppUITestsLaunchTests: 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) + } +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..cdddc4f --- /dev/null +++ b/README.md @@ -0,0 +1,30 @@ +# Combine SwiftUI MVVM Dependency Injection + +A boilerplate demonstrates how to use combine and MVVM in the SwiftUI app. + +# Structure + +ProjectRoot/ +├── Models/ +│ └── User.swift +├── ViewModels/ +│ └── UserViewModel.swift +├── Views/ +│ ├── UserListView.swift +│ └── UserDetailView.swift +└── Services/ + └── UserService.swift + +# Build Tools & Version + +Xcode 15.3 + +iOS 15.6+ + +## Contributing + +We appreciate your interest in contributing to 'Combine SwiftUI MVVM Dependency Injection' . Feel free to open issues or submit pull requests. + +## License + +This project is licensed under the [BSD-4-Clause License](LICENSE).