swift-perception icon indicating copy to clipboard operation
swift-perception copied to clipboard

feat: add MapKit compatibility

Open fnazarios opened this issue 8 months ago • 3 comments

This PR is a simple addition to conform the WithPerceptionTracking view modifier with MapContent

fnazarios avatar Apr 03 '25 12:04 fnazarios

@fnazarios Looks like some platform availability is missing. Can you add macOS and any other platforms to get things building?

stephencelis avatar Apr 16 '25 17:04 stephencelis

@stephencelis Sure. I'm on it

fnazarios avatar Apr 16 '25 17:04 fnazarios

@stephencelis Just pushed the change.

fnazarios avatar Apr 16 '25 18:04 fnazarios

Hey @fnazarios, we are going to revert this because it is causing troubles with Swift builds due to various compiler bugs. However, we don't think it's really needed. Since MapKit is iOS 17+, and iOS 17+ has observation, you can use @Perceptible models in map views without doing any extra work. Did you encounter a specific problem that caused you to open this PR?

mbrandonw avatar Aug 27 '25 16:08 mbrandonw

Sounds good @mbrandonw. I've added it not for iOS 17 but watchOS 8, actually. But more than happy to keep a fork for my needs until we can drop watchOS 8 and 9

fnazarios avatar Aug 28 '25 16:08 fnazarios