diff --git a/backend/scaffolder/templates/ios-swift-app-template/cookiecutter.json b/backend/scaffolder/templates/ios-swift-app-template/cookiecutter.json new file mode 100644 index 0000000000..d1813da0fa --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/cookiecutter.json @@ -0,0 +1,5 @@ +{ + "component_id": "", + "owner": "", + "description": "We promise to update this description /{{cookiecutter.owner}}" +} diff --git a/backend/scaffolder/templates/ios-swift-app-template/custom-fields.json b/backend/scaffolder/templates/ios-swift-app-template/custom-fields.json new file mode 100644 index 0000000000..bff05e95c7 --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/custom-fields.json @@ -0,0 +1,41 @@ +{ + "schema": [ + { + "id": "component_id", + "title": "Project name", + "type": "text", + "description": "Project name used to generate Xcode files and class names. CamelCase e.g. 'MyProject'", + "validators": [ + { + "type": "required" + }, + { + "type": "regex", + "match": "^[A-Z][A-Za-z]+$", + "message": "Project name must be CamelCase" + } + ] + }, + { + "id": "owner", + "title": "owner", + "type": "text", + "description": "The owner name used to identify the owner of this component", + "validators": [ + { + "type": "required" + }, + { + "type": "string-range", + "min": 4, + "max": 33 + }, + { + "type": "regex", + "match": "^[a-z][a-z0-9]+$", + "message": "Owner names must consist only of lowercase letters" + } + ] + } + ] +} diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/README.md b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/README.md new file mode 100644 index 0000000000..20dd1dad67 --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/README.md @@ -0,0 +1,7 @@ +# iOS App + +This project provides a template project to generate an iOS App written in Swift. + +## Building and Testing + +You can directly open the `xcodeproj` and build from Xcode or run `build.sh` from the command line. \ No newline at end of file diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/build.sh b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/build.sh new file mode 100755 index 0000000000..b40a44923e --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/build.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +PLATFORM="platform=iOS Simulator,OS=13.0,name=iPhone 11" +SDK="iphonesimulator" + +set -e +function trap_handler() { + echo -e "\n\nFailed to build project" + exit 255 +} +trap trap_handler INT TERM EXIT + +echo "Building {{cookiecutter.component_id}}." +xcodebuild \ + -project {{cookiecutter.component_id}}.xcodeproj \ + -scheme {{cookiecutter.component_id}} \ + -sdk "$SDK" \ + -destination "$PLATFORM" \ + build +trap - EXIT +exit 0 diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/project.pbxproj b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..b48e86d615 --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/project.pbxproj @@ -0,0 +1,470 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + C5B1973423EAFA6D007C9A28 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5B1973323EAFA6D007C9A28 /* AppDelegate.swift */; }; + C5B1973623EAFA6D007C9A28 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5B1973523EAFA6D007C9A28 /* SceneDelegate.swift */; }; + C5B1973823EAFA6D007C9A28 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5B1973723EAFA6D007C9A28 /* ViewController.swift */; }; + C5B1973B23EAFA6D007C9A28 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C5B1973923EAFA6D007C9A28 /* Main.storyboard */; }; + C5B1973D23EAFA6E007C9A28 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C5B1973C23EAFA6E007C9A28 /* Assets.xcassets */; }; + C5B1974023EAFA6E007C9A28 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C5B1973E23EAFA6E007C9A28 /* LaunchScreen.storyboard */; }; + C5B1974B23EAFA6E007C9A28 /* {{cookiecutter.component_id}}Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C5B1974A23EAFA6E007C9A28 /* {{cookiecutter.component_id}}Tests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + C5B1974723EAFA6E007C9A28 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = C5B1972823EAFA6D007C9A28 /* Project object */; + proxyType = 1; + remoteGlobalIDString = C5B1972F23EAFA6D007C9A28; + remoteInfo = {{cookiecutter.component_id}}; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + C5B1973023EAFA6D007C9A28 /* {{cookiecutter.component_id}}.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = {{cookiecutter.component_id}}.app; sourceTree = BUILT_PRODUCTS_DIR; }; + C5B1973323EAFA6D007C9A28 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + C5B1973523EAFA6D007C9A28 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; + C5B1973723EAFA6D007C9A28 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + C5B1973A23EAFA6D007C9A28 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + C5B1973C23EAFA6E007C9A28 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + C5B1973F23EAFA6E007C9A28 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + C5B1974123EAFA6E007C9A28 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C5B1974623EAFA6E007C9A28 /* {{cookiecutter.component_id}}Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = {{cookiecutter.component_id}}Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + C5B1974A23EAFA6E007C9A28 /* {{cookiecutter.component_id}}Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = {{cookiecutter.component_id}}Tests.swift; sourceTree = ""; }; + C5B1974C23EAFA6E007C9A28 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + C5B1972D23EAFA6D007C9A28 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C5B1974323EAFA6E007C9A28 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + C5B1972723EAFA6D007C9A28 = { + isa = PBXGroup; + children = ( + C5B1973223EAFA6D007C9A28 /* {{cookiecutter.component_id}} */, + C5B1974923EAFA6E007C9A28 /* {{cookiecutter.component_id}}Tests */, + C5B1973123EAFA6D007C9A28 /* Products */, + ); + sourceTree = ""; + }; + C5B1973123EAFA6D007C9A28 /* Products */ = { + isa = PBXGroup; + children = ( + C5B1973023EAFA6D007C9A28 /* {{cookiecutter.component_id}}.app */, + C5B1974623EAFA6E007C9A28 /* {{cookiecutter.component_id}}Tests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + C5B1973223EAFA6D007C9A28 /* {{cookiecutter.component_id}} */ = { + isa = PBXGroup; + children = ( + C5B1973323EAFA6D007C9A28 /* AppDelegate.swift */, + C5B1973523EAFA6D007C9A28 /* SceneDelegate.swift */, + C5B1973723EAFA6D007C9A28 /* ViewController.swift */, + C5B1973923EAFA6D007C9A28 /* Main.storyboard */, + C5B1973C23EAFA6E007C9A28 /* Assets.xcassets */, + C5B1973E23EAFA6E007C9A28 /* LaunchScreen.storyboard */, + C5B1974123EAFA6E007C9A28 /* Info.plist */, + ); + path = {{cookiecutter.component_id}}; + sourceTree = ""; + }; + C5B1974923EAFA6E007C9A28 /* {{cookiecutter.component_id}}Tests */ = { + isa = PBXGroup; + children = ( + C5B1974A23EAFA6E007C9A28 /* {{cookiecutter.component_id}}Tests.swift */, + C5B1974C23EAFA6E007C9A28 /* Info.plist */, + ); + path = {{cookiecutter.component_id}}Tests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + C5B1972F23EAFA6D007C9A28 /* {{cookiecutter.component_id}} */ = { + isa = PBXNativeTarget; + buildConfigurationList = C5B1974F23EAFA6E007C9A28 /* Build configuration list for PBXNativeTarget "{{cookiecutter.component_id}}" */; + buildPhases = ( + C5B1972C23EAFA6D007C9A28 /* Sources */, + C5B1972D23EAFA6D007C9A28 /* Frameworks */, + C5B1972E23EAFA6D007C9A28 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = {{cookiecutter.component_id}}; + productName = {{cookiecutter.component_id}}; + productReference = C5B1973023EAFA6D007C9A28 /* {{cookiecutter.component_id}}.app */; + productType = "com.apple.product-type.application"; + }; + C5B1974523EAFA6E007C9A28 /* {{cookiecutter.component_id}}Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = C5B1975223EAFA6E007C9A28 /* Build configuration list for PBXNativeTarget "{{cookiecutter.component_id}}Tests" */; + buildPhases = ( + C5B1974223EAFA6E007C9A28 /* Sources */, + C5B1974323EAFA6E007C9A28 /* Frameworks */, + C5B1974423EAFA6E007C9A28 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + C5B1974823EAFA6E007C9A28 /* PBXTargetDependency */, + ); + name = {{cookiecutter.component_id}}Tests; + productName = {{cookiecutter.component_id}}Tests; + productReference = C5B1974623EAFA6E007C9A28 /* {{cookiecutter.component_id}}Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + C5B1972823EAFA6D007C9A28 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1100; + LastUpgradeCheck = 1100; + ORGANIZATIONNAME = Organization; + TargetAttributes = { + C5B1972F23EAFA6D007C9A28 = { + CreatedOnToolsVersion = 11.0; + }; + C5B1974523EAFA6E007C9A28 = { + CreatedOnToolsVersion = 11.0; + TestTargetID = C5B1972F23EAFA6D007C9A28; + }; + }; + }; + buildConfigurationList = C5B1972B23EAFA6D007C9A28 /* Build configuration list for PBXProject "{{cookiecutter.component_id}}" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = C5B1972723EAFA6D007C9A28; + productRefGroup = C5B1973123EAFA6D007C9A28 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + C5B1972F23EAFA6D007C9A28 /* {{cookiecutter.component_id}} */, + C5B1974523EAFA6E007C9A28 /* {{cookiecutter.component_id}}Tests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + C5B1972E23EAFA6D007C9A28 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C5B1974023EAFA6E007C9A28 /* LaunchScreen.storyboard in Resources */, + C5B1973D23EAFA6E007C9A28 /* Assets.xcassets in Resources */, + C5B1973B23EAFA6D007C9A28 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C5B1974423EAFA6E007C9A28 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + C5B1972C23EAFA6D007C9A28 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C5B1973823EAFA6D007C9A28 /* ViewController.swift in Sources */, + C5B1973423EAFA6D007C9A28 /* AppDelegate.swift in Sources */, + C5B1973623EAFA6D007C9A28 /* SceneDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C5B1974223EAFA6E007C9A28 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + C5B1974B23EAFA6E007C9A28 /* {{cookiecutter.component_id}}Tests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + C5B1974823EAFA6E007C9A28 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = C5B1972F23EAFA6D007C9A28 /* {{cookiecutter.component_id}} */; + targetProxy = C5B1974723EAFA6E007C9A28 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + C5B1973923EAFA6D007C9A28 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + C5B1973A23EAFA6D007C9A28 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + C5B1973E23EAFA6E007C9A28 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + C5B1973F23EAFA6E007C9A28 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C5B1974D23EAFA6E007C9A28 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + 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_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; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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 = 13.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + C5B1974E23EAFA6E007C9A28 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + 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_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; + GCC_C_LANGUAGE_STANDARD = gnu11; + 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 = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + C5B1975023EAFA6E007C9A28 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = {{cookiecutter.component_id}}/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.organization.{{cookiecutter.component_id}}; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + C5B1975123EAFA6E007C9A28 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = {{cookiecutter.component_id}}/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.organization.{{cookiecutter.component_id}}; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + C5B1975323EAFA6E007C9A28 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = {{cookiecutter.component_id}}Tests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.organization.{{cookiecutter.component_id}}Tests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/{{cookiecutter.component_id}}.app/{{cookiecutter.component_id}}"; + }; + name = Debug; + }; + C5B1975423EAFA6E007C9A28 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + INFOPLIST_FILE = {{cookiecutter.component_id}}Tests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.organization.{{cookiecutter.component_id}}Tests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/{{cookiecutter.component_id}}.app/{{cookiecutter.component_id}}"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C5B1972B23EAFA6D007C9A28 /* Build configuration list for PBXProject "{{cookiecutter.component_id}}" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C5B1974D23EAFA6E007C9A28 /* Debug */, + C5B1974E23EAFA6E007C9A28 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C5B1974F23EAFA6E007C9A28 /* Build configuration list for PBXNativeTarget "{{cookiecutter.component_id}}" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C5B1975023EAFA6E007C9A28 /* Debug */, + C5B1975123EAFA6E007C9A28 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C5B1975223EAFA6E007C9A28 /* Build configuration list for PBXNativeTarget "{{cookiecutter.component_id}}Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C5B1975323EAFA6E007C9A28 /* Debug */, + C5B1975423EAFA6E007C9A28 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = C5B1972823EAFA6D007C9A28 /* Project object */; +} diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..fab8bef75c --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/project.xcworkspace/xcuserdata/patrickb.xcuserdatad/UserInterfaceState.xcuserstate b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/project.xcworkspace/xcuserdata/patrickb.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000..db2ac7d09b Binary files /dev/null and b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/project.xcworkspace/xcuserdata/patrickb.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/xcuserdata/patrickb.xcuserdatad/xcschemes/xcschememanagement.plist b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/xcuserdata/patrickb.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000000..abde0216f9 --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}.xcodeproj/xcuserdata/patrickb.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + {{cookiecutter.component_id}}.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/AppDelegate.swift b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/AppDelegate.swift new file mode 100644 index 0000000000..bdcc2c1309 --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/AppDelegate.swift @@ -0,0 +1,36 @@ +// +// AppDelegate.swift +// {{cookiecutter.component_id}} +// +// Copyright © 2020 Organization. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + // Override point for customization after application launch. + return true + } + + // MARK: UISceneSession Lifecycle + + func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { + // Called when a new scene session is being created. + // Use this method to select a configuration to create the new scene with. + return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) + } + + func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { + // Called when the user discards a scene session. + // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. + // Use this method to release any resources that were specific to the discarded scenes, as they will not return. + } + + +} + diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Assets.xcassets/AppIcon.appiconset/Contents.json b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..d8db8d65fd --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Assets.xcassets/Contents.json b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Assets.xcassets/Contents.json new file mode 100644 index 0000000000..da4a164c91 --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Base.lproj/LaunchScreen.storyboard b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..865e9329f3 --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Base.lproj/Main.storyboard b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..25a763858e --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Info.plist b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Info.plist new file mode 100644 index 0000000000..2a3483c0d2 --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/Info.plist @@ -0,0 +1,64 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + $(PRODUCT_MODULE_NAME).SceneDelegate + UISceneStoryboardFile + Main + + + + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/SceneDelegate.swift b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/SceneDelegate.swift new file mode 100644 index 0000000000..4919f3a006 --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/SceneDelegate.swift @@ -0,0 +1,52 @@ +// +// SceneDelegate.swift +// {{cookiecutter.component_id}} +// +// Copyright © 2020 Organization. All rights reserved. +// + +import UIKit + +class SceneDelegate: UIResponder, UIWindowSceneDelegate { + + var window: UIWindow? + + + func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { + // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. + // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. + // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). + guard let _ = (scene as? UIWindowScene) else { return } + } + + func sceneDidDisconnect(_ scene: UIScene) { + // Called as the scene is being released by the system. + // This occurs shortly after the scene enters the background, or when its session is discarded. + // Release any resources associated with this scene that can be re-created the next time the scene connects. + // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). + } + + func sceneDidBecomeActive(_ scene: UIScene) { + // Called when the scene has moved from an inactive state to an active state. + // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. + } + + func sceneWillResignActive(_ scene: UIScene) { + // Called when the scene will move from an active state to an inactive state. + // This may occur due to temporary interruptions (ex. an incoming phone call). + } + + func sceneWillEnterForeground(_ scene: UIScene) { + // Called as the scene transitions from the background to the foreground. + // Use this method to undo the changes made on entering the background. + } + + func sceneDidEnterBackground(_ scene: UIScene) { + // Called as the scene transitions from the foreground to the background. + // Use this method to save data, release shared resources, and store enough scene-specific state information + // to restore the scene back to its current state. + } + + +} + diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/ViewController.swift b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/ViewController.swift new file mode 100644 index 0000000000..9e2c5fb077 --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}/ViewController.swift @@ -0,0 +1,19 @@ +// +// ViewController.swift +// {{cookiecutter.component_id}} +// +// Copyright © 2020 Organization. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view. + } + + +} + diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}Tests/Info.plist b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}Tests/Info.plist new file mode 100644 index 0000000000..64d65ca495 --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}Tests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}Tests/{{cookiecutter.component_id}}Tests.swift b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}Tests/{{cookiecutter.component_id}}Tests.swift new file mode 100644 index 0000000000..3ccb2e1662 --- /dev/null +++ b/backend/scaffolder/templates/ios-swift-app-template/{{cookiecutter.component_id}}/{{cookiecutter.component_id}}Tests/{{cookiecutter.component_id}}Tests.swift @@ -0,0 +1,33 @@ +// +// {{cookiecutter.component_id}}Tests.swift +// {{cookiecutter.component_id}}Tests +// +// Copyright © 2020 Organization. All rights reserved. +// + +import XCTest +@testable import {{cookiecutter.component_id}} + +class {{cookiecutter.component_id}}Tests: XCTestCase { + + override func setUp() { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measure { + // Put the code you want to measure the time of here. + } + } + +}