We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96eb669 commit 7f218a6Copy full SHA for 7f218a6
Sources/OpenGraph/Graph/Graph.swift
@@ -6,7 +6,6 @@
6
// Status: WIP
7
8
public import OpenGraph_SPI
9
-import Foundation
10
11
extension Graph {
12
public static func typeIndex(
@@ -73,8 +72,13 @@ extension Graph {
73
72
public static func setOutputValue<Value>(_ value: UnsafePointer<Value>)
74
}
75
+#if canImport(Darwin)
76
+import Foundation
77
+#endif
78
+
79
80
public func archiveJSON(name: String?) {
81
+ #if canImport(Darwin)
82
let options: NSDictionary = [
83
Graph.descriptionFormat: "graph/dict",
84
Graph.descriptionIncludeValues: true,
@@ -94,5 +98,6 @@ extension Graph {
94
98
print("Wrote graph data to \"\(path)\".")
95
99
} catch {
96
100
101
+ #endif
97
102
103
0 commit comments