├── Brewfile ├── README.md ├── bin ├── bump └── lint ├── script ├── update ├── bootstrap ├── setup └── git-hooks │ └── pre-commit ├── Configuration ├── watchOS │ ├── watchOS-Common.xcconfig │ ├── watchOS-Application.xcconfig │ └── watchOS-Framework.xcconfig ├── iOS │ ├── iOS-Extension.xcconfig │ ├── iOS-Common.xcconfig │ ├── iOS-Framework.xcconfig │ ├── iOS-Application.xcconfig │ └── iOS-XCTest.xcconfig ├── tvOS │ ├── tvOS-Extension.xcconfig │ ├── tvOS-Common.xcconfig │ ├── tvOS-Framework.xcconfig │ └── tvOS-Application.xcconfig ├── macOS │ ├── macOS-Common.xcconfig │ ├── macOS-Framework.xcconfig │ └── macOS-Application.xcconfig ├── Configurations │ ├── Deployment.xcconfig │ ├── Profiling.xcconfig │ └── Development.xcconfig ├── Universal-XCTest.xcconfig ├── Universal-Framework.xcconfig └── Universal-Common.xcconfig ├── LICENSE ├── .swiftlint.yml └── .gitignore /Brewfile: -------------------------------------------------------------------------------- 1 | brew "swiftlint" 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Xcode-starter-pack 2 | 3 | My personal default xcconfig files and whatnot for a new project 4 | -------------------------------------------------------------------------------- /bin/bump: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Increment the build number without remembering the agvtool name. 4 | 5 | agvtool next-version -all 6 | -------------------------------------------------------------------------------- /script/update: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Update application to run for its current checkout. 4 | 5 | # The 'script' directory that this script is in. 6 | readonly SCRIPT_DIR=$( cd "$( dirname "$0" )" && pwd ) 7 | # The root directory of this resources repo (aka '.') 8 | readonly SOURCE_DIR=$( pwd ) 9 | 10 | "$SCRIPT_DIR/bootstrap" || exit 1 11 | 12 | echo "==> Dependencies now up-to-date." 13 | 14 | exit 0 15 | -------------------------------------------------------------------------------- /Configuration/watchOS/watchOS-Common.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines common settings that should be enabled for every new 3 | // watchOS related project or target. 4 | // 5 | 6 | #include "../Universal-Common.xcconfig" 7 | 8 | // Where to find embedded frameworks 9 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @executable_path/../../Frameworks 10 | 11 | // Use the watchOS SDK. 12 | SDKROOT = watchos 13 | -------------------------------------------------------------------------------- /Configuration/iOS/iOS-Extension.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This are configuration options specific to all internal iOS extensions. 3 | // This file should not be considered standalone. It should instead be imported 4 | // into your target specific xcconfig. 5 | // 6 | 7 | // Import iOS Common Configuration 8 | #include "iOS-Common.xcconfig" 9 | 10 | // Don't even think about calling UIApplication! 11 | APPLICATION_EXTENSION_API_ONLY = YES 12 | -------------------------------------------------------------------------------- /Configuration/tvOS/tvOS-Extension.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This are configuration options specific to all internal tvOS extensions. 3 | // This file should not be considered standalone. It should instead be imported 4 | // into your target specific xcconfig. 5 | // 6 | 7 | // Import Common Configuration 8 | #include "../tvOS-Common.xcconfig" 9 | 10 | // Don't even think about calling UIApplication! 11 | APPLICATION_EXTENSION_API_ONLY = YES 12 | -------------------------------------------------------------------------------- /Configuration/iOS/iOS-Common.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines common settings that should be enabled for every new 3 | // iOS related project or target. 4 | // 5 | 6 | #include "../Universal-Common.xcconfig" 7 | 8 | // The SDK we are using. 9 | SDKROOT = iphoneos 10 | 11 | // Target iOS specific devices. 12 | TARGETED_DEVICE_FAMILY = 1,2 13 | 14 | // Where to find embedded frameworks 15 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks -------------------------------------------------------------------------------- /Configuration/tvOS/tvOS-Common.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines common settings that should be enabled for every new 3 | // tvOS related project or target. 4 | // 5 | 6 | #include "../Universal-Common.xcconfig" 7 | 8 | // tvOS product only. 9 | SDKROOT = appletvos 10 | 11 | // Target tvOS specific devices. 12 | TARGETED_DEVICE_FAMILY = 3 13 | 14 | // Where to find embedded frameworks 15 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks -------------------------------------------------------------------------------- /Configuration/tvOS/tvOS-Framework.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines common settings that should be enabled for every new 3 | // tvOS-related framework. 4 | // 5 | 6 | // Import tvOS Common Configuration 7 | #include "tvOS-Common.xcconfig" 8 | 9 | // Ensure we are setting framework values where appropriate. 10 | #include "../Universal-Framework.xcconfig" 11 | 12 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks 13 | -------------------------------------------------------------------------------- /Configuration/macOS/macOS-Common.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines common settings that should be enabled for every new 3 | // macOS related project or target. 4 | // 5 | 6 | #include "../Universal-Common.xcconfig" 7 | 8 | // Where to find embedded frameworks 9 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks 10 | 11 | // The macosx SDK. 12 | SDKROOT = macosx 13 | 14 | // Supported build architectures 15 | VALID_ARCHS = x86_64 arm64 arm64e 16 | -------------------------------------------------------------------------------- /Configuration/iOS/iOS-Framework.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines common settings that should be enabled for every new 3 | // iOS-related framework. 4 | // 5 | 6 | // Import iOS Common Configuration 7 | #include "iOS-Common.xcconfig" 8 | 9 | // Ensure we are setting framework values where appropriate. 10 | #include "../Universal-Framework.xcconfig" 11 | 12 | // Where to find embedded frameworks 13 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks 14 | -------------------------------------------------------------------------------- /Configuration/tvOS/tvOS-Application.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This are configuration options specific to all internal tvOS applications. 3 | // This file should not be considered standalone. It should instead be imported 4 | // into your target specific xcconfig. 5 | // 6 | 7 | // Import Common Configuration 8 | #include "../tvOS-Common.xcconfig" 9 | 10 | // It's a Swift app. 11 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 12 | 13 | // Apps ain't extensions. 14 | APPLICATION_EXTENSION_API_ONLY = NO 15 | -------------------------------------------------------------------------------- /Configuration/watchOS/watchOS-Application.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This are configuration options specific to all internal watchOS applications. 3 | // This file should not be considered standalone. It should instead be imported 4 | // into your target specific xcconfig. 5 | // 6 | 7 | // Import Common Configuration 8 | #include "../watchOS-Common.xcconfig" 9 | 10 | // It's a Swift app. 11 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 12 | 13 | // And Automatic Code Signing. 14 | CODE_SIGN_STYLE = Automatic 15 | -------------------------------------------------------------------------------- /Configuration/macOS/macOS-Framework.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines common settings that should be enabled for every new 3 | // macOS-related framework. 4 | // 5 | 6 | // Import tvOS Common Configuration 7 | #include "macOS-Common.xcconfig" 8 | 9 | // Ensure we are setting framework values where appropriate. 10 | #include "../Universal-Framework.xcconfig" 11 | 12 | // Where to find embedded frameworks 13 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/Frameworks 14 | -------------------------------------------------------------------------------- /Configuration/watchOS/watchOS-Framework.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines common settings that should be enabled for every new 3 | // watchOS-related framework. 4 | // 5 | 6 | // Import tvOS Common Configuration 7 | #include "watchOS-Common.xcconfig" 8 | 9 | // Ensure we are setting framework values where appropriate. 10 | #include "../Universal-Framework.xcconfig" 11 | 12 | // Where to find embedded frameworks 13 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks 14 | -------------------------------------------------------------------------------- /Configuration/macOS/macOS-Application.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This are configuration options specific to all internal macOS applications. 3 | // This file should not be considered standalone. It should instead be imported 4 | // into your target specific xcconfig. 5 | // 6 | 7 | // Import macOS Common Configuration 8 | #include "macOS-Common.xcconfig" 9 | 10 | // It's a Swift app. 11 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 12 | 13 | // Default to automatic signing with a developer cert. 14 | CODE_SIGN_IDENTITY = Mac Developer 15 | 16 | // And Automatic Code Signing. 17 | CODE_SIGN_STYLE = Automatic 18 | -------------------------------------------------------------------------------- /bin/lint: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Lint any changed files using swiftlint. 4 | # 5 | # This works both independently and as a run phase script. 6 | 7 | # Path to installed version of Swift lint. 8 | readonly SWIFT_LINT_PATH=$(which swiftlint) 9 | 10 | if [ -z "$SWIFT_LINT_PATH" ]; then 11 | echo "warning: SwiftLint not installed. Run 'brew bundle' to ensure its installation." 12 | exit 0 13 | fi 14 | 15 | _lint() { 16 | local filename="${1}" 17 | if [[ "${filename##*.}" == "swift" ]]; then 18 | ${SWIFT_LINT_PATH} lint --path "${filename}" 19 | fi 20 | } 21 | 22 | git diff --cached --name-only | while read filename; do _lint "${filename}"; done 23 | exit 0 24 | -------------------------------------------------------------------------------- /Configuration/iOS/iOS-Application.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This are configuration options specific to all internal iOS applications. 3 | // This file should not be considered standalone. It should instead be imported 4 | // into your target specific xcconfig. 5 | // 6 | 7 | // Import iOS Common Configuration 8 | #include "iOS-Common.xcconfig" 9 | 10 | // Apps ain't extensions. 11 | APPLICATION_EXTENSION_API_ONLY = NO 12 | 13 | // It's a Swift app. 14 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 15 | 16 | // Default to automatic signing with a developer cert. 17 | CODE_SIGN_IDENTITY = iPhone Developer 18 | 19 | // And Automatic Code Signing. 20 | CODE_SIGN_STYLE = Automatic 21 | -------------------------------------------------------------------------------- /script/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Resolve all dependencies that the application requires to run. 4 | 5 | # The root directory of this resources repo (aka '.') 6 | readonly SOURCE_DIR=$( pwd ) 7 | 8 | # Ensure we have Homewbrew installed. 9 | if ! [ -x "$(command -v brew)" ]; then 10 | echo "Homebrew needs to be installed to install Carthage, and other things we depend on." 11 | exit 0 12 | fi 13 | 14 | # Install Homebrew Dependencies such as Carthage. 15 | readonly brew_path=$(echo `which brew`) 16 | echo "==> Updating Homebrew dependencies..." 17 | $($brew_path bundle check)&> /dev/null 18 | if ! [[ $? -eq 0 ]]; then 19 | $brew_path bundle || exit 1 20 | fi 21 | -------------------------------------------------------------------------------- /script/setup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # script/setup: Set up application for the first time after cloning 4 | 5 | # The 'script' directory that this script is in. 6 | readonly SCRIPT_DIR=$( cd "$( dirname "$0" )" && pwd ) 7 | # The root directory of this resources repo (aka '.') 8 | readonly SOURCE_DIR=$( pwd ) 9 | # The `.git` directory. 10 | readonly GIT_DIR=$SOURCE_DIR/.git 11 | 12 | echo "==> Installing pre-commit hook." 13 | rm -f $GIT_DIR/hooks/pre-commit 14 | ln -s $SCRIPT_DIR/git-hooks/pre-commit $GIT_DIR/hooks/pre-commit 15 | 16 | chmod +x $GIT_DIR/hooks/* 17 | 18 | # Boostrap our dependencies. 19 | "$SCRIPT_DIR/bootstrap" || exit 1 20 | 21 | echo "==> Ready to go!" 22 | 23 | exit 0 24 | -------------------------------------------------------------------------------- /script/git-hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | # 3 | # Run Swiftlint's autocorrect before committing code. 4 | # 5 | # Note: Your code will still commit and the autocorrect changes will be set in your working 6 | # directory. You can either amend your previous commit or make a new one after. 7 | 8 | SWIFT_LINT=/usr/local/bin/swiftlint 9 | if [[ -e "${SWIFT_LINT}" ]]; then 10 | git diff --cached --name-only --diff-filter=d | grep .swift | while read filename; do 11 | ${SWIFT_LINT} --fix --path "$filename" 12 | done 13 | else 14 | echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint" 15 | echo "If you have Homebrew, you can directly use `brew install swiftlint` to install SwiftLint" 16 | exit 1 17 | fi 18 | -------------------------------------------------------------------------------- /Configuration/Configurations/Deployment.xcconfig: -------------------------------------------------------------------------------- 1 | // This the base configuration for any Deployment configuration. 2 | 3 | // Whether to perform App Store validation checks 4 | VALIDATE_PRODUCT = YES 5 | 6 | // Whether to only build the active architecture 7 | ONLY_ACTIVE_ARCH = NO 8 | 9 | // Whether to strip debugging symbols when copying the built product to its 10 | // final installation location 11 | STRIP_INSTALLED_PRODUCT = YES 12 | 13 | // The optimization level for the produced Swift binary. Optimized presently for speed. 14 | // See Universal-Common.xcconfig for other options. 15 | SWIFT_OPTIMIZATION_LEVEL = -O 16 | 17 | // Enable compile time checks using #if JWW_DEPLOYMENT_BUILD 18 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) JWW_DEPLOYMENT_BUILD 19 | -------------------------------------------------------------------------------- /Configuration/iOS/iOS-XCTest.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This are configuration options specific to all internal iOS test bundles. 3 | // This file should not be considered standalone. It should instead be imported 4 | // into your target specific xcconfig. 5 | // 6 | 7 | // Import iOS Common Configuration 8 | #include "iOS-Common.xcconfig" 9 | 10 | // Ensure we are setting framework values where appropriate. 11 | #include "../Universal-XCTest.xcconfig" 12 | 13 | // This is basically a default setting that shouldn't be overridden. 14 | INSTALL_PATH = $(LOCAL_LIBRARY_DIR)/Frameworks 15 | 16 | // Path where the compiler should search for our prebuilt frameworks. 17 | FRAMEWORK_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR) 18 | 19 | // Auto Link any frameworks we use by default. 20 | CLANG_MODULES_AUTOLINK = YES 21 | -------------------------------------------------------------------------------- /Configuration/Configurations/Profiling.xcconfig: -------------------------------------------------------------------------------- 1 | // This the base configuration for any profiling configuration. 2 | 3 | // Whether to perform App Store validation checks 4 | VALIDATE_PRODUCT = YES 5 | 6 | // Whether to only build the active architecture 7 | ONLY_ACTIVE_ARCH = NO 8 | 9 | // Whether to strip debugging symbols when copying the built product to its 10 | // final installation location 11 | STRIP_INSTALLED_PRODUCT = YES 12 | 13 | // The optimization level for the produced Swift binary. Optimized presently for speed. 14 | // See Universal-Common.xcconfig for other options. 15 | SWIFT_OPTIMIZATION_LEVEL = -O 16 | 17 | // We need this so that we can actually get debugging symbols when using Instruments. 18 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym 19 | 20 | // Enable compile time checks using #if JWW_PROFILING_BUILD 21 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = JWW_PROFILING_BUILD 22 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Justin Williams 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Configuration/Configurations/Development.xcconfig: -------------------------------------------------------------------------------- 1 | // This the base configuration for any development configuration. 2 | 3 | // Only build the current architecture. 4 | ONLY_ACTIVE_ARCH = YES 5 | 6 | // Don't do any Swift optimization so developers' lives are easier. 7 | SWIFT_OPTIMIZATION_LEVEL = -Onone 8 | 9 | // Don't do any Objective-C optimization so developers' lives are easier. 10 | GCC_OPTIMIZATION_LEVEL = 0 11 | 12 | // Enable single file compilation mode for incremental build support. 13 | SWIFT_COMPILATION_MODE = singlefile 14 | 15 | // Allow @testable imports 16 | ENABLE_TESTABILITY = YES 17 | 18 | // Enable compile time checks using #if JWW_DEVELOPMENT_BUILD 19 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) JWW_DEVELOPMENT_BUILD DEBUG 20 | 21 | // Whether to strip debugging symbols when copying the built product to its 22 | // final installation location 23 | STRIP_INSTALLED_PRODUCT = NO 24 | 25 | // We don't need the dSYM for development builds. 26 | DEBUG_INFORMATION_FORMAT = dwarf 27 | 28 | // Use a faster hashing algorithm for signing and disable Developer ID timestamping 29 | OTHER_CODE_SIGN_FLAGS = --digest-algorithm=sha1 --timestamp=none 30 | 31 | -------------------------------------------------------------------------------- /.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - mark 3 | - identifier_name 4 | - cyclomatic_complexity 5 | - nesting 6 | 7 | opt_in_rules: 8 | - attributes 9 | - empty_count 10 | - file_header 11 | - fatal_error_message 12 | - private_outlet 13 | - raw_value_for_camel_cased_codable_enum 14 | - force_https 15 | 16 | included: 17 | - Sources 18 | - Tests 19 | 20 | excluded: 21 | - bin 22 | - Carthage 23 | - fastlane 24 | - lib 25 | - script 26 | - .bundle 27 | - Scripts 28 | 29 | # Be mindful of force cast force try. Add lint ignoring commentary if these are valid. 30 | force_cast: 31 | severity: warning 32 | force_try: 33 | severity: warning 34 | 35 | # Personal preference. 36 | line_length: 37 | warning: 150 38 | error: 500 39 | ignores_comments: true 40 | ignores_urls: true 41 | 42 | identifier_name: 43 | min_length: 2 44 | max_length: 45 | warning: 90 46 | error: 1000 47 | excluded: 48 | - id 49 | - x 50 | - y 51 | 52 | # Prefer file lengths of less than 500. Its a code smell otherwise. 53 | file_length: 54 | warning: 500 55 | error: 1200 56 | 57 | type_body_length: 58 | warning: 500 59 | error: 1200 60 | 61 | function_body_length: 62 | warning: 80 63 | error: 120 64 | 65 | custom_rules: 66 | force_https: 67 | name: "Force HTTPS over HTTP" 68 | regex: "((?i)http(?!s))" 69 | match_kinds: string 70 | message: "URLs should use HTTPS rather than HTTP to ensure secure connections." 71 | severity: warning 72 | 73 | reporter: "xcode" 74 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## macOS Garbage 6 | .DS_Store 7 | 8 | ## Build generated 9 | build/ 10 | DerivedData/ 11 | .swiftpm 12 | .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata 13 | 14 | .github/assets 15 | .github/artifacts 16 | 17 | ## Various settings 18 | *.pbxuser 19 | !default.pbxuser 20 | *.mode1v3 21 | !default.mode1v3 22 | *.mode2v3 23 | !default.mode2v3 24 | *.perspectivev3 25 | !default.perspectivev3 26 | xcuserdata/ 27 | 28 | ## Other 29 | *.moved-aside 30 | *.xccheckout 31 | *.xcscmblueprint 32 | 33 | ## Obj-C/Swift specific 34 | *.hmap 35 | *.ipa 36 | *.dSYM.zip 37 | *.dSYM 38 | 39 | ## Playgrounds 40 | timeline.xctimeline 41 | playground.xcworkspace 42 | 43 | # Swift Package Manager 44 | # 45 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 46 | # Packages/ 47 | # Package.pins 48 | # Package.resolved 49 | .build/ 50 | 51 | # Ruby Dependencies 52 | vendor 53 | .bundle 54 | 55 | # Carthage 56 | Carthage 57 | 58 | # fastlane 59 | # 60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 61 | # screenshots whenever they are needed. 62 | # For more information about the recommended setup visit: 63 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 64 | 65 | fastlane/report.xml 66 | fastlane/Preview.html 67 | fastlane/screenshots/**/*.png 68 | fastlane/test_output 69 | -------------------------------------------------------------------------------- /Configuration/Universal-XCTest.xcconfig: -------------------------------------------------------------------------------- 1 | // Import Common Configuration 2 | #include "Universal-Common.xcconfig" 3 | 4 | // Tests don't support WatchKit, so we are going to do a bit of duplication here to make that explicit. 5 | SUPPORTED_PLATFORMS = iphonesimulator iphoneos macosx 6 | 7 | // We only need to build the active architecture for a test bundle since it runs on the simulator. 8 | ONLY_ACTIVE_ARCH = YES 9 | 10 | // We don't need a dSYM for tests. 11 | DEBUG_INFORMATION_FORMAT = dwarf 12 | 13 | // Auto Link any frameworks we use by default. 14 | CLANG_MODULES_AUTOLINK = YES 15 | 16 | // We don't actually install these since we're on iOS. 17 | SKIP_INSTALL = YES 18 | 19 | // Whether to strip debugging symbols when copying the built product to its 20 | // final installation location 21 | STRIP_INSTALLED_PRODUCT = NO 22 | 23 | // Test frameworks always need to include the Swift standard libs. 24 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO 25 | 26 | // We add a XCTEST_SUITE compiler condition to check / build with. 27 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) XCTEST_SUITE 28 | 29 | // Test bundles don't care about extension only APIs. 30 | APPLICATION_EXTENSION_API_ONLY = NO 31 | 32 | // Tests bundles shouldn't be optimized by default. 33 | SWIFT_OPTIMIZATION_LEVEL = -Onone 34 | GCC_OPTIMIZATION_LEVEL = 0 35 | 36 | // Enable single file compilation mode for incremental build support. 37 | SWIFT_COMPILATION_MODE = singlefile 38 | 39 | // Automatically add XCTest search paths to any test bundle or target that links XCTest. 40 | // New in Xcode 11.4 41 | ENABLE_TESTING_SEARCH_PATHS = YES 42 | -------------------------------------------------------------------------------- /Configuration/Universal-Framework.xcconfig: -------------------------------------------------------------------------------- 1 | // Import Common Configuration 2 | #include "Universal-Common.xcconfig" 3 | 4 | // SDK to use for a given platform. Default to iOS and then customize for other platforms as needed. 5 | SDKROOT = iphoneos 6 | SDKROOT[arch=x86_64][sdk=macosx*] = macosx 7 | SDKROOT[arch=i386][sdk=watchsimulator] = watchos 8 | SDKROOT[arch=armv7k][sdk=watchos*] = watchos 9 | 10 | // Build all architectures by default. 11 | ONLY_ACTIVE_ARCH = NO 12 | 13 | // Default to whole module optimization, unless disabled for a specific target. 14 | SWIFT_OPTIMIZATION_LEVEL = -Owholemodule 15 | 16 | // Development Team ID: Not necessary for a framework target. 17 | DEVELOPMENT_TEAM = 18 | 19 | // Default frameworks to the name of the project, instead of any 20 | // platform-specific target 21 | PRODUCT_NAME = $(PROJECT_NAME) 22 | 23 | // Enables the framework to be included from any location as long as the 24 | // loader’s runpath search paths includes it. For example from an application 25 | // bundle (inside the "Frameworks" folder) or shared folder 26 | LD_DYLIB_INSTALL_NAME = @rpath/$(PRODUCT_NAME).$(WRAPPER_EXTENSION)/$(PRODUCT_NAME) 27 | 28 | // Sets an explicit value to support SwiftUI previews. 29 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @loader_path/.. 30 | 31 | // Auto Link any frameworks we use by default. 32 | CLANG_MODULES_AUTOLINK = YES 33 | 34 | // We don't actually install these since we're on iOS. 35 | SKIP_INSTALL = YES 36 | 37 | // This is basically a default setting that shouldn't be overridden. 38 | INSTALL_PATH = @rpath 39 | 40 | // If a framework doesn't need to be extension friendly, override it in the project-specific configuration. 41 | APPLICATION_EXTENSION_API_ONLY = YES 42 | 43 | // Whether to strip out code that isn't called from anywhere 44 | DEAD_CODE_STRIPPING = NO 45 | 46 | // We suport bitcode by default. 47 | ENABLE_BITCODE = YES 48 | 49 | // OSX-specific default settings 50 | FRAMEWORK_VERSION[sdk=macosx*] = A 51 | COMBINE_HIDPI_IMAGES[sdk=macosx*] = YES 52 | 53 | // No global signing identity necessary for a framework target. 54 | CODE_SIGNING_REQUIRED = NO 55 | CODE_SIGN_IDENTITY = 56 | 57 | // New in Xcode 11 58 | // Enable support for building an XCFramework 59 | BUILD_LIBRARY_FOR_DISTRIBUTION = YES 60 | 61 | // Default to not including a bridging header for any created framework. 62 | SWIFT_INSTALL_OBJC_HEADER = NO 63 | 64 | // Since we don't have any Objective-C in the framework, we don't need to define a module. 65 | DEFINES_MODULE = NO 66 | -------------------------------------------------------------------------------- /Configuration/Universal-Common.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines common settings that should be enabled for every new 3 | // project or target. 4 | // 5 | // This should be considered platform independent. 6 | // 7 | 8 | // Our current shipping targets for the various platforms. 9 | IPHONEOS_DEPLOYMENT_TARGET = 18.0 10 | MACOSX_DEPLOYMENT_TARGET = 15.0 11 | WATCHOS_DEPLOYMENT_TARGET = 11.0 12 | TVOS_DEPLOYMENT_TARGET = 18.0 13 | XROS_DEPLOYMENT_TARGET = 2.0 14 | 15 | // The current version of Swift we support. 16 | SWIFT_VERSION = 6.0 17 | 18 | // Architectures to build. Default to standard. 19 | ARCHS = $(ARCHS_STANDARD) 20 | 21 | // We need this so that we can actually get debugging symbols when using Instruments. 22 | DEBUG_INFORMATION_FORMAT = dwarf-with-dsym 23 | 24 | // Whether to strip debugging symbols when copying resources (like included 25 | // binaries) 26 | // 27 | // Since all of our sub-project frameworks are code-signed there's nothing we 28 | // can strip without invalidating the signing signature, so default to NO. 29 | COPY_PHASE_STRIP = NO 30 | 31 | // Disable legacy-compatible header searching 32 | ALWAYS_SEARCH_USER_PATHS = NO 33 | 34 | // Allow module imports. 35 | CLANG_ENABLE_MODULES = YES 36 | 37 | // Allow module defines. 38 | DEFINES_MODULE = YES 39 | 40 | // We support ARC everywhere. 41 | CLANG_ENABLE_OBJC_ARC = YES 42 | 43 | // The compilation mode (singlefile, wholemodule) to use for generating a Swift binary or framework 44 | // As of Swift 4.1, this is independent of SWIFT_OPTIMIZATION_LEVEL. 45 | // More Info: https://swift.org/blog/whole-module-optimizations/ 46 | SWIFT_COMPILATION_MODE = wholemodule 47 | 48 | // Warn if there are deprecated functions being called. 49 | GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES 50 | 51 | // Warn whenever a local variable shadows another variable. 52 | GCC_WARN_SHADOW = YES 53 | 54 | // Causes warnings to be emitted about missing prototypes. 55 | GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES 56 | 57 | // Warn whenever a static function is declared but not defined or a noninline static function is unused. 58 | GCC_WARN_UNUSED_FUNCTION = YES 59 | 60 | // Warn if we try to reference an undeclared selector. 61 | GCC_WARN_UNDECLARED_SELECTOR = YES 62 | 63 | // Warn if we are implicitly capturing self in Objective-C code. 64 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 65 | 66 | // Warn if an Objective-C class either subclasses a deprecated class or overrides a method that has been marked deprecated. 67 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES 68 | 69 | // Check for misuses of `nonnull` parameter and return types. 70 | CLANG_ANALYZER_NONNULL = YES 71 | 72 | // Warn if we try to use a variable without initializing it. 73 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE 74 | 75 | // Causes warnings to be emitted when a function with a defined return type (not `void`) contains a return statement without a return-value. 76 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR 77 | 78 | // Warn if an API that is newer than the deployment target is used without "if (@available(...))" guards. 79 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 80 | 81 | // Warn when we try to compare a number object with a primitive type. 82 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE 83 | 84 | // Warn when a string that should be localized isn't. 85 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES 86 | 87 | // Warn about block captures of implicitly autoreleasing parameters. 88 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES 89 | 90 | // Warn about implicit conversions to boolean values that are suspicious. 91 | CLANG_WARN_BOOL_CONVERSION = YES 92 | 93 | // Warn about suspicious uses of the comma operator. 94 | CLANG_WARN_COMMA = YES 95 | 96 | // Warn about implicit conversions of constant values that cause the constant value to change. 97 | CLANG_WARN_CONSTANT_CONVERSION = YES 98 | 99 | // Warn about loop bodies that are suspiciously empty. 100 | CLANG_WARN_EMPTY_BODY = YES 101 | 102 | // Warn about implicit conversions between different kinds of enum values. 103 | CLANG_WARN_ENUM_CONVERSION = YES 104 | 105 | // Warn if all paths through a function call itself. 106 | CLANG_WARN_INFINITE_RECURSION = YES 107 | 108 | // Warn about implicit conversions between pointers and integers. 109 | CLANG_WARN_INT_CONVERSION = YES 110 | 111 | // Warn about non-literal expressions that evaluate to zero being treated as a null pointer. 112 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES 113 | 114 | // Warn about implicit conversions from Objective-C literals to values of incompatible type. 115 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES 116 | 117 | // Warn about ranged-based for loops. 118 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES 119 | 120 | // Warn about non-prototype declarations. 121 | CLANG_WARN_STRICT_PROTOTYPES = YES 122 | 123 | // Warn about non-prototype declarations. 124 | CLANG_WARN_SUSPICIOUS_MOVE = YES 125 | 126 | // Warns about potentially unreachable code. 127 | CLANG_WARN_UNREACHABLE_CODE = YES 128 | 129 | // Warn about declaring the same method more than once within the same `@interface`. 130 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 131 | 132 | // Controls whether `objc_msgSend` calls must be cast to the appropriate function pointer type before being called. 133 | ENABLE_STRICT_OBJC_MSGSEND = YES 134 | 135 | // GCC Ass Covering. 136 | GCC_NO_COMMON_BLOCKS = YES 137 | 138 | // Warn if a value is implicitly converted from a 64-bit type to a 32-bit type. 139 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES 140 | 141 | // Warn if there is a variable declared but never used. 142 | GCC_WARN_UNUSED_VARIABLE = YES 143 | 144 | // Default to Apple Generic Versioning 145 | VERSIONING_SYSTEM = apple-generic 146 | 147 | // Enable hardenened runtime support for macOS. 148 | ENABLE_HARDENED_RUNTIME[sdk=macosx*] = YES 149 | 150 | // Allow dyld to merge the framework into its parent app's binary. 151 | MERGEABLE_LIBRARY = YES 152 | 153 | // Allow the linker to create a merged binary automatically. 154 | MERGED_BINARY_TYPE = automatic 155 | 156 | // New in Xcode 14 (enabled by default in Xcode 15) 157 | // If enabled, the build system will sandbox user scripts to disallow undeclared input/output dependencies. 158 | ENABLE_USER_SCRIPT_SANDBOXING 159 | 160 | /// When enabled, string tables generated in a localization export will prefer the String Catalog format. 161 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES 162 | 163 | /// When enabled, the Swift compiler will be used to extract Swift string literal and interpolation LocalizedStringKey and LocalizationKey types 164 | /// during localization export. 165 | SWIFT_EMIT_LOC_STRINGS = YES 166 | 167 | /// If enabled, automatically generate an Info.plist file with content from build settings, and from content in the file pointed to 168 | /// by INFOPLIST_FILE, if defined. 169 | GENERATE_INFOPLIST_FILE = YES 170 | 171 | /// Activating this setting causes the -dead_strip flag to be passed to ld(1) via cc(1) to turn on dead code stripping. 172 | DEAD_CODE_STRIPPING = YES 173 | 174 | /// Enables clang module verification for frameworks. 175 | ENABLE_MODULE_VERIFIER = YES 176 | 177 | /// Language dialects to verify the module, i.e. the language dialects supported for framework clients. 178 | /// Allowed values are 'ansi', 'c89', 'gnu89', 'c99', 'gnu99', 'c11', 'gnu11', 'c17', 'gnu17', 'c++98', 179 | /// 'gnu++98', 'c++11', 'gnu++11', 'c++14', 'gnu++14', 'c++17', 'gnu++17', 'c++20', 'gnu++20' 180 | MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = gnu17 gnu++14 181 | 182 | /// Warns when a quoted include is used instead of a framework style include in a framework header. 183 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES 184 | 185 | /// Generate asset symbol extensions on Apple framework color and image types. 186 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES 187 | --------------------------------------------------------------------------------