mapbox / mapbox/mapbox-maps-ios

Ambiguous type for Polygon on Mac Catalyst target

Open
#1,997 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :beetle:
Dominant language
Swift
Stars
601
Forks
196
PR merge metrics
No merged PRs in 30d

Description

## Environment

- Xcode version: 14.3.1
- iOS version: 16.4
- Devices affected: Mac Catalyst
- Maps SDK Version: 10.15.0

## Observed behavior and steps to reproduce

Compiling a project based on the MapboxMaps package leads to multiple occurrence of the compiler error:
```
'Polygon' is ambiguous for type lookup in this context
```

## Expected behavior

Successful compilation of the project with Mac Catalyst as build target.

## Notes / preliminary analysis

Mac SDK already defines a ```Polygon``` type:
```
ApplicationServices.Polygon:1:18: note: found this candidate
public typealias Polygon = MacPolygon
```
To use the ```Polygon``` type from Turf library it has to explicitly referenced or imported.

## Additional links and references

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the MapboxMaps package compilation with Mac Catalyst using Xcode 14.3.1 and inspect the compiler's ambiguous Polygon references. The issue is complete when the project compiles successfully for the Mac Catalyst target while retaining the Turf Polygon type.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.