diff --git a/Package.swift b/Package.swift index ee4a16708..652bac541 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.7 +// swift-tools-version:5.5 import PackageDescription diff --git a/Sources/Snowplow/VisionOS/Entities/ComponentEntity.swift b/Sources/Snowplow/VisionOS/Entities/ComponentEntity.swift index 7cf92c218..350b7c64c 100644 --- a/Sources/Snowplow/VisionOS/Entities/ComponentEntity.swift +++ b/Sources/Snowplow/VisionOS/Entities/ComponentEntity.swift @@ -12,7 +12,6 @@ // language governing permissions and limitations there under. import Foundation -import RealityFoundation /** Properties for the RealityKit component entity. diff --git a/Sources/Snowplow/VisionOS/Entities/TrackableAnchorEntity.swift b/Sources/Snowplow/VisionOS/Entities/TrackableAnchorEntity.swift index 9343833ec..5a7a3e1ea 100644 --- a/Sources/Snowplow/VisionOS/Entities/TrackableAnchorEntity.swift +++ b/Sources/Snowplow/VisionOS/Entities/TrackableAnchorEntity.swift @@ -12,7 +12,10 @@ // language governing permissions and limitations there under. import Foundation + +#if canImport(ARKit) import ARKit +#endif /// The type of TrackableAnchor. @objc(SPTrackableAnchorType) @@ -51,6 +54,7 @@ public protocol ImageAnchorDetails { var nameDetails: String? { get } } +#if canImport(ARKit) extension ARReferenceImage: ImageAnchorDetails { public var widthDetails: Double { return self.physicalSize.width } public var heightDetails: Double { return self.physicalSize.height } @@ -58,6 +62,8 @@ extension ARReferenceImage: ImageAnchorDetails { public var nameDetails: String? { return self.name } } +#endif + /** Properties for the ARKit trackable anchor entity. Entity schema: `iglu:com.apple.arkit/trackable_anchor/jsonschema/1-0-0` diff --git a/Tests/TestVisionOSSerialisation.swift b/Tests/TestVisionOSSerialisation.swift index a001c73f2..c93a243fd 100644 --- a/Tests/TestVisionOSSerialisation.swift +++ b/Tests/TestVisionOSSerialisation.swift @@ -12,7 +12,6 @@ // language governing permissions and limitations there under. import XCTest -import ARKit @testable import SnowplowTracker class TestVisionOSSerialisation: XCTestCase { @@ -108,7 +107,7 @@ class TestVisionOSSerialisation: XCTestCase { func testBuildsWindowEntity() { let window = WindowEntity( id: "12345", - title: "window title", + titleKey: "window title", windowStyle: .automatic ) let entity = window.data