Skip to content

Commit 0925bdb

Browse files
committed
Add visionOS support
1 parent 8313412 commit 0925bdb

File tree

9 files changed

+142
-30
lines changed

9 files changed

+142
-30
lines changed

Euclid/Euclid.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -801,11 +801,11 @@
801801
PRODUCT_NAME = Euclid;
802802
SDKROOT = "";
803803
SKIP_INSTALL = YES;
804-
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx";
804+
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
805805
SUPPORTS_MACCATALYST = YES;
806806
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
807807
SWIFT_VERSION = 5.0;
808-
TARGETED_DEVICE_FAMILY = "1,2,3";
808+
TARGETED_DEVICE_FAMILY = "1,2,3,7";
809809
};
810810
name = Debug;
811811
};
@@ -840,11 +840,11 @@
840840
PRODUCT_NAME = Euclid;
841841
SDKROOT = "";
842842
SKIP_INSTALL = YES;
843-
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx";
843+
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
844844
SUPPORTS_MACCATALYST = YES;
845845
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
846846
SWIFT_VERSION = 5.0;
847-
TARGETED_DEVICE_FAMILY = "1,2,3";
847+
TARGETED_DEVICE_FAMILY = "1,2,3,7";
848848
};
849849
name = Release;
850850
};

LRUCache/LRUCache.xcodeproj/project.pbxproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -426,17 +426,18 @@
426426
"@executable_path/../Frameworks",
427427
"@loader_path/Frameworks",
428428
);
429-
MACOSX_DEPLOYMENT_TARGET = 10.13;
430429
MARKETING_VERSION = 1.0.2;
431430
OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-expression-type-checking=75";
432431
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.LRUCache;
433432
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)";
434433
PRODUCT_NAME = LRUCache;
435434
SDKROOT = "";
436435
SKIP_INSTALL = YES;
437-
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator watchsimulator watchos";
436+
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator xros xrsimulator";
437+
SUPPORTS_MACCATALYST = NO;
438438
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
439439
SWIFT_VERSION = 5.0;
440+
TARGETED_DEVICE_FAMILY = "1,2,3,6,7";
440441
};
441442
name = Debug;
442443
};
@@ -461,16 +462,17 @@
461462
"@executable_path/../Frameworks",
462463
"@loader_path/Frameworks",
463464
);
464-
MACOSX_DEPLOYMENT_TARGET = 10.13;
465465
MARKETING_VERSION = 1.0.2;
466466
OTHER_SWIFT_FLAGS = "-Xfrontend -warn-long-expression-type-checking=75";
467467
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.LRUCache;
468468
PRODUCT_MODULE_NAME = "$(PRODUCT_NAME:c99extidentifier)";
469469
PRODUCT_NAME = LRUCache;
470470
SDKROOT = "";
471471
SKIP_INSTALL = YES;
472-
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator watchsimulator watchos";
472+
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx watchos watchsimulator xros xrsimulator";
473+
SUPPORTS_MACCATALYST = NO;
473474
SWIFT_VERSION = 5.0;
475+
TARGETED_DEVICE_FAMILY = "1,2,3,6,7";
474476
};
475477
name = Release;
476478
};

SVGPath/SVGPath.xcodeproj/project.pbxproj

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,9 +437,11 @@
437437
PRODUCT_NAME = SVGPath;
438438
SDKROOT = "";
439439
SKIP_INSTALL = YES;
440-
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator";
440+
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
441+
SUPPORTS_MACCATALYST = NO;
441442
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
442443
SWIFT_VERSION = 5.0;
444+
TARGETED_DEVICE_FAMILY = "1,2,3,6,7";
443445
};
444446
name = Debug;
445447
};
@@ -471,8 +473,10 @@
471473
PRODUCT_NAME = SVGPath;
472474
SDKROOT = "";
473475
SKIP_INSTALL = YES;
474-
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos macosx appletvos appletvsimulator";
476+
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
477+
SUPPORTS_MACCATALYST = NO;
475478
SWIFT_VERSION = 5.0;
479+
TARGETED_DEVICE_FAMILY = "1,2,3,6,7";
476480
};
477481
name = Release;
478482
};

ShapeScript.xcodeproj/project.pbxproj

Lines changed: 41 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 54;
6+
objectVersion = 55;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -17,14 +17,14 @@
1717
011E57B529F57BC600CA0778 /* WhatsNew.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 011E57B429F57BBC00CA0778 /* WhatsNew.rtf */; };
1818
01326AFF215D617500BB8CB1 /* Scene+SceneKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01326AFE215D617500BB8CB1 /* Scene+SceneKit.swift */; };
1919
013312D321C9BBCC00626F1B /* EvaluationContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = 013312D221C9BBCC00626F1B /* EvaluationContext.swift */; };
20-
013A0FC1290905C40015FD28 /* ShapeScript.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01BFB39621425C8500E47A7C /* ShapeScript.framework */; };
21-
013A0FC2290905C40015FD28 /* Euclid.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 016FAC2321C149C300AF60DC /* Euclid.framework */; };
22-
013A0FC3290905C40015FD28 /* LRUCache.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FDE3C026BD736700A46F66 /* LRUCache.framework */; };
23-
013A0FC4290905C40015FD28 /* SVGPath.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 010A905527FB222400D54A6F /* SVGPath.framework */; };
24-
013A0FC6290905F70015FD28 /* Euclid.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 016FAC2321C149C300AF60DC /* Euclid.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
25-
013A0FC7290905F70015FD28 /* LRUCache.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 01FDE3C026BD736700A46F66 /* LRUCache.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
26-
013A0FC8290905F70015FD28 /* SVGPath.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 010A905527FB222400D54A6F /* SVGPath.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
27-
013A0FC9290905F70015FD28 /* ShapeScript.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 01BFB39621425C8500E47A7C /* ShapeScript.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
20+
013A0FC1290905C40015FD28 /* ShapeScript.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01BFB39621425C8500E47A7C /* ShapeScript.framework */; platformFilters = (ios, xros, ); };
21+
013A0FC2290905C40015FD28 /* Euclid.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 016FAC2321C149C300AF60DC /* Euclid.framework */; platformFilters = (ios, xros, ); };
22+
013A0FC3290905C40015FD28 /* LRUCache.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 01FDE3C026BD736700A46F66 /* LRUCache.framework */; platformFilters = (ios, xros, ); };
23+
013A0FC4290905C40015FD28 /* SVGPath.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 010A905527FB222400D54A6F /* SVGPath.framework */; platformFilters = (ios, xros, ); };
24+
013A0FC6290905F70015FD28 /* Euclid.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 016FAC2321C149C300AF60DC /* Euclid.framework */; platformFilters = (ios, xros, ); settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
25+
013A0FC7290905F70015FD28 /* LRUCache.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 01FDE3C026BD736700A46F66 /* LRUCache.framework */; platformFilters = (ios, xros, ); settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
26+
013A0FC8290905F70015FD28 /* SVGPath.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 010A905527FB222400D54A6F /* SVGPath.framework */; platformFilters = (ios, xros, ); settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
27+
013A0FC9290905F70015FD28 /* ShapeScript.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 01BFB39621425C8500E47A7C /* ShapeScript.framework */; platformFilters = (ios, xros, ); settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2828
013DB0BE21C8731C00DFB0D2 /* StandardLibrary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 013DB0BD21C8731C00DFB0D2 /* StandardLibrary.swift */; };
2929
013FBF6A2834D7EF00EAF795 /* Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 013FBF692834D7EF00EAF795 /* Types.swift */; };
3030
0144878B29F58F3E0050D4D2 /* Untitled.shape in Resources */ = {isa = PBXBuildFile; fileRef = 0183AAB728EC3AB200AD1984 /* Untitled.shape */; };
@@ -1231,22 +1231,38 @@
12311231
};
12321232
0183AA9028EC10CE00AD1984 /* PBXTargetDependency */ = {
12331233
isa = PBXTargetDependency;
1234+
platformFilters = (
1235+
ios,
1236+
xros,
1237+
);
12341238
target = 01BFB39521425C8500E47A7C /* ShapeScript Lib */;
12351239
targetProxy = 0183AA8F28EC10CE00AD1984 /* PBXContainerItemProxy */;
12361240
};
12371241
0183AA9228EC10CE00AD1984 /* PBXTargetDependency */ = {
12381242
isa = PBXTargetDependency;
12391243
name = Euclid;
1244+
platformFilters = (
1245+
ios,
1246+
xros,
1247+
);
12401248
targetProxy = 0183AA9128EC10CE00AD1984 /* PBXContainerItemProxy */;
12411249
};
12421250
0183AA9428EC10CE00AD1984 /* PBXTargetDependency */ = {
12431251
isa = PBXTargetDependency;
12441252
name = LRUCache;
1253+
platformFilters = (
1254+
ios,
1255+
xros,
1256+
);
12451257
targetProxy = 0183AA9328EC10CE00AD1984 /* PBXContainerItemProxy */;
12461258
};
12471259
0183AA9628EC10CE00AD1984 /* PBXTargetDependency */ = {
12481260
isa = PBXTargetDependency;
12491261
name = SVGPath;
1262+
platformFilters = (
1263+
ios,
1264+
xros,
1265+
);
12501266
targetProxy = 0183AA9528EC10CE00AD1984 /* PBXContainerItemProxy */;
12511267
};
12521268
019551B221B5897500292771 /* PBXTargetDependency */ = {
@@ -1277,6 +1293,12 @@
12771293
01FDE3CD26BD738C00A46F66 /* PBXTargetDependency */ = {
12781294
isa = PBXTargetDependency;
12791295
name = LRUCache;
1296+
platformFilters = (
1297+
ios,
1298+
macos,
1299+
tvos,
1300+
xros,
1301+
);
12801302
targetProxy = 01FDE3CC26BD738C00A46F66 /* PBXContainerItemProxy */;
12811303
};
12821304
01FDE3D126BD73B200A46F66 /* PBXTargetDependency */ = {
@@ -1395,9 +1417,11 @@
13951417
PRODUCT_MODULE_NAME = Viewer;
13961418
PRODUCT_NAME = ShapeScript;
13971419
SDKROOT = iphoneos;
1420+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
1421+
SUPPORTS_MACCATALYST = NO;
13981422
SWIFT_EMIT_LOC_STRINGS = YES;
13991423
SWIFT_VERSION = 5.0;
1400-
TARGETED_DEVICE_FAMILY = "1,2";
1424+
TARGETED_DEVICE_FAMILY = "1,2,7";
14011425
};
14021426
name = Debug;
14031427
};
@@ -1427,10 +1451,12 @@
14271451
PRODUCT_MODULE_NAME = Viewer;
14281452
PRODUCT_NAME = ShapeScript;
14291453
SDKROOT = iphoneos;
1454+
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator xros xrsimulator";
1455+
SUPPORTS_MACCATALYST = NO;
14301456
SWIFT_EMIT_LOC_STRINGS = YES;
14311457
SWIFT_OPTIMIZATION_LEVEL = "-O";
14321458
SWIFT_VERSION = 5.0;
1433-
TARGETED_DEVICE_FAMILY = "1,2";
1459+
TARGETED_DEVICE_FAMILY = "1,2,7";
14341460
VALIDATE_PRODUCT = YES;
14351461
};
14361462
name = Release;
@@ -1592,12 +1618,12 @@
15921618
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.ShapeScriptLib;
15931619
PRODUCT_NAME = ShapeScript;
15941620
SKIP_INSTALL = YES;
1595-
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx";
1621+
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
15961622
SUPPORTS_MACCATALYST = YES;
15971623
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
15981624
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
15991625
SWIFT_VERSION = 5.0;
1600-
TARGETED_DEVICE_FAMILY = "1,2,3,6";
1626+
TARGETED_DEVICE_FAMILY = "1,2,3,6,7";
16011627
};
16021628
name = Debug;
16031629
};
@@ -1629,11 +1655,11 @@
16291655
PRODUCT_BUNDLE_IDENTIFIER = com.charcoaldesign.ShapeScriptLib;
16301656
PRODUCT_NAME = ShapeScript;
16311657
SKIP_INSTALL = YES;
1632-
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx";
1658+
SUPPORTED_PLATFORMS = "appletvos appletvsimulator iphoneos iphonesimulator macosx xros xrsimulator";
16331659
SUPPORTS_MACCATALYST = YES;
16341660
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = YES;
16351661
SWIFT_VERSION = 5.0;
1636-
TARGETED_DEVICE_FAMILY = "1,2,3,6";
1662+
TARGETED_DEVICE_FAMILY = "1,2,3,6,7";
16371663
};
16381664
name = Release;
16391665
};
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1510"
4+
version = "1.7">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "01D753CA29E88ED700B326F0"
18+
BuildableName = "CLI"
19+
BlueprintName = "CLI"
20+
ReferencedContainer = "container:ShapeScript.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES"
30+
shouldAutocreateTestPlan = "YES">
31+
</TestAction>
32+
<LaunchAction
33+
buildConfiguration = "Debug"
34+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
35+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
36+
launchStyle = "0"
37+
useCustomWorkingDirectory = "NO"
38+
ignoresPersistentStateOnLaunch = "NO"
39+
debugDocumentVersioning = "YES"
40+
debugServiceExtension = "internal"
41+
allowLocationSimulation = "YES"
42+
viewDebuggingEnabled = "No">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "01D753CA29E88ED700B326F0"
48+
BuildableName = "CLI"
49+
BlueprintName = "CLI"
50+
ReferencedContainer = "container:ShapeScript.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "01D753CA29E88ED700B326F0"
65+
BuildableName = "CLI"
66+
BlueprintName = "CLI"
67+
ReferencedContainer = "container:ShapeScript.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

Viewer/iOS/Document.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,8 @@ class Document: UIDocument {
132132
}
133133

134134
extension Document: UIDocumentPickerDelegate {
135-
func documentPicker(_: UIDocumentPickerViewController,
136-
didPickDocumentAt url: URL)
137-
{
138-
bookmarkURL(url)
135+
func documentPicker(_: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {
136+
urls.forEach(bookmarkURL)
139137
try? read(from: fileURL)
140138
}
141139
}

Viewer/iOS/DocumentBrowserViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ private extension UITextField {
384384
label.font = self.font
385385
container.frame = self.textRect(forBounds: self.bounds)
386386
label.frame = container.bounds
387-
if self.window?.screen.scale == 3, UIDevice.current.systemVersion
387+
if self.window?.contentScaleFactor == 3, UIDevice.current.systemVersion
388388
.compare("16", options: .numeric) == .orderedAscending
389389
{
390390
// Fix for slight baseline misalignment on @3x displays

Viewer/iOS/DocumentViewController.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,9 @@ class DocumentViewController: UIViewController {
226226
navigationBar.tintColor = errorMessage.map { _ in .white } ?? interfaceColor
227227
loadingIndicator.color = interfaceColor
228228
grantAccessButton.tintColor = .white
229+
#if os(iOS)
229230
setNeedsStatusBarAppearanceUpdate()
231+
#endif
230232
}
231233

232234
func updateEditButton() {

Viewer/iOS/TextView.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ class TextView: UIScrollView {
137137
textView.showsVerticalScrollIndicator = true
138138
textView.alwaysBounceVertical = true
139139
textView.alwaysBounceHorizontal = false
140+
#if os(iOS)
140141
textView.keyboardDismissMode = .interactive
142+
#endif
141143
textView.autocorrectionType = .no
142144
textView.spellCheckingType = spellCheckingType
143145
textView.autocapitalizationType = .none

0 commit comments

Comments
 (0)