diff --git a/README.md b/README.md index ba620b6..ca6bf7a 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ # iOS-Starter -![version](https://img.shields.io/badge/version-v0.5.1-green) +![version](https://img.shields.io/badge/version-v1.0.0-green) This is a template project for boostrapping iOS applications ## Prequisites -Install [cookiecutter](https://cookiecutter.readthedocs.io/en/latest/index.html),[XcodeGen](https://github.com/yonaskolb/XcodeGen) and [Mint](https://github.com/yonaskolb/Mint) in order to create a new project from this template: +Install [cookiecutter](https://cookiecutter.readthedocs.io/en/latest/index.html),[tuist](https://github.com/tuist/tuist) and [Mint](https://github.com/yonaskolb/Mint) in order to create a new project from this template: ```sh brew install cookiecutter -brew install xcodegen +bash <(curl -Ls https://install.tuist.io) brew install mint ``` @@ -25,7 +25,7 @@ cookiecutter https://github.com/alexanderwe/ios-starter.git - Apple Developer Team details - other details necessary for the project - `cookiecutter` will create all necessary files -- `XcodeGen` runs and automatically creates a `.xcodeproj` file +- `tuist` runs and automatically creates a `.xcodeproj` file - Afterwards `mint bootstratp` will run to download all necessary build tools - Finally `Xcode` will launch your new project - All code dependencies are managed with the `Swift Package Manager` @@ -36,45 +36,44 @@ cookiecutter https://github.com/alexanderwe/ios-starter.git - Logging Helper - [LoggingKit](https://github.com/alexanderwe/LoggingKit) - A small micro-framework for logging - Code Style - - [SwiftLint](https://www.github.com/realm/SwiftLint) - Common linting rules -- Helpers - - [Rswift](https://github.com/mac-cain13/R.swift) - Type safe access to string resources + - [swiftformat](https://github.com/nicklockwood/SwiftFormat) - Format and lint your source code + ## Structure -The structure of the template project tries to follow the idea in [this article](https://theswiftdev.com/2016/07/06/conventions-for-xcode/) from `The.Swift.Dev` +The structure of the template project tries to follow the idea of having a directory for each of your target. In each of these targets you can find it sources and the corresponding tests. External dependencies are managed via `Swift Package Manager`. Therefore it is mandatory to use **Xcode 11**. ### External build tools -External build tools like `swiftlint` and `R.swift` are managed by `Mint` This is necessary because the `Swift Package Manager` is not handling binaries, and therefore `Mint` is doing this job for us. +External build tools like `swiftformat` are managed by `Mint`. ### Modules The project is divided into several modules: -- `iOSApplication` - Contains UI code, navigation flows, views if used for SwiftUI or view controllers when UIKit is used -- `iOSApplicationTests` - Unit tests for the iOS application -- `iOSApplicationUITests` - UI tests for the iOS application +- `iOS` - Contains UI code, navigation flows, views if used for SwiftUI or view controllers when UIKit is used +- `Tests iOS` - Unit tests for the iOS application +- `UI Tests iOS` - UI tests for the iOS application - `Kit` - Source files for your service layer or generally speaking files that could be reused for example for an macOS or watchOS target -- `KitTests` - Unit test for the `Kit` target +- `Kit Tests` - Unit test for the `Kit` target ### Schemes -In general each target has its own scheme but the `iOSApplication` target has three: +In general each target has its own scheme but the `iOS` target has three: - development - staging - production -Each scheme is used in combination with the files located in `iOSApplication/SupportingFiles/Config`. There you can find four different files. Three for each scheme and one which contains the values for the active configuration. Each scheme has a `pre-build` action which copies the content from one of "release type" configs to `Configuration.xcconfig` which is then used when the app is running. +Each scheme is used in combination with the files located in `Targets/iOS/SupportingFiles/Config`. There you can find four different files. Three for each scheme and one which contains the values for the active configuration. Each scheme has a `pre-build` action which copies the content from one of "release type" configs to `Configuration.xcconfig` which is then used when the app is running. So for example if you are running the `iOS Applcation staging` scheme, the content of the `Staging.xcconfig` file is copied over to `Configuration.xcconfig` and can then be used within the app. Currently this mechanism is used to change the app identifier and set some environment variable. This can be extended to for example use different backend urls for different schemes. -If you want to access one of the variables you declare inside the `.xcconfig` files you need to make them accessible to the app by putting them into the `iOSApplication/Sources/SupportingFiles/Info.plist` file. As an example you can have a look at the `_ServerEnvironment` variable which is later accessed within the `ViewController`. +If you want to access one of the variables you declare inside the `.xcconfig` files you need to make them accessible to the app by putting them into the `Derived/InfoPlists/` file. As an example you can have a look at the `_ServerEnvironment` variable which is later accessed within the `ViewController`. #### External configuration files @@ -88,7 +87,7 @@ The mechanism described above can also be used for external configuration files. Inside the `pre-build` actions for the different schemes you copy the content of the corresponding file to `GoogleService-Info.plist` which is then used by your Google frameworks in the app. Such an `pre-build` command could like like the following. ```sh -cp -f "${PROJECT_DIR}/iOSApplication/SupportingFiles/Config/Firebase/GoogleService-Info.development.plist" "${PROJECT_DIR}/iOSApplication/SupportingFiles/Config/Firebase/GoogleService-Info.plist" +cp -f "${PROJECT_DIR}/Targets/iOS/SupportingFiles/Config/Firebase/GoogleService-Info.development.plist" "${PROJECT_DIR}/Targets/iOS/SupportingFiles/Config/Firebase/GoogleService-Info.plist" ``` ### UIKit or SwiftUI @@ -112,7 +111,7 @@ The template uses [fastlane](https://fastlane.tools) for CI/CD. It comes with a Be sure to run `bundle install` first and then execute fastlane through `bundle exec`. ```sh -bundle exec fastlane run tests +bundle exec fastlane tests ``` ### Included Actions diff --git a/cookiecutter.json b/cookiecutter.json index 70482da..fbaf294 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -1,13 +1,11 @@ { "projectName": "Example", - "projectDirectory": "{{cookiecutter.projectName|lower|replace(' ', '-')}}-ios", + "projectDirectory": "{{cookiecutter.projectName|lower|replace(' ', '-')}}", "teamId": "TeamID", "teamName": "TeamName", "companyName": "CompanyName", "bundleIdentifier": "com.example.{{cookiecutter.projectName|lower|replace(' ', '-')}}", - "deploymentTarget": "13.0", - "runMintBootstrap": "y", - "runXcodeGen": "y", + "deploymentTarget": "14.0", "gitRepository": "https://github.com/alexanderwe/ios-starter.git", "_copy_without_render": [ "*.tpl.md" diff --git a/hooks/post_gen_project.sh b/hooks/post_gen_project.sh index 1cdd582..1e23cb9 100644 --- a/hooks/post_gen_project.sh +++ b/hooks/post_gen_project.sh @@ -1,23 +1,14 @@ #! /bin/bash -# Run xcodegen to create .xcodeproj file -{%- if cookiecutter.runXcodeGen == 'y' %} - xcodegen -{%- endif %} - -# Install Mint dependecies -{%- if cookiecutter.runMintBootstrap == 'y' %} - mint bootstrap -{%- endif %} - -# If xcodegen has generated a .xcodeproj file we want to open it -{%- if cookiecutter.runXcodeGen == 'y' %} - xed . -{%- endif %} +# Run tuist to create .xcodeproj file +tuist generate # Set up git git init +# If tuist has generated a .xcodeproj file we want to open it +xed . + ## Configure git hooks chmod +x ./.githooks/commit-msg git config core.hooksPath .githooks diff --git a/{{cookiecutter.projectDirectory}}/.gitignore b/{{cookiecutter.projectDirectory}}/.gitignore index ff6dfbe..c8512da 100644 --- a/{{cookiecutter.projectDirectory}}/.gitignore +++ b/{{cookiecutter.projectDirectory}}/.gitignore @@ -1,27 +1,10 @@ -# Custom ignores - -*.generated.swift - - - -# Created by https://www.gitignore.io/api/xcode,swift,macos,swiftpm,cocoapods,swiftpackagemanager -# Edit at https://www.gitignore.io/?templates=xcode,swift,macos,swiftpm,cocoapods,swiftpackagemanager - -### CocoaPods ### -## CocoaPods GitIgnore Template - -# CocoaPods - Only use to conserve bandwidth / Save time on Pushing -# - Also handy if you have a large number of dependant pods -# - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE -Pods/ - ### macOS ### # General .DS_Store .AppleDouble .LSOverride -# Icon must end with two \r +# Icon must end with two Icon # Thumbnails @@ -43,16 +26,22 @@ Network Trash Folder Temporary Items .apdisk -### Swift ### +### Xcode ### # Xcode # # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore -## Build generated +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) build/ DerivedData/ - -## Various settings +*.moved-aside *.pbxuser !default.pbxuser *.mode1v3 @@ -61,84 +50,18 @@ DerivedData/ !default.mode2v3 *.perspectivev3 !default.perspectivev3 -xcuserdata/ - -## Other -*.moved-aside -*.xccheckout -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa -*.dSYM.zip -*.dSYM -## Playgrounds -timeline.xctimeline -playground.xcworkspace - -# Swift Package Manager -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -# Package.pins -# Package.resolved -.build/ - -# CocoaPods -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# Pods/ -# Add this line if you want to avoid checking in source code from the Xcode workspace -# *.xcworkspace - -# Carthage -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# Accio dependency management -Dependencies/ -.accio/ - -# fastlane -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots/**/*.png -fastlane/test_output - -# Code Injection -# After new code Injection tools there's a generated folder /iOSInjectionProject -# https://github.com/johnno1962/injectionforxcode - -iOSInjectionProject/ - -### Xcode ### -# Xcode -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## User settings - -## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) - -## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) - -## Xcode Patch +### Xcode Patch ### *.xcodeproj/* !*.xcodeproj/project.pbxproj !*.xcodeproj/xcshareddata/ !*.xcworkspace/contents.xcworkspacedata /*.gcno -### Xcode Patch ### -**/xcshareddata/WorkspaceSettings.xcsettings - -# End of https://www.gitignore.io/api/xcode,swift,macos,swiftpm,cocoapods,swiftpackagemanager +### Projects ### +*.xcodeproj +*.xcworkspace +### Tuist derived files ### +graph.dot +Derived/ diff --git a/{{cookiecutter.projectDirectory}}/.swift-version b/{{cookiecutter.projectDirectory}}/.swift-version new file mode 100644 index 0000000..5fbc5b2 --- /dev/null +++ b/{{cookiecutter.projectDirectory}}/.swift-version @@ -0,0 +1,2 @@ + +5.3 \ No newline at end of file diff --git a/{{cookiecutter.projectDirectory}}/.swiftformat b/{{cookiecutter.projectDirectory}}/.swiftformat new file mode 100644 index 0000000..48acc3b --- /dev/null +++ b/{{cookiecutter.projectDirectory}}/.swiftformat @@ -0,0 +1,16 @@ +# format options +--indent tab +--tabwidth 4 + +# Enabled rules +--rules duplicateImports +--rules elseOnSameLine +--rules emptyBraces +--rules hoistPatternLet +--rules redundantParens + + +# Disabled rules +--disable indent #Rationale: Until decided, too many false positives +--disable redundantType #Rationale: Sometimes it makes the code easier to understand to explicitly declare the type, even if its obvious for the compiler +--disable redundantReturn #Rationale: Omitting the `return` keyword is a new feature in Swift 5.3. It could be confusing for new developers to omit it diff --git a/{{cookiecutter.projectDirectory}}/.swiftlint.yml b/{{cookiecutter.projectDirectory}}/.swiftlint.yml deleted file mode 100644 index 04d232e..0000000 --- a/{{cookiecutter.projectDirectory}}/.swiftlint.yml +++ /dev/null @@ -1,649 +0,0 @@ -disabled_rules: # rule identifiers to exclude from running - # Rationale: Xcode auto indentation can cause this warning - # https://github.com/realm/SwiftLint/blob/master/Rules.md#closure-end-indentation - - closure_end_indentation - - # Rationale: Arbitrary restriction - # https://github.com/realm/SwiftLint/blob/master/Rules.md#cyclomatic-complexity - - cyclomatic_complexity - - # Rationale: Arbitrary restriction - # https://github.com/realm/SwiftLint/blob/master/Rules.md#discouraged-object-literal - - discouraged_object_literal - - # Rationale: Current implementation triggers on system APIs. Disabling until rule is configurable to fix this. An optional collection can have two "empty" states: nil and empty. If nil and empty are to mean different things, consider modeling it differently using an enum with associated values. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#discouraged-optional-collection - - discouraged_optional_collection - - # Rationale: Doesn't really add any clarity - # https://github.com/realm/SwiftLint/blob/master/Rules.md#explicit-acl - - explicit_acl - - # Rationale: Heavy handed in telling someone how to code - # https://github.com/realm/SwiftLint/blob/master/Rules.md#explicit-enum-raw-value - - explicit_enum_raw_value - - # Rationale: Doesn't really add any clarity - # https://github.com/realm/SwiftLint/blob/master/Rules.md#explicit-top-level-acl - - explicit_top_level_acl - - # Rationale: We don't want to fight the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#explicit-type-interface - - explicit_type_interface - - # Rationale: Unclear on what it enforces - # https://github.com/realm/SwiftLint/blob/master/Rules.md#extension-access-modifier - - extension_access_modifier - - # Rationale: Arbitrary restriction - # https://github.com/realm/SwiftLint/blob/master/Rules.md#file-line-length - - file_length - - # Rationale: Arbitrary restriction - # https://github.com/realm/SwiftLint/blob/master/Rules.md#function-body-length - - function_body_length - - # Rationale: Arbitrary restriction - # https://github.com/realm/SwiftLint/blob/master/Rules.md#function-parameter-count - - function_parameter_count - - # Rationale: Arbitrary restriction - # https://github.com/realm/SwiftLint/blob/master/Rules.md#generic-type-name - - generic_type_name - - # Rationale: Arbitrary restriction - # https://github.com/realm/SwiftLint/blob/master/Rules.md#identifier-name - - identifier_name - - # Rationale: Being consise and not fighting the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#implicit-return - - implicit_return - - # Rationale: Arbitrary restriction - # https://github.com/realm/SwiftLint/blob/master/Rules.md#large-tuple - - large_tuple - - # Rationale: Arbitrary restriction - # https://github.com/realm/SwiftLint/blob/master/Rules.md#variable-declaration-whitespace - - let_var_whitespace - - # Rationale: Arbitrary restriction - # https://github.com/realm/SwiftLint/blob/master/Rules.md#line-length - - line_length - - # Rationale: Xcode auto indentation can cause this warning - # https://github.com/realm/SwiftLint/blob/master/Rules.md#literal-expression-end-indentation - - literal_expression_end_indentation - - # Rationale: Functions with parameters followed by multiple closures trigger this warning when placed on separate lines. The default Xcode formatting for this behavior is inconsistent, and auto indentation is poor. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#multiline-arguments - - multiline_arguments - - # Rationale: Functions with closures followed by a parenthesis trigger this warning. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#multiline-arguments-brackets - - multiline_arguments_brackets - - # Rationale: Arbitrary restriction. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#multiline-literal-brackets - - multiline_literal_brackets - - # Rationale: Arbitrary restriction. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#multiline-parameters-brackets - - multiline_parameters_brackets - - # Rationale: Arbitrary restriction - # https://github.com/realm/SwiftLint/blob/master/Rules.md#nesting - - nesting - - # Rationale: We don't use nimble - # https://github.com/realm/SwiftLint/blob/master/Rules.md#nimble-operator - - nimble_operator - - # Rationale: Protocol conformance can require public declaration - # https://github.com/realm/SwiftLint/blob/master/Rules.md#no-extension-access-modifier - - no_extension_access_modifier - - # Rationale: Heavy handed in telling someone how to program a specific way - # https://github.com/realm/SwiftLint/blob/master/Rules.md#no-grouping-extension - - no_grouping_extension - - # Rationale: Unintuitive - # https://github.com/realm/SwiftLint/blob/master/Rules.md#number-separator - - number_separator - - # Rationale: Doesn't really add anything other than telling someone how to code - # https://github.com/realm/SwiftLint/blob/master/Rules.md#object-literal - - object_literal - - # Rationale: Old outdated convention - # https://github.com/realm/SwiftLint/blob/master/Rules.md#prefixed-top-level-constant - - prefixed_toplevel_constant - - # Rationale: We don't use Quick - # https://github.com/realm/SwiftLint/blob/master/Rules.md#quick-discouraged-call - - quick_discouraged_call - - # Rationale: We don't use Quick - # https://github.com/realm/SwiftLint/blob/master/Rules.md#quick-discouraged-focused-test - - quick_discouraged_focused_test - - # Rationale: We don't use Quick - # https://github.com/realm/SwiftLint/blob/master/Rules.md#quick-discouraged-pending-test - - quick_discouraged_pending_test - - # Rationale: There are cases where you may want to declare the string enum value explicitly - # https://github.com/realm/SwiftLint/blob/master/Rules.md#redundant-string-enum-value - - redundant_string_enum_value - - # Rationale: Do not require a deinit function, as it is not always necessary. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#required-deinit - - required_deinit - - # Rationale: Provides no value - # https://github.com/realm/SwiftLint/blob/master/Rules.md#sorted-imports - - sorted_imports - - # Rationale: Usage of proper access level - # https://github.com/realm/SwiftLint/blob/master/Rules.md#strict-fileprivate - - strict_fileprivate - - # Rationale: Doesn't really add anything other than telling someone how to code - # https://github.com/realm/SwiftLint/blob/master/Rules.md#switch-case-on-newline - - switch_case_on_newline - - # Rationale: Naming the parameters can be important for clarity in some instances - # https://github.com/realm/SwiftLint/blob/master/Rules.md#trailing-closure - - trailing_closure - - # Rationale: Xcode auto indentation can cause this warning - # https://github.com/realm/SwiftLint/blob/master/Rules.md#trailing-whitespace - - trailing_whitespace - - # Rationale: Arbitrary restriction - # https://github.com/realm/SwiftLint/blob/master/Rules.md#type-body-length - - type_body_length - - # Rationale: Arbitrary restriction - # https://github.com/realm/SwiftLint/blob/master/Rules.md#type-name - - type_name - - # Rationale: For typed parameters in closures, parentheses are required by swift, making this rule inherently inconsistent. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#unneeded-parentheses-in-closure-argument - - unneeded_parentheses_in_closure_argument - - # Rationale: Custom rule overrides to allow todos when issue links are provided. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#todo - - todo - - # Rationale: Allows for more readable code when defining new properties or functions on types. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#vertical-whitespace-after-opening-braces - - vertical_whitespace_opening_braces - - # Rationale: Unnecessary whitespace. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#vertical-whitespace-between-cases - - vertical_whitespace_between_cases - - # Rationale: Allow using XCTest functions as defined by the framework. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#xctest-specific-matcher - - xct_specific_matcher - - # Rationale: Arbitrary restriction. The default bundle will be suitable for most projects. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#nslocalizedstring-require-bundle - - nslocalizedstring_require_bundle - - # Rationale: The current rule set does not allow for enforcement of our preferred ordering (namely, private classes at the bottom of the file). - # https://github.com/realm/SwiftLint/blob/master/Rules.md#file-types-order - - file_types_order - - # Rationale: The benefit of this rule is a minor performance improvement, at the potential cost of legibility. Leave up to the developer's discrection. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#reduce-into - - reduce_into - -opt_in_rules: # some rules are only opt-in - # Rationale: When using map, we think of it being used to transform a current array into something else - # https://github.com/realm/SwiftLint/blob/master/Rules.md#array-init - - array_init - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#attributes - - attributes - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#block-based-kvo - - block_based_kvo - - # Rationale: Prevents retain cycles - # https://github.com/realm/SwiftLint/blob/master/Rules.md#class-delegate-protocol - - class_delegate_protocol - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#closing-brace-spacing - - closing_brace - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#closure-parameter-position - - closure_parameter_position - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#closure-spacing - - closure_spacing - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#colon - - colon - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#comma-spacing - - comma - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#compiler-protocol-init - - compiler_protocol_init - - # Rationale: Encourages usage of assertion failures and thinking about what you are returning - # https://github.com/realm/SwiftLint/blob/master/Rules.md#conditional-returns-on-newline - - conditional_returns_on_newline - - # Rationale: A more clear and consise way to check if something exists - # https://github.com/realm/SwiftLint/blob/master/Rules.md#contains-over-first-not-nil - - contains_over_first_not_nil - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#control-statement - - control_statement - - # Rationale: Encourages proper memory practices - # https://github.com/realm/SwiftLint/blob/master/Rules.md#discarded-notification-center-observer - - discarded_notification_center_observer - - # Rationale: Prevents coder error - # https://github.com/realm/SwiftLint/blob/master/Rules.md#discouraged-direct-initialization - - discouraged_direct_init - - # Rationale: A nil bool is a tri-state variable which can be modeled more clearly - # https://github.com/realm/SwiftLint/blob/master/Rules.md#discouraged-optional-boolean - - discouraged_optional_boolean - - # Rationale: Imports are not required more than once. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#duplicate-imports - - duplicate_imports - - # Rationale: Prevents coder error - # https://github.com/realm/SwiftLint/blob/master/Rules.md#dynamic-inline - - dynamic_inline - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#empty-count - - empty_count - - # Rationale: Provides consistency in coding style and brevity. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#empty-enum-arguments - - empty_enum_arguments - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#empty-parameters - - empty_parameters - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#empty-parentheses-with-trailing-closure - - empty_parentheses_with_trailing_closure - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#empty-string - - empty_string - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#explicit-init - - explicit_init - - # Rationale: Prevents coder error - # https://github.com/realm/SwiftLint/blob/master/Rules.md#fallthrough - - fallthrough - - # Rationale: Encourages better documentation - # https://github.com/realm/SwiftLint/blob/master/Rules.md#fatal-error-message - - fatal_error_message - - # Rationale: Provides consistency - # https://github.com/realm/SwiftLint/blob/master/Rules.md#file-header - - file_header - - # Rationale: Encourages using the right API to solve a problem - # https://github.com/realm/SwiftLint/blob/master/Rules.md#first-where - - first_where - - # Rationale: Encourages using the right API to solve a problem - # https://github.com/realm/SwiftLint/blob/master/Rules.md#for-where - - for_where - - # Rationale: Prevents coder error, doesn't crash, makes coder be explicit about their assumptions - # https://github.com/realm/SwiftLint/blob/master/Rules.md#force-cast - - force_cast - - # Rationale: Prevents coder error, doesn't crash, makes coder be explicit about their assumptions - # https://github.com/realm/SwiftLint/blob/master/Rules.md#force-try - - force_try - - # Rationale: Prevents coder error, doesn't crash, makes coder be explicit about their assumptions - # https://github.com/realm/SwiftLint/blob/master/Rules.md#force-unwrapping - - force_unwrapping - - # Rationale: Provides consistency in coding style and brevity. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#implicit-getter - - implicit_getter - - # Rationale: Prevents coder error, doesn't crash, makes coder be explicit about their assumptions - # https://github.com/realm/SwiftLint/blob/master/Rules.md#implicitly-unwrapped-optional - - implicitly_unwrapped_optional - - # Rationale: Encourages using the right API to solve a problem - # https://github.com/realm/SwiftLint/blob/master/Rules.md#is-disjoint - - is_disjoint - - # Rationale: Provides clarity and consistency by using the default parameter - # https://github.com/realm/SwiftLint/blob/master/Rules.md#joined-default-parameter - - joined_default_parameter - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#last-where - - last_where - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#leading-whitespace - - leading_whitespace - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#legacy-cggeometry-functions - - legacy_cggeometry_functions - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#legacy-constant - - legacy_constant - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#legacy-constructor - - legacy_constructor - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#legacy-hashing - - legacy_hashing - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#legacy-nsgeometry-functions - - legacy_nsgeometry_functions - - # Rationale: Usage of proper access level - # https://github.com/realm/SwiftLint/blob/master/Rules.md#lower-acl-than-parent - - lower_acl_than_parent - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#mark - - mark - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#multiline-parameters - - multiline_parameters - - # Rationale: Clarity of code - # https://github.com/realm/SwiftLint/blob/master/Rules.md#multiple-closures-with-trailing-closure - - multiple_closures_with_trailing_closure - - # Rationale: Encourages coder best practices though language feature likely makes this obsolete - # https://github.com/realm/SwiftLint/blob/master/Rules.md#multiple-closures-with-trailing-closure - - notification_center_detachment - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#opening-brace-spacing - - opening_brace - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#operator-usage-whitespace - - operator_usage_whitespace - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#operator-function-whitespace - - operator_whitespace - - # Rationale: Prevents coder error - # https://github.com/realm/SwiftLint/blob/master/Rules.md#overridden-methods-call-super - - overridden_super_call - - # Rationale: Prevents unpredictable behavior - # https://github.com/realm/SwiftLint/blob/master/Rules.md#override-in-extension - - override_in_extension - - # Rationale: Promotes consistency and reduces duplication. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#pattern-matching-keywords - - pattern_matching_keywords - - # Rationale: UI elements should only be configurable by their owners and not be exposed to others - # https://github.com/realm/SwiftLint/blob/master/Rules.md#private-actions - - private_action - - # Rationale: UI elements should only be configurable by their owners and not be exposed to others - # https://github.com/realm/SwiftLint/blob/master/Rules.md#private-outlets - - private_outlet - - # Rationale: Keep internal details from being overexposed - # https://github.com/realm/SwiftLint/blob/master/Rules.md#private-over-fileprivate - - private_over_fileprivate - - # Rationale: Prevents coder error - # https://github.com/realm/SwiftLint/blob/master/Rules.md#private-unit-test - - private_unit_test - - # Rationale: Prevents coder error - # https://github.com/realm/SwiftLint/blob/master/Rules.md#prohibited-calls-to-super - - prohibited_super_call - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#protocol-property-accessors-order - - protocol_property_accessors_order - - # Rationale: Provides consistency in coding style and brevity - # https://github.com/realm/SwiftLint/blob/master/Rules.md#redundant-discardable-let - - redundant_discardable_let - - # Rationale: Provides consistency in coding style and brevity - # https://github.com/realm/SwiftLint/blob/master/Rules.md#redundant-nil-coalescing - - redundant_nil_coalescing - - # Rationale: Provides consistency in coding style and brevity - # https://github.com/realm/SwiftLint/blob/master/Rules.md#redundant-objc-attribute - - redundant_objc_attribute - - # Rationale: Provides consistency in coding style and brevity - # https://github.com/realm/SwiftLint/blob/master/Rules.md#redundant-optional-initialization - - redundant_optional_initialization - - # Rationale: Provides consistency in coding style and brevity - # https://github.com/realm/SwiftLint/blob/master/Rules.md#redundant-void-return - - redundant_void_return - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#required-enum-case - - required_enum_case - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#returning-whitespace - - return_arrow_whitespace - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#shorthand-operator - - shorthand_operator - - # Rationale: There should be only XCTestCase per file - # https://github.com/realm/SwiftLint/blob/master/Rules.md#single-test-class - - single_test_class - - # Rationale: Provides consistency and clarity in coding style and is less code - # https://github.com/realm/SwiftLint/blob/master/Rules.md#min-or-max-over-sorted-first-or-last - - sorted_first_last - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#statement-position - - statement_position - - # Rationale: Provides cleaniness of code - # https://github.com/realm/SwiftLint/blob/master/Rules.md#superfluous-disable-command - - superfluous_disable_command - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#switch-and-case-statement-alignment - - switch_case_alignment - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#syntactic-sugar - - syntactic_sugar - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#trailing-comma - - trailing_comma - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#trailing-newline - - trailing_newline - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#trailing-semicolon - - trailing_semicolon - - # Rationale: Provides consistency in coding style and brevity - # https://github.com/realm/SwiftLint/blob/master/Rules.md#unneeded-break-in-switch - - unneeded_break_in_switch - - # Rationale: Provides consistency in coding style and brevity - # https://github.com/realm/SwiftLint/blob/master/Rules.md#unused-control-flow-label - - unused_control_flow_label - - # Rationale: Provides consistency in coding style and brevity - # https://github.com/realm/SwiftLint/blob/master/Rules.md#unused-closure-parameter - - unused_closure_parameter - - # Rationale: Provides consistency in coding style and brevity - # https://github.com/realm/SwiftLint/blob/master/Rules.md#unused-enumerated - - unused_enumerated - - # Rationale: Provides consistency in coding style and brevity - # https://github.com/realm/SwiftLint/blob/master/Rules.md#unused-optional-binding - - unused_optional_binding - - # Rationale: Avoids issues where the setter is not using the value passed in. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#unused-setter-value - - unused_setter_value - - # Rationale: Prevents coder error - # https://github.com/realm/SwiftLint/blob/master/Rules.md#valid-ibinspectable - - valid_ibinspectable - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#vertical-parameter-alignment - - vertical_parameter_alignment - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#vertical-parameter-alignment-on-call - - vertical_parameter_alignment_on_call - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#vertical-whitespace - - vertical_whitespace - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#vertical-whitespace-before-closing-braces - - vertical_whitespace_closing_braces - - # Rationale: Provides consistency in coding style and follows modern practices of the language - # https://github.com/realm/SwiftLint/blob/master/Rules.md#void-return - - void_return - - # Rationale: Avoids using weak when it has no effect. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#weak-computed-property - - weak_computed_property - - # Rationale: Prevents retain cycles and coder error - # https://github.com/realm/SwiftLint/blob/master/Rules.md#weak-delegate - - weak_delegate - - # Rationale: Encourages better documentation - # https://github.com/realm/SwiftLint/blob/master/Rules.md#xctfail-message - - xctfail_message - - # Rationale: Provides consistency in coding style - # https://github.com/realm/SwiftLint/blob/master/Rules.md#yoda-condition-rule - - yoda_condition - - # Rationale: Encourages documentation - # https://github.com/realm/SwiftLint/blob/master/Rules.md#todo - - custom_todo - - # Rationale: Provides consistency in coding style. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#reduce-boolean - - reduce_boolean - - # Rationale: == is not used for NSObject comparison, and could lead to confusion. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#nsobject-prefer-isequal - - nsobject_prefer_isequal - - # Rationale: Provides consistency of ordering within a type. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#type-contents-order - - type_contents_order - - # Rationale: Provides consistency in coding style. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#unused-capture-list - - unused_capture_list - - # Rationale: Prevents issues with using unowned. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#unowned-variable-capture - - unowned_variable_capture - - # Rationale: Ensures all enums can be switched upon. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#duplicate-enum-cases - - duplicate_enum_cases - - # Rationale: Provides consistency in coding style. - # https://github.com/realm/SwiftLint/blob/master/Rules.md#legacy-multiple - - legacy_multiple - -excluded: # paths to ignore during linting. Takes precedence over `included`. - - Carthage - - Pods - - "iOSApplication/Sources/Generated/R.generated.swift" - -file_header: - required_pattern: | - \/\/ - \/\/ .*? - \/\/ .*? - \/\/ - \/\/ Created by .*? on \d{1,2}\/\d{1,2}\/(\d{2}|\d{4})\. - \/\/ Copyright (©|\(c\)) \d{4} .*?\. All rights reserved\. - \/\/ -attributes: - always_on_same_line: - ["@IBAction", "@NSManaged", "@discardableResult", "@escaping", "@objc"] - -type_contents_order: - order: - - case - - associated_type - - type_alias - - subtype - - ib_outlet - - ib_inspectable - - [type_property, instance_property] - - [ - initializer, - type_method, - view_life_cycle_method, - subscript, - other_method, - ib_action, - ] - -custom_rules: - force_https: - name: "Force HTTPS over HTTP" - regex: "((?i)http(?!s))" - match_kinds: string - message: "HTTPS should be favored over HTTP" - severity: warning diff --git a/{{cookiecutter.projectDirectory}}/.tuist-version b/{{cookiecutter.projectDirectory}}/.tuist-version new file mode 100644 index 0000000..c1af674 --- /dev/null +++ b/{{cookiecutter.projectDirectory}}/.tuist-version @@ -0,0 +1 @@ +1.19.0 \ No newline at end of file diff --git a/{{cookiecutter.projectDirectory}}/Gemfile b/{{cookiecutter.projectDirectory}}/Gemfile index 2db3954..41ee80c 100644 --- a/{{cookiecutter.projectDirectory}}/Gemfile +++ b/{{cookiecutter.projectDirectory}}/Gemfile @@ -1,3 +1,3 @@ source 'https://rubygems.org' do - gem 'fastlane', "2.144.0" + gem 'fastlane', "2.170.0" end \ No newline at end of file diff --git a/{{cookiecutter.projectDirectory}}/Mintfile b/{{cookiecutter.projectDirectory}}/Mintfile index 68fd9a0..cb38e55 100644 --- a/{{cookiecutter.projectDirectory}}/Mintfile +++ b/{{cookiecutter.projectDirectory}}/Mintfile @@ -1,2 +1 @@ -realm/SwiftLint@0.35.0 -https://github.com/mac-cain13/R.swift.git@v5.2.2 \ No newline at end of file +nicklockwood/SwiftFormat@0.47.4 \ No newline at end of file diff --git a/{{cookiecutter.projectDirectory}}/Project.swift b/{{cookiecutter.projectDirectory}}/Project.swift new file mode 100644 index 0000000..989b06a --- /dev/null +++ b/{{cookiecutter.projectDirectory}}/Project.swift @@ -0,0 +1,147 @@ +import ProjectDescription +//import ProjectDescriptionHelpers + +let project = Project.init( + name: "{{cookiecutter.projectName}}", + organizationName: "Kevin Chromik", + packages: [ + .package(url: "https://github.com/alexanderwe/LoggingKit", .exact("3.0.0")), + ], + targets: [ + .init(name: "{{cookiecutter.projectName}} (iOS)", + platform: .iOS, + product: .app, + productName: "{{cookiecutter.projectName|replace(' ', '_')}}", + bundleId: "$(PRODUCT_BUNDLE_IDENTIFIER)", + infoPlist: .extendingDefault(with: [ + "CFBundleShortVersionString": .string("0.0.1"), + "CFBundleVersion": .string("1"), + "CFBundleIdentifier": .string("$(PRODUCT_BUNDLE_IDENTIFIER)"), + "CFBundleDisplayName": .string("{{cookiecutter.projectName}}$(SERVER_ENVIRONMENT_SUFFIX)"), + "UIApplicationSceneManifest" : .dictionary([ + "UIApplicationSupportsMultipleScenes": .boolean(true), + "UISceneConfigurations": .dictionary([ + "UIWindowSceneSessionRoleApplication": .array([ + .dictionary([ + "UISceneConfigurationName": "Default Configuration", + "UISceneDelegateClassName":"$(PRODUCT_MODULE_NAME).SceneDelegate" + ]) + ]) + ]) + ]), + "UIApplicationSupportsIndirectInputEvents": .boolean(true), + "UILaunchScreen": .dictionary([:]), + "_ServerEnvironment": .string("$(SERVER_ENVIRONMENT)") + ]), + sources: [ + "Targets/iOS/Sources/**" + ], resources: [ + "Targets/iOS/Resources/**", + "Targets/iOS/SupportingFiles/**" + ], + actions: [ + TargetAction.pre(path: "Scripts/SwiftFormatRunScript.sh", + arguments: "", + name: "Swiftformat (LintMode)") + ], + dependencies: [ + .target(name: "{{cookiecutter.projectName}}Kit") + ], + settings: Settings( + debug: Configuration(xcconfig: "Targets/iOS/SupportingFiles/Config/Configuration.xcconfig"), + release: Configuration(xcconfig: "Targets/iOS/SupportingFiles/Config/Configuration.xcconfig") + ) + ), + .init(name: "Tests iOS", + platform: .iOS, + product: .unitTests, + productName: "Tests_iOS", + bundleId: "{{cookiecutter.bundleIdentifier}}-ios-tests", + infoPlist: .default, + sources: [ + "Targets/iOS/Tests/UnitTests/**" + ], + dependencies: [ + .target(name: "{{cookiecutter.projectName}} (iOS)") + ] + ), + .init(name: "UI Tests iOS", + platform: .iOS, + product: .uiTests, + productName: "UI_Tests_iOS", + bundleId: "{{cookiecutter.bundleIdentifier}}-ios-ui-tests", + infoPlist: .default, + sources: [ + "Targets/iOS/Tests/UITests/**" + ], + dependencies: [ + .target(name: "{{cookiecutter.projectName}} (iOS)") + ] + ), + .init(name: "{{cookiecutter.projectName}}Kit", + platform: .iOS, + product: .framework, + productName: "{{cookiecutter.projectName|replace(' ', '_')}}Kit", + bundleId: "{{cookiecutter.bundleIdentifier}}kit", + infoPlist: .default, + sources: [ + "Targets/{{cookiecutter.projectName}}Kit/Sources/**" + ], + dependencies: [ + .package(product: "LoggingKit") + ] + ), + .init(name: "{{cookiecutter.projectName}}Kit Tests", + platform: .iOS, + product: .unitTests, + productName: "Tests_{{cookiecutter.projectName|replace(' ', '_')}}Kit", + bundleId: "{{cookiecutter.bundleIdentifier}}kit-tests", + infoPlist: .default, + sources: [ + "Targets/{{cookiecutter.projectName}}Kit/Tests/**" + ], + dependencies: [ + .target(name: "{{cookiecutter.projectName}} (iOS)") + ] + ), + ], + schemes: [ + .init(name: "{{cookiecutter.projectName}} (iOS) Development", + shared: true, + buildAction: BuildAction(targets: ["{{cookiecutter.projectName}} (iOS)"], + preActions: [ + .init(scriptText: "cp -f \"${PROJECT_DIR}/Targets/iOS/SupportingFiles/Config/Development.xcconfig\" \"${PROJECT_DIR}/Targets/iOS/SupportingFiles/Config/Configuration.xcconfig\"", + target: "{{cookiecutter.projectName}} (iOS)" + )] + ), + testAction: TestAction(targets: ["Tests iOS", "UI Tests iOS"]), + runAction: RunAction(executable: "{{cookiecutter.projectName}} (iOS)") + ), + .init(name: "{{cookiecutter.projectName}} (iOS) Staging", + shared: true, + buildAction: BuildAction(targets: ["{{cookiecutter.projectName}} (iOS)"], + preActions: [ + .init(scriptText: "cp -f \"${PROJECT_DIR}/Targets/iOS/SupportingFiles/Config/Staging.xcconfig\" \"${PROJECT_DIR}/Targets/iOS/SupportingFiles/Config/Configuration.xcconfig\"", + target: "{{cookiecutter.projectName}} (iOS)" + )] + ), + testAction: TestAction(targets: ["Tests iOS", "UI Tests iOS"]), + runAction: RunAction(executable: "{{cookiecutter.projectName}} (iOS)") + ), + .init(name: "{{cookiecutter.projectName}} (iOS) Production", + shared: true, + buildAction: BuildAction(targets: ["{{cookiecutter.projectName}} (iOS)"], + preActions: [ + .init(scriptText: "cp -f \"${PROJECT_DIR}/Targets/iOS/SupportingFiles/Config/Production.xcconfig\" \"${PROJECT_DIR}/Targets/iOS/SupportingFiles/Config/Configuration.xcconfig\"", + target: "{{cookiecutter.projectName}} (iOS)" + )] + ), + testAction: TestAction(targets: ["Tests iOS", "UI Tests iOS"]), + runAction: RunAction(executable: "{{cookiecutter.projectName}} (iOS)") + ), + .init(name: "{{cookiecutter.projectName}}Kit", + shared: true, + testAction: TestAction(targets: ["{{cookiecutter.projectName}}Kit Tests"]) + ), + ] +) diff --git a/{{cookiecutter.projectDirectory}}/README.md b/{{cookiecutter.projectDirectory}}/README.md index 369a0f7..a2c0cdf 100644 --- a/{{cookiecutter.projectDirectory}}/README.md +++ b/{{cookiecutter.projectDirectory}}/README.md @@ -4,7 +4,6 @@ - Fill the README - Initially build the project -- Add `R.generated.swift` from `iOSApplication/Sources/Generated` to the project and untick `Copy items if needed` - Delete this TODO section. (And enjoy your fresh and clean Project-setup 🙌) --- @@ -13,7 +12,7 @@ --- -⚡️ Swift: 5.1 📱 iOS {{cookiecutter.deploymentTarget}} +⚡️ Swift: 5.3 📱 iOS {{cookiecutter.deploymentTarget}} --- @@ -31,4 +30,4 @@ Where do I find API docs, wireframes, etc.? ## CI/CD -Is Bamboo set up ? +IS Ci/CD set up ? diff --git a/{{cookiecutter.projectDirectory}}/Scripts/SwiftFormatRunScript.sh b/{{cookiecutter.projectDirectory}}/Scripts/SwiftFormatRunScript.sh new file mode 100755 index 0000000..c8fa9e8 --- /dev/null +++ b/{{cookiecutter.projectDirectory}}/Scripts/SwiftFormatRunScript.sh @@ -0,0 +1,5 @@ + if mint list | grep -q 'SwiftFormat'; then + mint run swiftformat --lenient --lint "$SRCROOT" +else + echo "error: SwiftFormat not installed; run 'mint bootstrap' to install" +fi \ No newline at end of file diff --git a/{{cookiecutter.projectDirectory}}/Setup.swift b/{{cookiecutter.projectDirectory}}/Setup.swift new file mode 100644 index 0000000..ca85ca0 --- /dev/null +++ b/{{cookiecutter.projectDirectory}}/Setup.swift @@ -0,0 +1,4 @@ +import ProjectDescription +let setup = Setup([ + .mint() +]) \ No newline at end of file diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/Contents.json b/{{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/Contents.json rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-20@2x.png b/{{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-20@2x.png similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-20@2x.png rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-20@2x.png diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-20@3x.png b/{{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-20@3x.png similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-20@3x.png rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-20@3x.png diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-29@2x.png b/{{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-29@2x.png similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-29@2x.png rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-29@2x.png diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-29@3x.png b/{{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-29@3x.png similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-29@3x.png rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-29@3x.png diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-40@2x.png b/{{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-40@2x.png similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-40@2x.png rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-40@2x.png diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-40@3x.png b/{{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-40@3x.png similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-40@3x.png rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-40@3x.png diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-60@2x.png b/{{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-60@2x.png similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-60@2x.png rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-60@2x.png diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-60@3x.png b/{{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-60@3x.png similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon.appiconset/icon-ios-60@3x.png rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/AppIcon.appiconset/icon-ios-60@3x.png diff --git a/{{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/Contents.json b/{{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/Contents.json new file mode 100644 index 0000000..121dee6 --- /dev/null +++ b/{{cookiecutter.projectDirectory}}/Targets/iOS/Resources/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info": { + "version": 1, + "author": "xcode" + } +} \ No newline at end of file diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/AppDelegate.swift b/{{cookiecutter.projectDirectory}}/Targets/iOS/Sources/AppDelegate.swift similarity index 91% rename from {{cookiecutter.projectDirectory}}/iOSApplication/Sources/AppDelegate.swift rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Sources/AppDelegate.swift index 1f0b326..22d4b1d 100644 --- a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/AppDelegate.swift +++ b/{{cookiecutter.projectDirectory}}/Targets/iOS/Sources/AppDelegate.swift @@ -7,6 +7,8 @@ // import UIKit +import {{cookiecutter.projectName}}Kit +import LoggingKit @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { @@ -16,6 +18,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. + // Register log providers for the logging system + LogService.register(logProviders: OSLogProvider()) + + // Verify that target dependency is correctly resolved + {{cookiecutter.projectName}}Kit.hello() return true } diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Helpers/Configuration/Configuration.swift b/{{cookiecutter.projectDirectory}}/Targets/iOS/Sources/Helpers/Configuration.swift similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/Sources/Helpers/Configuration/Configuration.swift rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Sources/Helpers/Configuration.swift diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/SceneDelegate.swift b/{{cookiecutter.projectDirectory}}/Targets/iOS/Sources/SceneDelegate.swift similarity index 82% rename from {{cookiecutter.projectDirectory}}/iOSApplication/Sources/SceneDelegate.swift rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Sources/SceneDelegate.swift index dd8046f..bfe0f1f 100644 --- a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/SceneDelegate.swift +++ b/{{cookiecutter.projectDirectory}}/Targets/iOS/Sources/SceneDelegate.swift @@ -15,10 +15,10 @@ 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`. + // 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 } + guard let windowScene = (scene as? UIWindowScene) else { return } // INFO: If you want to use SwiftUI remove the line above and comment in the following lines // // Create the SwiftUI view that provides the window contents. @@ -31,6 +31,15 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { // self.window = window // window.makeKeyAndVisible() // } + + //INFO: This is one way of initializing the when using UIKit + + let window = UIWindow(frame: windowScene.coordinateSpace.bounds) + self.window = window + window.windowScene = windowScene + let navigationController = UINavigationController(rootViewController: ViewController()) + window.rootViewController = navigationController + window.makeKeyAndVisible() } func sceneDidDisconnect(_ scene: UIScene) { diff --git a/{{cookiecutter.projectDirectory}}/Targets/iOS/Sources/ViewController.swift b/{{cookiecutter.projectDirectory}}/Targets/iOS/Sources/ViewController.swift new file mode 100644 index 0000000..b04d867 --- /dev/null +++ b/{{cookiecutter.projectDirectory}}/Targets/iOS/Sources/ViewController.swift @@ -0,0 +1,37 @@ +// +// ViewController.swift +// {{cookiecutter.projectName}} +// +// Created by Automated on {% now 'utc', '%d/%m/%Y' %}. +// Copyright © {% now 'utc', '%Y' %} {{cookiecutter.companyName}}. All rights reserved. +// + +import UIKit +import LoggingKit + +class ViewController: UIViewController { + + + private lazy var label: UILabel = { + let label = UILabel() + label.translatesAutoresizingMaskIntoConstraints = false + label.text = "Hello {{cookiecutter.projectName}}" + return label + + }() + + override func viewDidLoad() { + super.viewDidLoad() + view.backgroundColor = .systemBackground + view.addSubview(label) + + NSLayoutConstraint.activate([ + label.centerYAnchor.constraint(equalTo: view.centerYAnchor), + label.centerXAnchor.constraint(equalTo: view.centerXAnchor) + ]) + + // Do any additional setup after loading the view. + LogService.shared.info("Welcome to your iOS starter project!", logCategory: \.default) + LogService.shared.info("Current Server environment is \(try? Configuration.value(for: "_ServerEnvironment") as String)", logCategory: \.default) + } +} diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/SupportingFiles/Config/Configuration.xcconfig b/{{cookiecutter.projectDirectory}}/Targets/iOS/SupportingFiles/Config/Configuration.xcconfig similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/SupportingFiles/Config/Configuration.xcconfig rename to {{cookiecutter.projectDirectory}}/Targets/iOS/SupportingFiles/Config/Configuration.xcconfig diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/SupportingFiles/Config/Development.xcconfig b/{{cookiecutter.projectDirectory}}/Targets/iOS/SupportingFiles/Config/Development.xcconfig similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/SupportingFiles/Config/Development.xcconfig rename to {{cookiecutter.projectDirectory}}/Targets/iOS/SupportingFiles/Config/Development.xcconfig diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/SupportingFiles/Config/Production.xcconfig b/{{cookiecutter.projectDirectory}}/Targets/iOS/SupportingFiles/Config/Production.xcconfig similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/SupportingFiles/Config/Production.xcconfig rename to {{cookiecutter.projectDirectory}}/Targets/iOS/SupportingFiles/Config/Production.xcconfig diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/SupportingFiles/Config/Staging.xcconfig b/{{cookiecutter.projectDirectory}}/Targets/iOS/SupportingFiles/Config/Staging.xcconfig similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/SupportingFiles/Config/Staging.xcconfig rename to {{cookiecutter.projectDirectory}}/Targets/iOS/SupportingFiles/Config/Staging.xcconfig diff --git a/{{cookiecutter.projectDirectory}}/iOSApplicationTests/Info.plist b/{{cookiecutter.projectDirectory}}/Targets/iOS/Tests/UITests/SupportingFiles/Info.plist similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplicationTests/Info.plist rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Tests/UITests/SupportingFiles/Info.plist diff --git a/{{cookiecutter.projectDirectory}}/iOSApplicationUITests/{{cookiecutter.projectName}}UITests.swift b/{{cookiecutter.projectDirectory}}/Targets/iOS/Tests/UITests/{{cookiecutter.projectName|replace(' ', '_')}}UITests.swift similarity index 89% rename from {{cookiecutter.projectDirectory}}/iOSApplicationUITests/{{cookiecutter.projectName}}UITests.swift rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Tests/UITests/{{cookiecutter.projectName|replace(' ', '_')}}UITests.swift index 1a8e5d8..972e12f 100644 --- a/{{cookiecutter.projectDirectory}}/iOSApplicationUITests/{{cookiecutter.projectName}}UITests.swift +++ b/{{cookiecutter.projectDirectory}}/Targets/iOS/Tests/UITests/{{cookiecutter.projectName|replace(' ', '_')}}UITests.swift @@ -1,5 +1,5 @@ // -// {{cookiecutter.projectName}}UITests.swift +// {{cookiecutter.projectName|replace(' ', '_')}}UITests.swift // {{cookiecutter.projectName}}UITests // // Created by Automated on {% now 'utc', '%d/%m/%Y' %}. @@ -8,7 +8,7 @@ import XCTest -class {{cookiecutter.projectName}}UITests: XCTestCase { +class {{cookiecutter.projectName|replace(' ', '_')}}UITests: XCTestCase { override func setUp() { super.setUp() diff --git a/{{cookiecutter.projectDirectory}}/iOSApplicationUITests/Info.plist b/{{cookiecutter.projectDirectory}}/Targets/iOS/Tests/UnitTests/SupportingFiles/Info.plist similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplicationUITests/Info.plist rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Tests/UnitTests/SupportingFiles/Info.plist diff --git a/{{cookiecutter.projectDirectory}}/iOSApplicationTests/{{cookiecutter.projectName}}Tests.swift b/{{cookiecutter.projectDirectory}}/Targets/iOS/Tests/UnitTests/{{cookiecutter.projectName|replace(' ', '_')}}Tests.swift similarity index 87% rename from {{cookiecutter.projectDirectory}}/iOSApplicationTests/{{cookiecutter.projectName}}Tests.swift rename to {{cookiecutter.projectDirectory}}/Targets/iOS/Tests/UnitTests/{{cookiecutter.projectName|replace(' ', '_')}}Tests.swift index 13804c0..8979283 100644 --- a/{{cookiecutter.projectDirectory}}/iOSApplicationTests/{{cookiecutter.projectName}}Tests.swift +++ b/{{cookiecutter.projectDirectory}}/Targets/iOS/Tests/UnitTests/{{cookiecutter.projectName|replace(' ', '_')}}Tests.swift @@ -7,9 +7,9 @@ // import XCTest -@testable import iOSApplication +@testable import {{cookiecutter.projectName|replace(' ', '_')}} -class {{cookiecutter.projectName}}Tests: XCTestCase { +class {{cookiecutter.projectName|replace(' ', '_')}}Tests: XCTestCase { override func setUp() { // Put setup code here. This method is called before the invocation of each test method in the class. diff --git a/{{cookiecutter.projectDirectory}}/{{cookiecutter.projectName}}Kit/{{cookiecutter.projectName}}Kit.h b/{{cookiecutter.projectDirectory}}/Targets/{{cookiecutter.projectName}}Kit/Sources/{{cookiecutter.projectName}}Kit.h similarity index 100% rename from {{cookiecutter.projectDirectory}}/{{cookiecutter.projectName}}Kit/{{cookiecutter.projectName}}Kit.h rename to {{cookiecutter.projectDirectory}}/Targets/{{cookiecutter.projectName}}Kit/Sources/{{cookiecutter.projectName}}Kit.h diff --git a/{{cookiecutter.projectDirectory}}/Targets/{{cookiecutter.projectName}}Kit/Sources/{{cookiecutter.projectName}}Kit.swift b/{{cookiecutter.projectDirectory}}/Targets/{{cookiecutter.projectName}}Kit/Sources/{{cookiecutter.projectName}}Kit.swift new file mode 100644 index 0000000..2ef8224 --- /dev/null +++ b/{{cookiecutter.projectDirectory}}/Targets/{{cookiecutter.projectName}}Kit/Sources/{{cookiecutter.projectName}}Kit.swift @@ -0,0 +1,16 @@ +// +// {{cookiecutter.projectName}}Kit.swift +// {{cookiecutter.projectName}}Kit +// +// Created by Automated on {% now 'utc', '%d/%m/%Y' %}. +// Copyright © {% now 'utc', '%Y' %} {{cookiecutter.companyName}}. All rights reserved. +// + +import Foundation +import LoggingKit + +public struct {{cookiecutter.projectName}}Kit { + public static func hello() { + LogService.shared.info("Hello from {{cookiecutter.projectName}}Kit", logCategory: \.default) + } +} \ No newline at end of file diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Extensions/.gitkeep b/{{cookiecutter.projectDirectory}}/Targets/{{cookiecutter.projectName}}Kit/SupportingFiles/.gitkeep similarity index 100% rename from {{cookiecutter.projectDirectory}}/iOSApplication/Sources/Extensions/.gitkeep rename to {{cookiecutter.projectDirectory}}/Targets/{{cookiecutter.projectName}}Kit/SupportingFiles/.gitkeep diff --git a/{{cookiecutter.projectDirectory}}/{{cookiecutter.projectName}}KitTests/Info.plist b/{{cookiecutter.projectDirectory}}/Targets/{{cookiecutter.projectName}}Kit/Tests/SupportingFiles/Info.plist similarity index 100% rename from {{cookiecutter.projectDirectory}}/{{cookiecutter.projectName}}KitTests/Info.plist rename to {{cookiecutter.projectDirectory}}/Targets/{{cookiecutter.projectName}}Kit/Tests/SupportingFiles/Info.plist diff --git a/{{cookiecutter.projectDirectory}}/{{cookiecutter.projectName}}KitTests/{{cookiecutter.projectName}}KitTests.swift b/{{cookiecutter.projectDirectory}}/Targets/{{cookiecutter.projectName}}Kit/Tests/{{cookiecutter.projectName}}KitTests.swift similarity index 100% rename from {{cookiecutter.projectDirectory}}/{{cookiecutter.projectName}}KitTests/{{cookiecutter.projectName}}KitTests.swift rename to {{cookiecutter.projectDirectory}}/Targets/{{cookiecutter.projectName}}Kit/Tests/{{cookiecutter.projectName}}KitTests.swift diff --git a/{{cookiecutter.projectDirectory}}/Tuist/Config.swift b/{{cookiecutter.projectDirectory}}/Tuist/Config.swift new file mode 100644 index 0000000..f3d5c92 --- /dev/null +++ b/{{cookiecutter.projectDirectory}}/Tuist/Config.swift @@ -0,0 +1,8 @@ +import ProjectDescription + +let config = Config( + compatibleXcodeVersions: .list(["12.0", "12.0.1", "12.1", "12.2"]), + generationOptions: [ + .disableAutogeneratedSchemes + ] +) diff --git a/{{cookiecutter.projectDirectory}}/Tuist/ProjectDescriptionHelpers/Project+Templates.swift b/{{cookiecutter.projectDirectory}}/Tuist/ProjectDescriptionHelpers/Project+Templates.swift new file mode 100644 index 0000000..2d5e9dc --- /dev/null +++ b/{{cookiecutter.projectDirectory}}/Tuist/ProjectDescriptionHelpers/Project+Templates.swift @@ -0,0 +1,75 @@ +import ProjectDescription + +/// Project helpers are functions that simplify the way you define your project. +/// Share code to create targets, settings, dependencies, +/// Create your own conventions, e.g: a func that makes sure all shared targets are "static frameworks" +/// See https://tuist.io/docs/usage/helpers/ + +extension Project { + /// Helper function to create the Project for this ExampleApp + public static func app(name: String, platform: Platform, additionalTargets: [String]) -> Project { + var targets = makeAppTargets(name: name, + platform: platform, + dependencies: additionalTargets.map { TargetDependency.target(name: $0) }) + targets += additionalTargets.flatMap({ makeFrameworkTargets(name: $0, platform: platform) }) + return Project(name: name, + organizationName: "tuist.io", + targets: targets) + } + + // MARK: - Private + + /// Helper function to create a framework target and an associated unit test target + private static func makeFrameworkTargets(name: String, platform: Platform) -> [Target] { + let sources = Target(name: name, + platform: platform, + product: .framework, + bundleId: "io.tuist.\(name)", + infoPlist: .default, + sources: ["Targets/\(name)/Sources/**"], + resources: [], + dependencies: []) + let tests = Target(name: "\(name)Tests", + platform: platform, + product: .unitTests, + bundleId: "io.tuist.\(name)Tests", + infoPlist: .default, + sources: ["Targets/\(name)/Tests/**"], + resources: [], + dependencies: [.target(name: name)]) + return [sources, tests] + } + + /// Helper function to create the application target and the unit test target. + private static func makeAppTargets(name: String, platform: Platform, dependencies: [TargetDependency]) -> [Target] { + let platform: Platform = platform + let infoPlist: [String: InfoPlist.Value] = [ + "CFBundleShortVersionString": "1.0", + "CFBundleVersion": "1", + "UIMainStoryboardFile": "" + ] + + let mainTarget = Target( + name: name, + platform: platform, + product: .app, + bundleId: "io.tuist.\(name)", + infoPlist: .extendingDefault(with: infoPlist), + sources: ["Targets/\(name)/Sources/**"], + resources: [], + dependencies: dependencies + ) + + let testTarget = Target( + name: "\(name)Tests", + platform: platform, + product: .unitTests, + bundleId: "io.tuist.\(name)Tests", + infoPlist: .default, + sources: ["Targets/\(name)/Tests/**"], + dependencies: [ + .target(name: "\(name)") + ]) + return [mainTarget, testTarget] + } +} diff --git a/{{cookiecutter.projectDirectory}}/fastlane/Fastfile b/{{cookiecutter.projectDirectory}}/fastlane/Fastfile index ff8445c..010da7e 100644 --- a/{{cookiecutter.projectDirectory}}/fastlane/Fastfile +++ b/{{cookiecutter.projectDirectory}}/fastlane/Fastfile @@ -3,22 +3,24 @@ lane :tests do desc "Build and test application" run_tests(project: "{{cookiecutter.projectName}}.xcodeproj", - devices: ["iPhone 11"], - scheme: "iOSApplicationTests") + devices: ["iPhone 12 mini"], + scheme: "{{cookiecutter.projectName}} (iOS) Development", + only_testing: ["Tests iOS"] + + ) run_tests(project: "{{cookiecutter.projectName}}.xcodeproj", - devices: ["iPhone 11"], - scheme: "{{cookiecutter.projectName}}KitTests") + devices: ["iPhone 12 mini"], + scheme: "{{cookiecutter.projectName}}Kit" + ) end # Beta deployment to testflight lane :beta do desc "Build, test and upload a new build to TestFlight" - rescue => exception - on_error(exception) - end - -end +rescue => exception + on_error(exception) +end # Release deployment to App Store lane :release do diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/Contents.json b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/Contents.json deleted file mode 100644 index 2d71f8d..0000000 --- a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/Contents.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "dev-icon-ios-20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "dev-icon-ios-20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "dev-icon-ios-29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "dev-icon-ios-29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "dev-icon-ios-40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "dev-icon-ios-40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "dev-icon-ios-60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "dev-icon-ios-60@3x.png", - "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/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-20@2x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-20@2x.png deleted file mode 100644 index 9a3a43c..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-20@2x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-20@3x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-20@3x.png deleted file mode 100644 index 5ae19f4..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-20@3x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-29@2x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-29@2x.png deleted file mode 100644 index 97ccba5..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-29@2x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-29@3x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-29@3x.png deleted file mode 100644 index fe6fcf2..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-29@3x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-40@2x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-40@2x.png deleted file mode 100644 index a0f007f..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-40@2x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-40@3x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-40@3x.png deleted file mode 100644 index aefbe1a..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-40@3x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-60@2x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-60@2x.png deleted file mode 100644 index aefbe1a..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-60@2x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-60@3x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-60@3x.png deleted file mode 100644 index c77da7c..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-dev.appiconset/dev-icon-ios-60@3x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/Contents.json b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/Contents.json deleted file mode 100644 index 9326fa7..0000000 --- a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/Contents.json +++ /dev/null @@ -1,106 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "staging-icon-ios-20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "staging-icon-ios-20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "staging-icon-ios-29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "staging-icon-ios-29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "staging-icon-ios-40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "staging-icon-ios-40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "staging-icon-ios-60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "staging-icon-ios-60@3x.png", - "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/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-20@2x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-20@2x.png deleted file mode 100644 index 363ad47..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-20@2x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-20@3x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-20@3x.png deleted file mode 100644 index 796eb00..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-20@3x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-29@2x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-29@2x.png deleted file mode 100644 index 2f02597..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-29@2x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-29@3x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-29@3x.png deleted file mode 100644 index 376f364..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-29@3x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-40@2x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-40@2x.png deleted file mode 100644 index 4946439..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-40@2x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-40@3x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-40@3x.png deleted file mode 100644 index 213e8a8..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-40@3x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-60@2x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-60@2x.png deleted file mode 100644 index 213e8a8..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-60@2x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-60@3x.png b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-60@3x.png deleted file mode 100644 index b8068e6..0000000 Binary files a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/AppIcon-staging.appiconset/staging-icon-ios-60@3x.png and /dev/null differ diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/Contents.json b/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/Contents.json deleted file mode 100644 index da4a164..0000000 --- a/{{cookiecutter.projectDirectory}}/iOSApplication/Assets/Assets.xcassets/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Base.lproj/Main.storyboard b/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Base.lproj/Main.storyboard deleted file mode 100644 index 68520e8..0000000 --- a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Base.lproj/Main.storyboard +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Generated/.gitkeep b/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Generated/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Helpers/Appearance/Appearance.swift b/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Helpers/Appearance/Appearance.swift deleted file mode 100644 index af33d23..0000000 --- a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Helpers/Appearance/Appearance.swift +++ /dev/null @@ -1,37 +0,0 @@ -// -// Appearence.swift -// {{cookiecutter.projectName}} -// -// Created by Automated on {% now 'utc', '%d/%m/%Y' %}. -// Copyright © {% now 'utc', '%Y' %} {{cookiecutter.companyName}}. All rights reserved. -// - -import Foundation -import UIKit - -struct Appearence { - - struct Fonts { - -/// Custom dynamic adjustable font -/// static let customFont: UIFont = { -/// let font = UIFont(name: "", size: 17) -/// let fontMetrics = UIFontMetrics(forTextStyle: .body) -/// return fontMetrics.scaledFont(for: font!) -/// }() - - static let title = UIFont.preferredFont(forTextStyle: .title1) - static let heading = UIFont.preferredFont(forTextStyle: .headline) - static let subheading = UIFont.preferredFont(forTextStyle: .subheadline) - static let body = UIFont.preferredFont(forTextStyle: .body) - static let small = UIFont.preferredFont(forTextStyle: .title2) - } - - struct Colors { - static let title = UIColor.blue - static let heading = UIColor.black - static let background = UIColor.white - } - - struct Icons { } -} diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Helpers/Localization/Localization.swift b/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Helpers/Localization/Localization.swift deleted file mode 100644 index 513a389..0000000 --- a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Helpers/Localization/Localization.swift +++ /dev/null @@ -1,20 +0,0 @@ -// -// Localization.swift -// {{cookiecutter.projectName}} -// -// Created by Automated on {% now 'utc', '%d/%m/%Y' %}. -// Copyright © {% now 'utc', '%Y' %} {{cookiecutter.companyName}}. All rights reserved. -// - -import Foundation -import UIKit - -extension String { - var localized: String { - let loca = NSLocalizedString(self, comment: "") - if loca.isEmpty || loca == self { - return self - } - return loca - } -} \ No newline at end of file diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Helpers/UserDefaults/UserDefaults.swift b/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Helpers/UserDefaults/UserDefaults.swift deleted file mode 100644 index 64086c8..0000000 --- a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Helpers/UserDefaults/UserDefaults.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// UserDefaults.swift -// {{cookiecutter.projectName}} -// -// Created by Automated on {% now 'utc', '%d/%m/%Y' %}. -// Copyright © {% now 'utc', '%Y' %} {{cookiecutter.companyName}}. All rights reserved. -// - -import Foundation - -public let Defaults = UserDefaults.standard - -extension UserDefaults { - struct Key { - var name: String - } - - subscript(key: Key) -> T? { - get { - return value(forKey: key.name) as? T - } - set { - setValue(newValue, forKey: key.name) - } - } - - subscript( - key: Key, - default defaultProvider: @autoclosure () -> T - ) -> T { - get { - return value(forKey: key.name) as? T - ?? defaultProvider() - } - set { - setValue(newValue, forKey: key.name) - } - } -} - -// Usage: -// Extend UserDefaults.Key with your desired keys and then use them -// extension UserDefaults.Key { -// static var bookmarks: UserDefaults.Key<[String]> { -// return .init(name: "bookmarks") -// } - -// static var notificationSnoozed: UserDefaults.Key { -// return .init(name: "notificationSnoozed") -// } -// } - -// class SettingsViewModel { -// private let userDefaults: UserDefaults - -// init(userDefaults: UserDefaults = .standard) { -// self.userDefaults = userDefaults -// } - -// func snoozeNotifications() { -// userDefaults[.bookmarks, default: []].append("name") -// let snoozed = userDefaults[.notificationSnoozed, default: true] -// } -// } - -@propertyWrapper -struct UserDefault { - let key: String - let wrappedValue: T - - var value: T { - get { - return UserDefaults.standard.object(forKey: key) as? T ?? wrappedValue - } - set { - UserDefaults.standard.set(newValue, forKey: key) - } - } - - init(_ key: String, defaultValue: T) { - self.key = key - self.wrappedValue = defaultValue - } -} diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Protocols/.gitkeep b/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Protocols/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/ViewController.swift b/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/ViewController.swift deleted file mode 100644 index c251ea1..0000000 --- a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/ViewController.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// ViewController.swift -// {{cookiecutter.projectName}} -// -// Created by Automated on {% now 'utc', '%d/%m/%Y' %}. -// Copyright © {% now 'utc', '%Y' %} {{cookiecutter.companyName}}. All rights reserved. -// - -import UIKit -import {{cookiecutter.projectName}}Kit -import LoggingKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view. - logger.info("Welcome to your iOS starter project!", logCategory: \.default) - logger.info("Current Server environment is \(try? Configuration.value(for: "_ServerEnvironment") as String)", logCategory: \.default) - } -} diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Views/.gitkeep b/{{cookiecutter.projectDirectory}}/iOSApplication/Sources/Views/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/{{cookiecutter.projectDirectory}}/iOSApplication/SupportingFiles/Base.lproj/LaunchScreen.storyboard b/{{cookiecutter.projectDirectory}}/iOSApplication/SupportingFiles/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index bfa3612..0000000 --- a/{{cookiecutter.projectDirectory}}/iOSApplication/SupportingFiles/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/{{cookiecutter.projectDirectory}}/project.yml b/{{cookiecutter.projectDirectory}}/project.yml deleted file mode 100644 index bc64728..0000000 --- a/{{cookiecutter.projectDirectory}}/project.yml +++ /dev/null @@ -1,179 +0,0 @@ -name: {{cookiecutter.projectName}} -options: - xcodeVersion: 11.0 -configs: - Debug: debug - Release: release -settings: - base: - DEVELOPMENT_TEAM: {{cookiecutter.teamId}} - SWIFT_VERSION: "5.1" - configs: - Debug: - SWIFT_COMPILATION_MODE: "incremental" - Release: - SWIFT_COMPILATION_MODE: "wholemodule" -attributes: - ORGANIZATIONNAME: {{cookiecutter.teamName}} -packages: - Rswift: - url: https://github.com/mac-cain13/R.swift.Library - version: "5.2.0" - LoggingKit: - url: https://github.com/alexanderwe/LoggingKit - version: "1.0.0" -targets: - iOSApplication: - type: application - platform: iOS - deploymentTarget: "{{cookiecutter.deploymentTarget}}" - configFiles: - Debug: iOSApplication/SupportingFiles/Config/Configuration.xcconfig - Release: iOSApplication/SupportingFiles/Config/Configuration.xcconfig - settings: - base: - ASSETCATALOG_COMPILER_APPICON_NAME: AppIcon$(SERVER_ENVIRONMENT_SUFFIX) - info: - path: iOSApplication/SupportingFiles/Info.plist - properties: - CFBundleDisplayName: {{cookiecutter.projectName}}$(SERVER_ENVIRONMENT_SUFFIX) - UISupportedInterfaceOrientations: - - UIInterfaceOrientationPortrait - - UIInterfaceOrientationLandscapeLeft - - UIInterfaceOrientationLandscapeRight - UILaunchStoryboardName: LaunchScreen - UIMainStoryboardFile: Main - UIRequiredDeviceCapabilities: [armv7] - ITSAppUsesNonExemptEncryption: NO - LSRequiresIPhoneOS: YES - _Configuration: $(CONFIGURATION) - _ServerEnvironment: $(SERVER_ENVIRONMENT) - CFBundleVersion: "1" - CFBundleShortVersionString: "0.0.1" - UIApplicationSceneManifest: - UIApplicationSupportsMultipleScenes: NO - UISceneConfigurations: - UIWindowSceneSessionRoleApplication: - - UISceneConfigurationName: "Default Configuration" - UISceneDelegateClassName: "$(PRODUCT_MODULE_NAME).SceneDelegate" - UISceneStoryboardFile: "Main" - sources: - - iOSApplication/ - dependencies: - - target: {{cookiecutter.projectName}}Kit - - package: Rswift - preBuildScripts: - - script: | - if mint list | grep -q 'R.swift'; then - mint run R.swift rswift generate "$SRCROOT/iOSApplication/Sources/Generated/R.generated.swift" - else - echo "error: R.swift not installed; run 'mint bootstrap' to install" - return -1 - fi - name: R.Swift generate - inputFiles: - - $(TEMP_DIR)/rswift-lastrun - outputFiles: - - $(SRCROOT)/iOSApplication/Sources/Generated/R.generated.swift - postCompileScripts: - - script: | - mint run swiftlint - name: SwiftLint - {{cookiecutter.projectName}}Kit: - type: framework - platform: iOS - deploymentTarget: "{{cookiecutter.deploymentTarget}}" - settings: - PRODUCT_BUNDLE_IDENTIFIER: {{cookiecutter.bundleIdentifier}}Kit - info: - path: {{cookiecutter.projectName}}Kit/SupportingFiles/Info.plist - properties: - CFBundleVersion: $(CURRENT_PROJECT_VERSION) - sources: - - {{cookiecutter.projectName}}Kit - dependencies: - - package: LoggingKit - {{cookiecutter.projectName}}KitTests: - platform: iOS - type: bundle.unit-test - sources: - - {{cookiecutter.projectName}}KitTests/ - dependencies: - - target: {{cookiecutter.projectName}}Kit - scheme: - testTargets: - - {{cookiecutter.projectName}}KitTests - gatherCoverageData: true - iOSApplicationTests: - platform: iOS - type: bundle.unit-test - sources: - - iOSApplicationTests/ - dependencies: - - target: iOSApplication - - target: {{cookiecutter.projectName}}Kit - scheme: - testTargets: - - iOSApplicationTests - gatherCoverageData: true - iOSApplicationUITests: - platform: iOS - type: bundle.ui-testing - sources: - - iOSApplicationUITests/ - dependencies: - - target: iOSApplication - - target: {{cookiecutter.projectName}}Kit - scheme: - testTargets: - - iOSApplicationUITests - gatherCoverageData: true -schemes: - iOS Application development: - build: - preActions: - - script: | - cp -f "${PROJECT_DIR}/iOSApplication/SupportingFiles/Config/Development.xcconfig" "${PROJECT_DIR}/iOSApplication/SupportingFiles/Config/Configuration.xcconfig" - settingsTarget: iOSApplication - targets: - iOSApplication: all - run: - config: Debug - profile: - config: Release - analyze: - config: Release - archive: - config: Release - iOS Application staging: - build: - preActions: - - script: | - cp -f "${PROJECT_DIR}/iOSApplication/SupportingFiles/Config/Staging.xcconfig" "${PROJECT_DIR}/iOSApplication/SupportingFiles/Config/Configuration.xcconfig" - settingsTarget: iOSApplication - targets: - iOSApplication: all - run: - config: Debug - profile: - config: Release - analyze: - config: Release - archive: - config: Release - iOS Application production: - build: - preActions: - - script: | - cp -f "${PROJECT_DIR}/iOSApplication/SupportingFiles/Config/Production.xcconfig" "${PROJECT_DIR}/iOSApplication/SupportingFiles/Config/Configuration.xcconfig" - settingsTarget: iOSApplication - targets: - iOSApplication: all - run: - config: Debug - profile: - config: Release - analyze: - config: Release - archive: - config: Release \ No newline at end of file diff --git a/{{cookiecutter.projectDirectory}}/{{cookiecutter.projectName}}Kit/SupportingFiles/Info.plist b/{{cookiecutter.projectDirectory}}/{{cookiecutter.projectName}}Kit/SupportingFiles/Info.plist deleted file mode 100644 index cf22d10..0000000 --- a/{{cookiecutter.projectDirectory}}/{{cookiecutter.projectName}}Kit/SupportingFiles/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.0.1 - CFBundleVersion - 1 - NSPrincipalClass - - -