Skip to content

Commit

Permalink
Reorganizing availability
Browse files Browse the repository at this point in the history
  • Loading branch information
trasch committed May 23, 2024
1 parent 7f04dc0 commit 31c0dd2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Sources/GISTools/GeoJson/GeoJsonCodable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ extension Coordinate3D: Codable {

// MARK: - SwiftData compatibility (see the README)

#if canImport(SwiftData)
@objc(GeoJsonTransformer)
public final class GeoJsonTransformer: ValueTransformer {

Expand Down Expand Up @@ -124,6 +125,7 @@ public final class GeoJsonTransformer: ValueTransformer {
}

}
#endif

// MARK: - Private

Expand Down
7 changes: 5 additions & 2 deletions Tests/GISToolsTests/GeoJson/SwiftDataTests.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
@testable import GISTools
import SwiftData
import XCTest

@available(macOS 14, *)
#if canImport(SwiftData)
import SwiftData

@available(macOS 14, iOS 17, watchOS 10, tvOS 17, *)
final class SwiftDataTests: XCTestCase {

@Model
Expand Down Expand Up @@ -56,3 +58,4 @@ final class SwiftDataTests: XCTestCase {
}

}
#endif

0 comments on commit 31c0dd2

Please sign in to comment.