Skip to content

Commit 57b110b

Browse files
committed
feat: add AppKit (for windows) as dependency and create NSApplicationDelegator
1 parent 277e9a1 commit 57b110b

17 files changed

+173
-555
lines changed

Package.swift

+6-8
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,24 @@ let package = Package(
1010
name: "OpenSwiftUI",
1111
targets: ["OpenSwiftUI"]),
1212
.executable(
13-
name: "Sample",
14-
targets: ["Sample"]),
13+
name: "OpenSwiftUISample",
14+
targets: ["OpenSwiftUISample"]),
1515
],
1616
dependencies: [
1717
.package(url: "https://github.com/OpenCombine/OpenCombine.git", branch: "master"),
18-
.package(url: "https://github.com/helbertgs/OpenGLAD.git", branch: "main"),
19-
.package(url: "https://github.com/helbertgs/OpenGLFW.git", branch: "main"),
18+
.package(url: "https://github.com/helbertgs/AppKit.git", branch: "main"),
2019
.package(url: "https://github.com/swiftlang/swift-docc-plugin", branch: "main")
2120
],
2221
targets: [
2322
.target(
2423
name: "OpenSwiftUI",
2524
dependencies: [
26-
.product(name: "OpenCombine", package: "OpenCombine"),
27-
.product(name: "OpenGLAD", package: "OpenGLAD"),
28-
.product(name: "OpenGLFW", package: "OpenGLFW")
25+
.product(name: "AppKit", package: "AppKit"),
26+
.product(name: "OpenCombine", package: "OpenCombine")
2927
]
3028
),
3129
.executableTarget(
32-
name: "Sample",
30+
name: "OpenSwiftUISample",
3331
dependencies: ["OpenSwiftUI"],
3432
swiftSettings: [
3533
.unsafeFlags([ "-parse-as-library" ])

Sources/OpenSwiftUI/App Structure/App Organization/App.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public protocol App {
123123
extension App {
124124
@MainActor @preconcurrency
125125
public static func main() {
126-
// TODO: Create UIApplication and UIApplicationDelegate
127126
print("\(Self.self).\(#function)")
127+
OpenSwiftUIApplication.shared.run(Self())
128128
}
129129
}

Sources/OpenSwiftUI/App Structure/App Organization/Application.swift

-5
This file was deleted.

Sources/OpenSwiftUI/App Structure/App Organization/Information.swift

-47
This file was deleted.

Sources/OpenSwiftUI/App Structure/App Organization/LaunchKeyOptions.swift

-77
This file was deleted.

0 commit comments

Comments
 (0)