Build Information
Failed to build SwiftUIMKMapView, reference main (7b45f4
), with Swift 6.1 for macOS (SPM) on 26 Apr 2025 19:40:14 UTC.
Build Command
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
Build Log
========================================
RunAll
========================================
Builder version: 4.61.0
Interrupt handler set up.
========================================
Checkout
========================================
Clone URL: https://github.com/darrarski/SwiftUIMKMapView.git
Reference: main
Initialized empty Git repository in /Users/admin/builder/spi-builder-workspace/.git/
From https://github.com/darrarski/SwiftUIMKMapView
* branch main -> FETCH_HEAD
* [new branch] main -> origin/main
HEAD is now at 7b45f4e Show user location on the map
Cloned https://github.com/darrarski/SwiftUIMKMapView.git
Revision (git rev-parse @):
7b45f4e56045ecd8600c65416a6496ba7e7891a9
SUCCESS checkout https://github.com/darrarski/SwiftUIMKMapView.git at main
========================================
ResolveProductDependencies
========================================
Resolving dependencies ...
{
"identity": ".resolve-product-dependencies",
"name": "resolve-dependencies",
"url": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies",
"dependencies": [
{
"identity": "swiftuimkmapview",
"name": "SwiftUIMKMapView",
"url": "https://github.com/darrarski/SwiftUIMKMapView.git",
"version": "unspecified",
"path": "/Users/admin/builder/spi-builder-workspace/.resolve-product-dependencies/.build/checkouts/SwiftUIMKMapView",
"dependencies": [
]
}
]
}
Fetching https://github.com/darrarski/SwiftUIMKMapView.git
[1/68] Fetching swiftuimkmapview
Fetched https://github.com/darrarski/SwiftUIMKMapView.git from cache (0.63s)
Creating working copy for https://github.com/darrarski/SwiftUIMKMapView.git
Working copy of https://github.com/darrarski/SwiftUIMKMapView.git resolved at main (7b45f4e)
warning: '.resolve-product-dependencies': dependency 'swiftuimkmapview' is not used by any target
Found 0 product dependencies
========================================
Build
========================================
Selected platform: macosSpm
Swift version: 6.1
Building package at path: $PWD
https://github.com/darrarski/SwiftUIMKMapView.git
https://github.com/darrarski/SwiftUIMKMapView.git
{
"dependencies" : [
],
"manifest_display_name" : "SwiftUIMKMapView",
"name" : "SwiftUIMKMapView",
"path" : "/Users/admin/builder/spi-builder-workspace",
"platforms" : [
{
"name" : "ios",
"version" : "15.0"
}
],
"products" : [
{
"name" : "SwiftUIMKMapView",
"targets" : [
"SwiftUIMKMapView"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"targets" : [
{
"c99name" : "SwiftUIMKMapView",
"module_type" : "SwiftTarget",
"name" : "SwiftUIMKMapView",
"path" : "Sources/SwiftUIMKMapView",
"product_memberships" : [
"SwiftUIMKMapView"
],
"sources" : [
"AnnotationViewFactory.swift",
"DotAnnotation.swift",
"LineOverlay.swift",
"MapView.swift",
"MapViewCoordinator.swift",
"OverlayRendererFactory.swift"
],
"type" : "library"
}
],
"tools_version" : "5.5"
}
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64 -Xswiftc -Xfrontend -Xswiftc -stats-output-dir -Xswiftc -Xfrontend -Xswiftc .stats -Xswiftc -strict-concurrency=complete -Xswiftc -enable-upcoming-feature -Xswiftc StrictConcurrency -Xswiftc -enable-upcoming-feature -Xswiftc DisableOutwardActorInference -Xswiftc -enable-upcoming-feature -Xswiftc GlobalActorIsolatedTypesUsability -Xswiftc -enable-upcoming-feature -Xswiftc InferSendableFromCaptures
Building for debugging...
[0/2] Write sources
[1/2] Write swift-version-2F0A5646E1D333AE.txt
error: emit-module command failed with exit code 1 (use -v to see invocation)
[3/9] Compiling SwiftUIMKMapView LineOverlay.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/LineOverlay.swift:11:12: error: cannot find type 'UIColor' in scope
9 | public init(
10 | coordinates: [CLLocationCoordinate2D],
11 | color: UIColor,
| `- error: cannot find type 'UIColor' in scope
12 | width: CGFloat
13 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/LineOverlay.swift:23:14: error: cannot find type 'UIColor' in scope
21 |
22 | let coordinates: [CLLocationCoordinate2D]
23 | let color: UIColor
| `- error: cannot find type 'UIColor' in scope
24 | let width: CGFloat
25 | let polyline: MKPolyline
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/LineOverlay.swift:41:21: warning: static property 'rendererFactory' is not concurrency-safe because non-'Sendable' type 'OverlayRendererFactory' may have shared mutable state; this is an error in the Swift 6 language mode
39 | extension LineOverlay {
40 | /// Overlay renderer factory that uses `MKPolylineRenderer` to render `LineOverlay`.
41 | public static let rendererFactory: OverlayRendererFactory = .factory(for: LineOverlay.self) { line in
| |- warning: static property 'rendererFactory' is not concurrency-safe because non-'Sendable' type 'OverlayRendererFactory' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'rendererFactory' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
42 | let renderer = MKPolylineRenderer(polyline: line.polyline)
43 | renderer.strokeColor = line.color
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/OverlayRendererFactory.swift:4:15: note: consider making struct 'OverlayRendererFactory' conform to the 'Sendable' protocol
2 |
3 | /// Returns renderer object to use when drawing the specified overlay.
4 | public struct OverlayRendererFactory {
| `- note: consider making struct 'OverlayRendererFactory' conform to the 'Sendable' protocol
5 | /// - Parameter renderer: A closure that returns optional render for provided overlay.
6 | public init(renderer: @escaping (MKOverlay) -> MKOverlayRenderer?) {
[4/9] Compiling SwiftUIMKMapView MapViewCoordinator.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapViewCoordinator.swift:13:5: error: setter for 'visibleRect' is only available in macOS 10.15 or newer
2 |
3 | /// Coordinator for the MapView UIViewRepresentable.
4 | public final class MapViewCoordinator: NSObject, MKMapViewDelegate {
| `- note: add @available attribute to enclosing class
5 | init(view: MapView) {
6 | self.view = view
:
10 | let view: MapView
11 |
12 | public func mapView(_ mapView: MKMapView, regionDidChangeAnimated animated: Bool) {
| `- note: add @available attribute to enclosing instance method
13 | view.visibleRect = mapView.visibleMapRect
| |- error: setter for 'visibleRect' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
14 | }
15 |
[5/9] Compiling SwiftUIMKMapView OverlayRendererFactory.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/OverlayRendererFactory.swift:19:21: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'OverlayRendererFactory' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | /// Returns renderer object to use when drawing the specified overlay.
4 | public struct OverlayRendererFactory {
| `- note: consider making struct 'OverlayRendererFactory' conform to the 'Sendable' protocol
5 | /// - Parameter renderer: A closure that returns optional render for provided overlay.
6 | public init(renderer: @escaping (MKOverlay) -> MKOverlayRenderer?) {
:
17 | extension OverlayRendererFactory {
18 | /// An empty factory that does not return renderer.
19 | public static let empty = Self(renderer: { _ in nil })
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'OverlayRendererFactory' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'empty' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
20 |
21 | /// Combines multiple factories into a single one.
[6/9] Compiling SwiftUIMKMapView AnnotationViewFactory.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/AnnotationViewFactory.swift:30:21: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'AnnotationViewFactory' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | /// Provides the view associated with the specified annotation object.
4 | public struct AnnotationViewFactory {
| `- note: consider making struct 'AnnotationViewFactory' conform to the 'Sendable' protocol
5 | /// - Parameters:
6 | /// - register: A closure that registers an annotation view class that the map can create automatically.
:
28 | extension AnnotationViewFactory {
29 | /// An empty factory that does nothing and does not return views.
30 | public static let empty = Self(register: { _ in }, view: { _, _ in nil })
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'AnnotationViewFactory' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'empty' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
31 |
32 | /// Combines multiple factories into a single one.
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/AnnotationViewFactory.swift:78:15: warning: call to main actor-isolated instance method 'register(_:forAnnotationViewWithReuseIdentifier:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
76 |
77 | return .init(register: { mapView in
78 | mapView.register(
| `- warning: call to main actor-isolated instance method 'register(_:forAnnotationViewWithReuseIdentifier:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
79 | viewClass.self,
80 | forAnnotationViewWithReuseIdentifier: reuseIdentifier
MapKit.MKMapView.register:3:24: note: calls to instance method 'register(_:forAnnotationViewWithReuseIdentifier:)' from outside of its actor context are implicitly asynchronous
1 | class MKMapView {
2 | @available(macOS 10.13, *)
3 | @MainActor open func register(_ viewClass: AnyClass?, forAnnotationViewWithReuseIdentifier identifier: String)}
| |- note: calls to instance method 'register(_:forAnnotationViewWithReuseIdentifier:)' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'NSView'
4 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/AnnotationViewFactory.swift:84:34: warning: call to main actor-isolated instance method 'dequeueReusableAnnotationView(withIdentifier:for:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
82 | }, view: { mapView, annotation in
83 | guard let annotation = annotation as? Annotation else { return nil }
84 | let reusableView = mapView.dequeueReusableAnnotationView(
| `- warning: call to main actor-isolated instance method 'dequeueReusableAnnotationView(withIdentifier:for:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
85 | withIdentifier: reuseIdentifier,
86 | for: annotation
MapKit.MKMapView.dequeueReusableAnnotationView:3:24: note: calls to instance method 'dequeueReusableAnnotationView(withIdentifier:for:)' from outside of its actor context are implicitly asynchronous
1 | class MKMapView {
2 | @available(macOS 10.13, *)
3 | @MainActor open func dequeueReusableAnnotationView(withIdentifier identifier: String, for annotation: any MKAnnotation) -> MKAnnotationView}
| |- note: calls to instance method 'dequeueReusableAnnotationView(withIdentifier:for:)' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'NSView'
4 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/AnnotationViewFactory.swift:84:34: warning: sending value of non-Sendable type 'Annotation' risks causing data races; this is an error in the Swift 6 language mode
82 | }, view: { mapView, annotation in
83 | guard let annotation = annotation as? Annotation else { return nil }
84 | let reusableView = mapView.dequeueReusableAnnotationView(
| |- warning: sending value of non-Sendable type 'Annotation' risks causing data races; this is an error in the Swift 6 language mode
| `- note: sending task-isolated value of non-Sendable type 'Annotation' to main actor-isolated instance method 'dequeueReusableAnnotationView(withIdentifier:for:)' risks causing races in between task-isolated and main actor-isolated uses
85 | withIdentifier: reuseIdentifier,
86 | for: annotation
[7/9] Compiling SwiftUIMKMapView DotAnnotation.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:14:12: error: cannot find type 'UIColor' in scope
12 | size: CGFloat,
13 | border: CGFloat,
14 | color: UIColor
| `- error: cannot find type 'UIColor' in scope
15 | ) {
16 | self.coordinate = coordinate
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:25:14: error: cannot find type 'UIColor' in scope
23 | let size: CGFloat
24 | let border: CGFloat
25 | let color: UIColor
| `- error: cannot find type 'UIColor' in scope
26 |
27 | public override func isEqual(_ object: Any?) -> Bool {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:51:25: error: cannot find type 'UIImage' in scope
49 | }
50 |
51 | func renderImage() -> UIImage? {
| `- error: cannot find type 'UIImage' in scope
52 | guard let annotation = annotation as? DotAnnotation else { return nil }
53 | let format = UIGraphicsImageRendererFormat()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:74:21: warning: static property 'viewFactory' is not concurrency-safe because non-'Sendable' type 'AnnotationViewFactory' may have shared mutable state; this is an error in the Swift 6 language mode
72 | extension DotAnnotation {
73 | /// Annotation view factory for `DotAnnotation` that uses `DotAnnotationView`.
74 | public static let viewFactory: AnnotationViewFactory = .factory(for: DotAnnotation.self, DotAnnotationView.self)
| |- warning: static property 'viewFactory' is not concurrency-safe because non-'Sendable' type 'AnnotationViewFactory' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'viewFactory' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
75 | }
76 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/AnnotationViewFactory.swift:4:15: note: consider making struct 'AnnotationViewFactory' conform to the 'Sendable' protocol
2 |
3 | /// Provides the view associated with the specified annotation object.
4 | public struct AnnotationViewFactory {
| `- note: consider making struct 'AnnotationViewFactory' conform to the 'Sendable' protocol
5 | /// - Parameters:
6 | /// - register: A closure that registers an annotation view class that the map can create automatically.
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:53:18: error: cannot find 'UIGraphicsImageRendererFormat' in scope
51 | func renderImage() -> UIImage? {
52 | guard let annotation = annotation as? DotAnnotation else { return nil }
53 | let format = UIGraphicsImageRendererFormat()
| `- error: cannot find 'UIGraphicsImageRendererFormat' in scope
54 | let bounds = CGRect(
55 | origin: .zero,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:58:20: error: cannot find 'UIGraphicsImageRenderer' in scope
56 | size: .init(width: annotation.size, height: annotation.size)
57 | )
58 | let renderer = UIGraphicsImageRenderer(bounds: bounds, format: format)
| `- error: cannot find 'UIGraphicsImageRenderer' in scope
59 | let image = renderer.image { context in
60 | UIColor.white.setFill()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:60:7: error: cannot find 'UIColor' in scope
58 | let renderer = UIGraphicsImageRenderer(bounds: bounds, format: format)
59 | let image = renderer.image { context in
60 | UIColor.white.setFill()
| `- error: cannot find 'UIColor' in scope
61 | context.cgContext.fillEllipse(in: bounds)
62 | annotation.color.setFill()
[8/9] Compiling SwiftUIMKMapView MapView.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:14:18: error: 'Binding' is only available in macOS 10.15 or newer
3 |
4 | /// MapKit's MKMapView representable.
5 | public struct MapView: UIViewRepresentable {
| `- note: add @available attribute to enclosing struct
6 | /// - Parameters:
7 | /// - visibleRect: Binding for map's visible rect.
:
11 | /// - overlays: Array of MKOverlay objects to render on the map. Defaults to an empty array.
12 | /// - overlayRendererFactory: Factory that returns renderer object to use when drawing the specified overlay. Defaults to an empty factory.
13 | public init(
| `- note: add @available attribute to enclosing initializer
14 | visibleRect: Binding<MKMapRect>,
| `- error: 'Binding' is only available in macOS 10.15 or newer
15 | showsUserLocation: Bool = false,
16 | annotations: [MKAnnotation] = [],
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:29:4: error: 'Binding' is only available in macOS 10.15 or newer
3 |
4 | /// MapKit's MKMapView representable.
5 | public struct MapView: UIViewRepresentable {
| `- note: add @available attribute to enclosing struct
6 | /// - Parameters:
7 | /// - visibleRect: Binding for map's visible rect.
:
27 | }
28 |
29 | @Binding var visibleRect: MKMapRect
| `- error: 'Binding' is only available in macOS 10.15 or newer
30 | var showsUserLocation: Bool
31 | var annotations: [MKAnnotation]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:40:35: error: cannot find type 'Context' in scope
38 | }
39 |
40 | public func makeUIView(context: Context) -> MKMapView {
| `- error: cannot find type 'Context' in scope
41 | let view = MKMapView()
42 | annotationViewFactory.register(in: view)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:47:58: error: cannot find type 'Context' in scope
45 | }
46 |
47 | public func updateUIView(_ uiView: MKMapView, context: Context) {
| `- error: cannot find type 'Context' in scope
48 | uiView.setVisibleMapRect(visibleRect, animated: false)
49 | uiView.showsUserLocation = showsUserLocation
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:5:24: error: cannot find type 'UIViewRepresentable' in scope
3 |
4 | /// MapKit's MKMapView representable.
5 | public struct MapView: UIViewRepresentable {
| `- error: cannot find type 'UIViewRepresentable' in scope
6 | /// - Parameters:
7 | /// - visibleRect: Binding for map's visible rect.
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:37:5: warning: call to main actor-isolated initializer 'init(view:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
34 | let overlayRendererFactory: OverlayRendererFactory
35 |
36 | public func makeCoordinator() -> MapViewCoordinator {
| `- note: add '@MainActor' to make instance method 'makeCoordinator()' part of global actor 'MainActor'
37 | MapViewCoordinator(view: self)
| `- warning: call to main actor-isolated initializer 'init(view:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
38 | }
39 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapViewCoordinator.swift:5:3: note: calls to initializer 'init(view:)' from outside of its actor context are implicitly asynchronous
3 | /// Coordinator for the MapView UIViewRepresentable.
4 | public final class MapViewCoordinator: NSObject, MKMapViewDelegate {
5 | init(view: MapView) {
| |- note: calls to initializer 'init(view:)' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from conformance to protocol 'MKMapViewDelegate'
6 | self.view = view
7 | super.init()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:41:16: warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
38 | }
39 |
40 | public func makeUIView(context: Context) -> MKMapView {
| `- note: add '@MainActor' to make instance method 'makeUIView(context:)' part of global actor 'MainActor'
41 | let view = MKMapView()
| `- warning: call to main actor-isolated initializer 'init()' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
42 | annotationViewFactory.register(in: view)
43 | view.delegate = context.coordinator
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:23:1: note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
21 | @interface NSResponder : NSObject <NSCoding>
22 |
23 | - (instancetype)init NS_DESIGNATED_INITIALIZER;
| |- note: calls to initializer 'init()' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'NSView'
24 | - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
25 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:48:12: warning: call to main actor-isolated instance method 'setVisibleMapRect(_:animated:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
45 | }
46 |
47 | public func updateUIView(_ uiView: MKMapView, context: Context) {
| `- note: add '@MainActor' to make instance method 'updateUIView(_:context:)' part of global actor 'MainActor'
48 | uiView.setVisibleMapRect(visibleRect, animated: false)
| `- warning: call to main actor-isolated instance method 'setVisibleMapRect(_:animated:)' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
49 | uiView.showsUserLocation = showsUserLocation
50 |
MapKit.MKMapView.setVisibleMapRect:2:22: note: calls to instance method 'setVisibleMapRect(_:animated:)' from outside of its actor context are implicitly asynchronous
1 | class MKMapView {
2 | @MainActor open func setVisibleMapRect(_ mapRect: MKMapRect, animated animate: Bool)}
| |- note: calls to instance method 'setVisibleMapRect(_:animated:)' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'NSView'
3 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:49:12: warning: main actor-isolated property 'showsUserLocation' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
45 | }
46 |
47 | public func updateUIView(_ uiView: MKMapView, context: Context) {
| `- note: add '@MainActor' to make instance method 'updateUIView(_:context:)' part of global actor 'MainActor'
48 | uiView.setVisibleMapRect(visibleRect, animated: false)
49 | uiView.showsUserLocation = showsUserLocation
| `- warning: main actor-isolated property 'showsUserLocation' can not be mutated from a nonisolated context; this is an error in the Swift 6 language mode
50 |
51 | uiView.annotations.forEach { annotation in
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/MapKit.framework/Headers/MKMapView.h:166:28: note: mutation of this property is only permitted within the actor
164 |
165 | // Set to YES to add the user location annotation to the map and start updating its location
166 | @property (nonatomic) BOOL showsUserLocation;
| `- note: mutation of this property is only permitted within the actor
167 |
168 | // The annotation representing the user's location
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:51:12: warning: main actor-isolated property 'annotations' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
45 | }
46 |
47 | public func updateUIView(_ uiView: MKMapView, context: Context) {
| `- note: add '@MainActor' to make instance method 'updateUIView(_:context:)' part of global actor 'MainActor'
48 | uiView.setVisibleMapRect(visibleRect, animated: false)
49 | uiView.showsUserLocation = showsUserLocation
50 |
51 | uiView.annotations.forEach { annotation in
| `- warning: main actor-isolated property 'annotations' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
52 | if !annotations.contains(where: { $0.isEqual(annotation) }) {
53 | uiView.removeAnnotation(annotation)
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/MapKit.framework/Headers/MKMapView.h:185:60: note: property declared here
183 | - (void)removeAnnotations:(NSArray<id<MKAnnotation>> *)annotations;
184 |
185 | @property (nonatomic, readonly) NSArray<id<MKAnnotation>> *annotations;
| `- note: property declared here
186 | - (NSSet<id<MKAnnotation>> *)annotationsInMapRect:(MKMapRect)mapRect API_AVAILABLE(macos(10.9), ios(4.2), tvos(9.2)) API_UNAVAILABLE(watchos);
187 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:53:16: warning: call to main actor-isolated instance method 'removeAnnotation' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
51 | uiView.annotations.forEach { annotation in
52 | if !annotations.contains(where: { $0.isEqual(annotation) }) {
53 | uiView.removeAnnotation(annotation)
| `- warning: call to main actor-isolated instance method 'removeAnnotation' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
54 | }
55 | }
MapKit.MKMapView.removeAnnotation:2:22: note: calls to instance method 'removeAnnotation' from outside of its actor context are implicitly asynchronous
1 | class MKMapView {
2 | @MainActor open func removeAnnotation(_ annotation: any MKAnnotation)}
| |- note: calls to instance method 'removeAnnotation' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'NSView'
3 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:57:18: warning: main actor-isolated property 'annotations' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
55 | }
56 | annotations.forEach { annotation in
57 | if !uiView.annotations.contains(where: { $0.isEqual(annotation) }) {
| `- warning: main actor-isolated property 'annotations' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
58 | uiView.addAnnotation(annotation)
59 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/MapKit.framework/Headers/MKMapView.h:185:60: note: property declared here
183 | - (void)removeAnnotations:(NSArray<id<MKAnnotation>> *)annotations;
184 |
185 | @property (nonatomic, readonly) NSArray<id<MKAnnotation>> *annotations;
| `- note: property declared here
186 | - (NSSet<id<MKAnnotation>> *)annotationsInMapRect:(MKMapRect)mapRect API_AVAILABLE(macos(10.9), ios(4.2), tvos(9.2)) API_UNAVAILABLE(watchos);
187 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:58:16: warning: call to main actor-isolated instance method 'addAnnotation' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
56 | annotations.forEach { annotation in
57 | if !uiView.annotations.contains(where: { $0.isEqual(annotation) }) {
58 | uiView.addAnnotation(annotation)
| `- warning: call to main actor-isolated instance method 'addAnnotation' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
59 | }
60 | }
MapKit.MKMapView.addAnnotation:2:22: note: calls to instance method 'addAnnotation' from outside of its actor context are implicitly asynchronous
1 | class MKMapView {
2 | @MainActor open func addAnnotation(_ annotation: any MKAnnotation)}
| |- note: calls to instance method 'addAnnotation' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'NSView'
3 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:62:12: warning: main actor-isolated property 'overlays' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
45 | }
46 |
47 | public func updateUIView(_ uiView: MKMapView, context: Context) {
| `- note: add '@MainActor' to make instance method 'updateUIView(_:context:)' part of global actor 'MainActor'
48 | uiView.setVisibleMapRect(visibleRect, animated: false)
49 | uiView.showsUserLocation = showsUserLocation
:
60 | }
61 |
62 | uiView.overlays.forEach { overlay in
| `- warning: main actor-isolated property 'overlays' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
63 | if !overlays.contains(where: { $0.isEqual(overlay) }) {
64 | uiView.removeOverlay(overlay)
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/MapKit.framework/Headers/MKMapView.h:232:57: note: property declared here
230 | - (void)exchangeOverlay:(id <MKOverlay>)overlay1 withOverlay:(id <MKOverlay>)overlay2 API_AVAILABLE(macos(10.9), ios(7.0), tvos(9.2)) API_UNAVAILABLE(watchos);
231 |
232 | @property (nonatomic, readonly) NSArray<id<MKOverlay>> *overlays API_AVAILABLE(macos(10.9), ios(4.0), tvos(9.2)) API_UNAVAILABLE(watchos);
| `- note: property declared here
233 | - (NSArray<id<MKOverlay>> *)overlaysInLevel:(MKOverlayLevel)level API_AVAILABLE(macos(10.9), ios(7.0), tvos(9.2)) API_UNAVAILABLE(watchos);
234 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:64:16: warning: call to main actor-isolated instance method 'removeOverlay' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
62 | uiView.overlays.forEach { overlay in
63 | if !overlays.contains(where: { $0.isEqual(overlay) }) {
64 | uiView.removeOverlay(overlay)
| `- warning: call to main actor-isolated instance method 'removeOverlay' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
65 | }
66 | }
MapKit.MKMapView.removeOverlay:3:24: note: calls to instance method 'removeOverlay' from outside of its actor context are implicitly asynchronous
1 | class MKMapView {
2 | @available(macOS 10.9, *)
3 | @MainActor open func removeOverlay(_ overlay: any MKOverlay)}
| |- note: calls to instance method 'removeOverlay' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'NSView'
4 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:68:18: warning: main actor-isolated property 'overlays' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
66 | }
67 | overlays.forEach { overlay in
68 | if !uiView.overlays.contains(where: { $0.isEqual(overlay) }) {
| `- warning: main actor-isolated property 'overlays' can not be referenced from a nonisolated context; this is an error in the Swift 6 language mode
69 | uiView.addOverlay(overlay)
70 | }
/Applications/Xcode-16.3.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/System/Library/Frameworks/MapKit.framework/Headers/MKMapView.h:232:57: note: property declared here
230 | - (void)exchangeOverlay:(id <MKOverlay>)overlay1 withOverlay:(id <MKOverlay>)overlay2 API_AVAILABLE(macos(10.9), ios(7.0), tvos(9.2)) API_UNAVAILABLE(watchos);
231 |
232 | @property (nonatomic, readonly) NSArray<id<MKOverlay>> *overlays API_AVAILABLE(macos(10.9), ios(4.0), tvos(9.2)) API_UNAVAILABLE(watchos);
| `- note: property declared here
233 | - (NSArray<id<MKOverlay>> *)overlaysInLevel:(MKOverlayLevel)level API_AVAILABLE(macos(10.9), ios(7.0), tvos(9.2)) API_UNAVAILABLE(watchos);
234 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:69:16: warning: call to main actor-isolated instance method 'addOverlay' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
67 | overlays.forEach { overlay in
68 | if !uiView.overlays.contains(where: { $0.isEqual(overlay) }) {
69 | uiView.addOverlay(overlay)
| `- warning: call to main actor-isolated instance method 'addOverlay' in a synchronous nonisolated context; this is an error in the Swift 6 language mode
70 | }
71 | }
MapKit.MKMapView.addOverlay:3:24: note: calls to instance method 'addOverlay' from outside of its actor context are implicitly asynchronous
1 | class MKMapView {
2 | @available(macOS 10.9, *)
3 | @MainActor open func addOverlay(_ overlay: any MKOverlay)}
| |- note: calls to instance method 'addOverlay' from outside of its actor context are implicitly asynchronous
| `- note: main actor isolation inferred from inheritance from class 'NSView'
4 |
[9/9] Emitting module SwiftUIMKMapView
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/AnnotationViewFactory.swift:30:21: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'AnnotationViewFactory' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | /// Provides the view associated with the specified annotation object.
4 | public struct AnnotationViewFactory {
| `- note: consider making struct 'AnnotationViewFactory' conform to the 'Sendable' protocol
5 | /// - Parameters:
6 | /// - register: A closure that registers an annotation view class that the map can create automatically.
:
28 | extension AnnotationViewFactory {
29 | /// An empty factory that does nothing and does not return views.
30 | public static let empty = Self(register: { _ in }, view: { _, _ in nil })
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'AnnotationViewFactory' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'empty' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
31 |
32 | /// Combines multiple factories into a single one.
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:14:12: error: cannot find type 'UIColor' in scope
12 | size: CGFloat,
13 | border: CGFloat,
14 | color: UIColor
| `- error: cannot find type 'UIColor' in scope
15 | ) {
16 | self.coordinate = coordinate
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:25:14: error: cannot find type 'UIColor' in scope
23 | let size: CGFloat
24 | let border: CGFloat
25 | let color: UIColor
| `- error: cannot find type 'UIColor' in scope
26 |
27 | public override func isEqual(_ object: Any?) -> Bool {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:51:25: error: cannot find type 'UIImage' in scope
49 | }
50 |
51 | func renderImage() -> UIImage? {
| `- error: cannot find type 'UIImage' in scope
52 | guard let annotation = annotation as? DotAnnotation else { return nil }
53 | let format = UIGraphicsImageRendererFormat()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:74:21: warning: static property 'viewFactory' is not concurrency-safe because non-'Sendable' type 'AnnotationViewFactory' may have shared mutable state; this is an error in the Swift 6 language mode
72 | extension DotAnnotation {
73 | /// Annotation view factory for `DotAnnotation` that uses `DotAnnotationView`.
74 | public static let viewFactory: AnnotationViewFactory = .factory(for: DotAnnotation.self, DotAnnotationView.self)
| |- warning: static property 'viewFactory' is not concurrency-safe because non-'Sendable' type 'AnnotationViewFactory' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'viewFactory' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
75 | }
76 |
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/AnnotationViewFactory.swift:4:15: note: consider making struct 'AnnotationViewFactory' conform to the 'Sendable' protocol
2 |
3 | /// Provides the view associated with the specified annotation object.
4 | public struct AnnotationViewFactory {
| `- note: consider making struct 'AnnotationViewFactory' conform to the 'Sendable' protocol
5 | /// - Parameters:
6 | /// - register: A closure that registers an annotation view class that the map can create automatically.
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/LineOverlay.swift:11:12: error: cannot find type 'UIColor' in scope
9 | public init(
10 | coordinates: [CLLocationCoordinate2D],
11 | color: UIColor,
| `- error: cannot find type 'UIColor' in scope
12 | width: CGFloat
13 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/LineOverlay.swift:23:14: error: cannot find type 'UIColor' in scope
21 |
22 | let coordinates: [CLLocationCoordinate2D]
23 | let color: UIColor
| `- error: cannot find type 'UIColor' in scope
24 | let width: CGFloat
25 | let polyline: MKPolyline
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/LineOverlay.swift:41:21: warning: static property 'rendererFactory' is not concurrency-safe because non-'Sendable' type 'OverlayRendererFactory' may have shared mutable state; this is an error in the Swift 6 language mode
39 | extension LineOverlay {
40 | /// Overlay renderer factory that uses `MKPolylineRenderer` to render `LineOverlay`.
41 | public static let rendererFactory: OverlayRendererFactory = .factory(for: LineOverlay.self) { line in
| |- warning: static property 'rendererFactory' is not concurrency-safe because non-'Sendable' type 'OverlayRendererFactory' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'rendererFactory' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
42 | let renderer = MKPolylineRenderer(polyline: line.polyline)
43 | renderer.strokeColor = line.color
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/OverlayRendererFactory.swift:4:15: note: consider making struct 'OverlayRendererFactory' conform to the 'Sendable' protocol
2 |
3 | /// Returns renderer object to use when drawing the specified overlay.
4 | public struct OverlayRendererFactory {
| `- note: consider making struct 'OverlayRendererFactory' conform to the 'Sendable' protocol
5 | /// - Parameter renderer: A closure that returns optional render for provided overlay.
6 | public init(renderer: @escaping (MKOverlay) -> MKOverlayRenderer?) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:14:18: error: 'Binding' is only available in macOS 10.15 or newer
3 |
4 | /// MapKit's MKMapView representable.
5 | public struct MapView: UIViewRepresentable {
| `- note: add @available attribute to enclosing struct
6 | /// - Parameters:
7 | /// - visibleRect: Binding for map's visible rect.
:
11 | /// - overlays: Array of MKOverlay objects to render on the map. Defaults to an empty array.
12 | /// - overlayRendererFactory: Factory that returns renderer object to use when drawing the specified overlay. Defaults to an empty factory.
13 | public init(
| `- note: add @available attribute to enclosing initializer
14 | visibleRect: Binding<MKMapRect>,
| `- error: 'Binding' is only available in macOS 10.15 or newer
15 | showsUserLocation: Bool = false,
16 | annotations: [MKAnnotation] = [],
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:29:4: error: 'Binding' is only available in macOS 10.15 or newer
3 |
4 | /// MapKit's MKMapView representable.
5 | public struct MapView: UIViewRepresentable {
| `- note: add @available attribute to enclosing struct
6 | /// - Parameters:
7 | /// - visibleRect: Binding for map's visible rect.
:
27 | }
28 |
29 | @Binding var visibleRect: MKMapRect
| `- error: 'Binding' is only available in macOS 10.15 or newer
30 | var showsUserLocation: Bool
31 | var annotations: [MKAnnotation]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:40:35: error: cannot find type 'Context' in scope
38 | }
39 |
40 | public func makeUIView(context: Context) -> MKMapView {
| `- error: cannot find type 'Context' in scope
41 | let view = MKMapView()
42 | annotationViewFactory.register(in: view)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:47:58: error: cannot find type 'Context' in scope
45 | }
46 |
47 | public func updateUIView(_ uiView: MKMapView, context: Context) {
| `- error: cannot find type 'Context' in scope
48 | uiView.setVisibleMapRect(visibleRect, animated: false)
49 | uiView.showsUserLocation = showsUserLocation
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:5:24: error: cannot find type 'UIViewRepresentable' in scope
3 |
4 | /// MapKit's MKMapView representable.
5 | public struct MapView: UIViewRepresentable {
| `- error: cannot find type 'UIViewRepresentable' in scope
6 | /// - Parameters:
7 | /// - visibleRect: Binding for map's visible rect.
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/OverlayRendererFactory.swift:19:21: warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'OverlayRendererFactory' may have shared mutable state; this is an error in the Swift 6 language mode
2 |
3 | /// Returns renderer object to use when drawing the specified overlay.
4 | public struct OverlayRendererFactory {
| `- note: consider making struct 'OverlayRendererFactory' conform to the 'Sendable' protocol
5 | /// - Parameter renderer: A closure that returns optional render for provided overlay.
6 | public init(renderer: @escaping (MKOverlay) -> MKOverlayRenderer?) {
:
17 | extension OverlayRendererFactory {
18 | /// An empty factory that does not return renderer.
19 | public static let empty = Self(renderer: { _ in nil })
| |- warning: static property 'empty' is not concurrency-safe because non-'Sendable' type 'OverlayRendererFactory' may have shared mutable state; this is an error in the Swift 6 language mode
| |- note: add '@MainActor' to make static property 'empty' part of global actor 'MainActor'
| `- note: disable concurrency-safety checks if accesses are protected by an external synchronization mechanism
20 |
21 | /// Combines multiple factories into a single one.
Running build ...
env DEVELOPER_DIR=/Applications/Xcode-16.3.0.app xcrun swift build --arch arm64
[0/1] Planning build
Building for debugging...
[0/1] Write swift-version-2F0A5646E1D333AE.txt
[2/8] Compiling SwiftUIMKMapView MapView.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:14:18: error: 'Binding' is only available in macOS 10.15 or newer
3 |
4 | /// MapKit's MKMapView representable.
5 | public struct MapView: UIViewRepresentable {
| `- note: add @available attribute to enclosing struct
6 | /// - Parameters:
7 | /// - visibleRect: Binding for map's visible rect.
:
11 | /// - overlays: Array of MKOverlay objects to render on the map. Defaults to an empty array.
12 | /// - overlayRendererFactory: Factory that returns renderer object to use when drawing the specified overlay. Defaults to an empty factory.
13 | public init(
| `- note: add @available attribute to enclosing initializer
14 | visibleRect: Binding<MKMapRect>,
| `- error: 'Binding' is only available in macOS 10.15 or newer
15 | showsUserLocation: Bool = false,
16 | annotations: [MKAnnotation] = [],
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:29:4: error: 'Binding' is only available in macOS 10.15 or newer
3 |
4 | /// MapKit's MKMapView representable.
5 | public struct MapView: UIViewRepresentable {
| `- note: add @available attribute to enclosing struct
6 | /// - Parameters:
7 | /// - visibleRect: Binding for map's visible rect.
:
27 | }
28 |
29 | @Binding var visibleRect: MKMapRect
| `- error: 'Binding' is only available in macOS 10.15 or newer
30 | var showsUserLocation: Bool
31 | var annotations: [MKAnnotation]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:40:35: error: cannot find type 'Context' in scope
38 | }
39 |
40 | public func makeUIView(context: Context) -> MKMapView {
| `- error: cannot find type 'Context' in scope
41 | let view = MKMapView()
42 | annotationViewFactory.register(in: view)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:47:58: error: cannot find type 'Context' in scope
45 | }
46 |
47 | public func updateUIView(_ uiView: MKMapView, context: Context) {
| `- error: cannot find type 'Context' in scope
48 | uiView.setVisibleMapRect(visibleRect, animated: false)
49 | uiView.showsUserLocation = showsUserLocation
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:5:24: error: cannot find type 'UIViewRepresentable' in scope
3 |
4 | /// MapKit's MKMapView representable.
5 | public struct MapView: UIViewRepresentable {
| `- error: cannot find type 'UIViewRepresentable' in scope
6 | /// - Parameters:
7 | /// - visibleRect: Binding for map's visible rect.
[3/8] Compiling SwiftUIMKMapView OverlayRendererFactory.swift
[4/8] Compiling SwiftUIMKMapView LineOverlay.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/LineOverlay.swift:11:12: error: cannot find type 'UIColor' in scope
9 | public init(
10 | coordinates: [CLLocationCoordinate2D],
11 | color: UIColor,
| `- error: cannot find type 'UIColor' in scope
12 | width: CGFloat
13 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/LineOverlay.swift:23:14: error: cannot find type 'UIColor' in scope
21 |
22 | let coordinates: [CLLocationCoordinate2D]
23 | let color: UIColor
| `- error: cannot find type 'UIColor' in scope
24 | let width: CGFloat
25 | let polyline: MKPolyline
[5/8] Compiling SwiftUIMKMapView MapViewCoordinator.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapViewCoordinator.swift:13:5: error: setter for 'visibleRect' is only available in macOS 10.15 or newer
2 |
3 | /// Coordinator for the MapView UIViewRepresentable.
4 | public final class MapViewCoordinator: NSObject, MKMapViewDelegate {
| `- note: add @available attribute to enclosing class
5 | init(view: MapView) {
6 | self.view = view
:
10 | let view: MapView
11 |
12 | public func mapView(_ mapView: MKMapView, regionDidChangeAnimated animated: Bool) {
| `- note: add @available attribute to enclosing instance method
13 | view.visibleRect = mapView.visibleMapRect
| |- error: setter for 'visibleRect' is only available in macOS 10.15 or newer
| `- note: add 'if #available' version check
14 | }
15 |
[6/8] Compiling SwiftUIMKMapView AnnotationViewFactory.swift
error: emit-module command failed with exit code 1 (use -v to see invocation)
[7/8] Emitting module SwiftUIMKMapView
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:14:12: error: cannot find type 'UIColor' in scope
12 | size: CGFloat,
13 | border: CGFloat,
14 | color: UIColor
| `- error: cannot find type 'UIColor' in scope
15 | ) {
16 | self.coordinate = coordinate
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:25:14: error: cannot find type 'UIColor' in scope
23 | let size: CGFloat
24 | let border: CGFloat
25 | let color: UIColor
| `- error: cannot find type 'UIColor' in scope
26 |
27 | public override func isEqual(_ object: Any?) -> Bool {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:51:25: error: cannot find type 'UIImage' in scope
49 | }
50 |
51 | func renderImage() -> UIImage? {
| `- error: cannot find type 'UIImage' in scope
52 | guard let annotation = annotation as? DotAnnotation else { return nil }
53 | let format = UIGraphicsImageRendererFormat()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/LineOverlay.swift:11:12: error: cannot find type 'UIColor' in scope
9 | public init(
10 | coordinates: [CLLocationCoordinate2D],
11 | color: UIColor,
| `- error: cannot find type 'UIColor' in scope
12 | width: CGFloat
13 | ) {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/LineOverlay.swift:23:14: error: cannot find type 'UIColor' in scope
21 |
22 | let coordinates: [CLLocationCoordinate2D]
23 | let color: UIColor
| `- error: cannot find type 'UIColor' in scope
24 | let width: CGFloat
25 | let polyline: MKPolyline
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:14:18: error: 'Binding' is only available in macOS 10.15 or newer
3 |
4 | /// MapKit's MKMapView representable.
5 | public struct MapView: UIViewRepresentable {
| `- note: add @available attribute to enclosing struct
6 | /// - Parameters:
7 | /// - visibleRect: Binding for map's visible rect.
:
11 | /// - overlays: Array of MKOverlay objects to render on the map. Defaults to an empty array.
12 | /// - overlayRendererFactory: Factory that returns renderer object to use when drawing the specified overlay. Defaults to an empty factory.
13 | public init(
| `- note: add @available attribute to enclosing initializer
14 | visibleRect: Binding<MKMapRect>,
| `- error: 'Binding' is only available in macOS 10.15 or newer
15 | showsUserLocation: Bool = false,
16 | annotations: [MKAnnotation] = [],
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:29:4: error: 'Binding' is only available in macOS 10.15 or newer
3 |
4 | /// MapKit's MKMapView representable.
5 | public struct MapView: UIViewRepresentable {
| `- note: add @available attribute to enclosing struct
6 | /// - Parameters:
7 | /// - visibleRect: Binding for map's visible rect.
:
27 | }
28 |
29 | @Binding var visibleRect: MKMapRect
| `- error: 'Binding' is only available in macOS 10.15 or newer
30 | var showsUserLocation: Bool
31 | var annotations: [MKAnnotation]
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:40:35: error: cannot find type 'Context' in scope
38 | }
39 |
40 | public func makeUIView(context: Context) -> MKMapView {
| `- error: cannot find type 'Context' in scope
41 | let view = MKMapView()
42 | annotationViewFactory.register(in: view)
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:47:58: error: cannot find type 'Context' in scope
45 | }
46 |
47 | public func updateUIView(_ uiView: MKMapView, context: Context) {
| `- error: cannot find type 'Context' in scope
48 | uiView.setVisibleMapRect(visibleRect, animated: false)
49 | uiView.showsUserLocation = showsUserLocation
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/MapView.swift:5:24: error: cannot find type 'UIViewRepresentable' in scope
3 |
4 | /// MapKit's MKMapView representable.
5 | public struct MapView: UIViewRepresentable {
| `- error: cannot find type 'UIViewRepresentable' in scope
6 | /// - Parameters:
7 | /// - visibleRect: Binding for map's visible rect.
[8/8] Compiling SwiftUIMKMapView DotAnnotation.swift
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:14:12: error: cannot find type 'UIColor' in scope
12 | size: CGFloat,
13 | border: CGFloat,
14 | color: UIColor
| `- error: cannot find type 'UIColor' in scope
15 | ) {
16 | self.coordinate = coordinate
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:25:14: error: cannot find type 'UIColor' in scope
23 | let size: CGFloat
24 | let border: CGFloat
25 | let color: UIColor
| `- error: cannot find type 'UIColor' in scope
26 |
27 | public override func isEqual(_ object: Any?) -> Bool {
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:51:25: error: cannot find type 'UIImage' in scope
49 | }
50 |
51 | func renderImage() -> UIImage? {
| `- error: cannot find type 'UIImage' in scope
52 | guard let annotation = annotation as? DotAnnotation else { return nil }
53 | let format = UIGraphicsImageRendererFormat()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:53:18: error: cannot find 'UIGraphicsImageRendererFormat' in scope
51 | func renderImage() -> UIImage? {
52 | guard let annotation = annotation as? DotAnnotation else { return nil }
53 | let format = UIGraphicsImageRendererFormat()
| `- error: cannot find 'UIGraphicsImageRendererFormat' in scope
54 | let bounds = CGRect(
55 | origin: .zero,
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:58:20: error: cannot find 'UIGraphicsImageRenderer' in scope
56 | size: .init(width: annotation.size, height: annotation.size)
57 | )
58 | let renderer = UIGraphicsImageRenderer(bounds: bounds, format: format)
| `- error: cannot find 'UIGraphicsImageRenderer' in scope
59 | let image = renderer.image { context in
60 | UIColor.white.setFill()
/Users/admin/builder/spi-builder-workspace/Sources/SwiftUIMKMapView/DotAnnotation.swift:60:7: error: cannot find 'UIColor' in scope
58 | let renderer = UIGraphicsImageRenderer(bounds: bounds, format: format)
59 | let image = renderer.image { context in
60 | UIColor.white.setFill()
| `- error: cannot find 'UIColor' in scope
61 | context.cgContext.fillEllipse(in: bounds)
62 | annotation.color.setFill()
BUILD FAILURE 6.1 macosSpm