Repository navigation
Expand file tree
/
Copy pathPackage.swift
More file actions
58 lines (55 loc) · 2.2 KB
/
Copy pathPackage.swift
File metadata and controls
58 lines (55 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// swift-tools-version: 6.0
import Foundation
import PackageDescription
// React Native resolves this package through build/generated/autolinking/libs/Ease.
let usedRootEntries: Set<String> = ["ios", "spm-headers", "Package.swift"]
let unusedRootEntries = try! FileManager.default.contentsOfDirectory(atPath: Context.packageDirectory)
.filter { !usedRootEntries.contains($0) }
.sorted()
let iosProjects = try! FileManager.default.contentsOfDirectory(
atPath: Context.packageDirectory + "/ios"
).filter { $0.hasSuffix(".xcodeproj") }.map { "ios/" + $0 }
let package = Package(
name: "Ease",
platforms: [.iOS("15.1")],
products: [
.library(name: "Ease", targets: ["Ease"]),
],
dependencies: [
.package(name: "ReactNative", path: "../../../../xcframeworks"),
.package(name: "React-GeneratedCode", path: "../../../ios"),
],
targets: [
.target(
name: "Ease",
dependencies: [
.product(name: "ReactHeaders", package: "ReactNative"),
.product(name: "ReactNativeHeaders", package: "ReactNative"),
.product(name: "ReactNativeDependenciesHeaders", package: "ReactNative"),
.product(name: "ReactAppHeaders", package: "React-GeneratedCode"),
],
path: ".",
exclude: unusedRootEntries + iosProjects,
sources: ["ios"],
publicHeadersPath: "ios",
cSettings: [
.define("RCT_NEW_ARCH_ENABLED", to: "1"),
.headerSearchPath("spm-headers"),
.define("DEBUG", .when(configuration: .debug)),
.define("NDEBUG", .when(configuration: .release)),
],
cxxSettings: [
.define("RCT_NEW_ARCH_ENABLED", to: "1"),
.headerSearchPath("spm-headers"),
.define("DEBUG", .when(configuration: .debug)),
.define("NDEBUG", .when(configuration: .release)),
],
linkerSettings: [
.linkedFramework("UIKit"),
.linkedFramework("Foundation"),
.linkedFramework("CoreGraphics"),
]
),
],
cxxLanguageStandard: .cxx20
)