Xcode Templates 3 - Buildscript: New section Targets

PHOTO EMBED

Mon Oct 04 2021 11:27:37 GMT+0000 (UTC)

Saved by @GoodRequest. #xml

<key>Targets</key>
	<array>
		<dict>
			<key>TargetIdentifier</key>
			<string>com.apple.dt.cocoaTouchApplicationTarget</string>
			<key>BuildPhases</key>
			<array>
				<dict>
					<key>Name</key>
					<string>🛠 Generate enums with SwiftGen</string>
					<key>SortOrder</key>
					<string>1</string>
					<key>Class</key>
					<string>ShellScript</string>
					<key>ShellPath</key>
					<string>/bin/sh</string>
					<key>ShellScript</key>
					<string>SWIFT_GEN="${PODS_ROOT}/SwiftGen/bin/swiftgen"
SWIFT_GEN_CONFIG="${PROJECT_DIR}/${PROJECT_NAME}/Resources/SwiftGen/swiftgen.yml"

if test -f "${SWIFT_GEN}"; then
    if test -f "${SWIFT_GEN_CONFIG}"; then
        "${SWIFT_GEN}" config run --verbose --config "${SWIFT_GEN_CONFIG}"
    else
        echo "warning: Swifgen configuration file missing make sure the path "$SWIFT_GEN_CONFIG" contains the file 😭😩🤦‍♂️"
    fi
else
    echo "warning: SwiftGen not installed, download from https://github.com/SwiftGen/SwiftGen 😭😩🤦‍♂️"
fi</string>
				</dict>
				<dict>
					<key>Name</key>
					<string>🧹 Validate codestyle with SwiftLint</string>
					<key>SortOrder</key>
					<string>1</string>
					<key>Class</key>
					<string>ShellScript</string>
					<key>ShellPath</key>
					<string>/bin/sh</string>
					<key>ShellScript</key>
					<string>SWIFT_LINT="${PODS_ROOT}/SwiftLint/swiftlint"
 SWIFT_LINT_CONFIG="${SRCROOT}/${PROJECT_NAME}/Resources/.swiftlint.yml"

if test -f "${SWIFT_LINT}"; then
    if test -f "${SWIFT_LINT_CONFIG}"; then
        "${SWIFT_LINT}" --config "${SWIFT_LINT_CONFIG}"
    else
        echo "warning: Swiflint configuration file missing make your the submodule is fetched 😭😩🤦‍♂️"
    fi
else
    echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint 😭😩🤦‍♂️"
fi</string>
				</dict>
			</array>
		</dict>
	</array>
content_copyCOPY