Skip to content

Instantly share code, notes, and snippets.

@noppefoxwolf
Last active January 4, 2022 13:51
Show Gist options
  • Save noppefoxwolf/ef51c0dfbbacdc39587fe227f9f85286 to your computer and use it in GitHub Desktop.
Save noppefoxwolf/ef51c0dfbbacdc39587fe227f9f85286 to your computer and use it in GitHub Desktop.
PreviewApp Package.swift
// swift-tools-version: 5.5
// WARNING:
// This file is automatically generated.
// Do not edit it by hand because the contents will be replaced.
import PackageDescription
import AppleProductTypes
let package = Package(
name: "PreviewApp",
platforms: [
.iOS("15.0")
],
dependencies: [
.package(name: "AppPackage", path: "../AppModule")
]
)
enum PreviewAppIdentifier: String, CaseIterable {
case Cheatsheet
case ColorPicker
case DocumentCreation
case Editor
case GoogleMobileAds
case LayerList
case Palette
case PalettePicker
case Purchase
case Settings
case Toolbar
case FloodFill
}
PreviewAppIdentifier.allCases.forEach { identifier in
let appName = "\(identifier.rawValue)App"
let moduleName = "\(identifier.rawValue)Module"
package.products.append(
.iOSApplication(
name: appName,
targets: [appName],
bundleIdentifier: "dev.noppe.dot.\(appName)",
teamIdentifier: "XXXXXXXXX",
displayVersion: "1.0",
bundleVersion: "1",
iconAssetName: "AppIcon",
accentColorAssetName: "AccentColor",
supportedDeviceFamilies: [
.phone
],
supportedInterfaceOrientations: [
.portrait
]
)
)
package.targets.append(
.executableTarget(
name: appName,
dependencies: [
.product(name: moduleName, package: "AppPackage"),
],
path: identifier.rawValue
)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment