|
| 1 | +// swift-tools-version: 5.9 |
| 2 | +// The swift-tools-version declares the minimum version of Swift required to build this package. |
| 3 | + |
| 4 | +import PackageDescription |
| 5 | + |
| 6 | +let package = Package( |
| 7 | + name: "ExampleApp", |
| 8 | + |
| 9 | + platforms: [ |
| 10 | + .macOS(.v14), |
| 11 | + .iOS(.v13), |
| 12 | + .tvOS(.v13), |
| 13 | + ], |
| 14 | + |
| 15 | + dependencies: [ |
| 16 | + .package( |
| 17 | + url: "https://github.com/ShaftUI/Shaft", |
| 18 | + branch: "main" |
| 19 | + ), |
| 20 | + .package(url: "https://github.com/ShaftUI/SwiftReload.git", branch: "main"), |
| 21 | + .package(path: "../../"), // nativeapi-swift |
| 22 | + ], |
| 23 | + |
| 24 | + targets: [ |
| 25 | + .executableTarget( |
| 26 | + name: "ExampleApp", |
| 27 | + dependencies: [ |
| 28 | + "SwiftReload", |
| 29 | + .product(name: "Shaft", package: "Shaft"), |
| 30 | + .product(name: "ShaftSetup", package: "Shaft"), |
| 31 | + .product(name: "NativeAPI", package: "nativeapi-swift"), |
| 32 | + ], |
| 33 | + swiftSettings: [ |
| 34 | + .interoperabilityMode(.Cxx), // This is necessary to use the Skia renderer |
| 35 | + .unsafeFlags( |
| 36 | + ["-Xfrontend", "-enable-private-imports"], |
| 37 | + .when(configuration: .debug) |
| 38 | + ), |
| 39 | + .unsafeFlags( |
| 40 | + ["-Xfrontend", "-enable-implicit-dynamic"], |
| 41 | + .when(configuration: .debug) |
| 42 | + ), |
| 43 | + ], |
| 44 | + linkerSettings: [ |
| 45 | + .unsafeFlags( |
| 46 | + ["-Xlinker", "--export-dynamic"], |
| 47 | + .when(platforms: [.linux, .android], configuration: .debug) |
| 48 | + ) |
| 49 | + ] |
| 50 | + ) |
| 51 | + ], |
| 52 | + cxxLanguageStandard: .cxx17 // This is necessary to use the Skia renderer |
| 53 | +) |
0 commit comments