8000 Rename package to "nativeapi-swift", update dependencies, and modify … · leanflutter/nativeapi-swift@1d2aaa2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1d2aaa2

Browse files
committed
Rename package to "nativeapi-swift", update dependencies, and modify import statements in Example. Add .swiftpm to .gitignore and update submodule reference for libnativeapi.
1 parent 5339d72 commit 1d2aaa2

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.build/
2+
.swiftpm/
23
.swift-version

Package.swift

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,22 @@
22
import PackageDescription
33

44
let package = Package(
5-
name: "nativeapi",
5+
name: "nativeapi-swift",
66
targets: [
77
.executableTarget(
88
name: "Example",
9-
dependencies: ["libnativeapi"],
9+
dependencies: ["nativeapi"],
1010
swiftSettings: [
1111
.interoperabilityMode(.Cxx)
1212
]
1313
),
1414
.target(
15-
name: "libnativeapi",
15+
name: "nativeapi",
16+
path: "Sources/libnativeapi",
1617
exclude: [
1718
"examples",
1819
"src/screen_retriever_linux.cpp",
19-
"src/screen_retriever_linux.h",
2020
"src/screen_retriever_windows.cpp",
21-
"src/screen_retriever_windows.h",
2221
],
2322
linkerSettings: [
2423
.linkedFramework("Cocoa"),

Sources/Example/main.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import libnativeapi
1+
import nativeapi
22

3-
var screenRetriever = ScreenRetrieverMacOS()
3+
var screenRetriever = nativeapi.ScreenRetriever()
44
let cursorPoint = screenRetriever.GetCursorScreenPoint()
55
let primaryDisplay = screenRetriever.GetPrimaryDisplay()
66
let allDisplays = screenRetriever.GetAllDisplays()
@@ -9,5 +9,5 @@ print(cursorPoint)
99
print(primaryDisplay)
1010
print(allDisplays)
1111

12-
print(String(cString: primaryDisplay.id))
13-
print(String(cString: primaryDisplay.name))
12+
print(primaryDisplay.id)
13 B2CE +
print(primaryDisplay.name)

0 commit comments

Comments
 (0)
0