Skip to content

fix(ios): apply fadeWhenFacingNorth independently of enabled#1125

Open
charles-plante wants to merge 1 commit into
mapbox:mainfrom
charles-plante:fix/ios-compass-fade-when-facing-north
Open

fix(ios): apply fadeWhenFacingNorth independently of enabled#1125
charles-plante wants to merge 1 commit into
mapbox:mainfrom
charles-plante:fix/ios-compass-fade-when-facing-north

Conversation

@charles-plante
Copy link
Copy Markdown

On iOS, CompassSettings.fadeWhenFacingNorth was ignored unless enabled was also set. CompassController.updateSettings only assigned compass.visibility inside if let visible = settings.enabled { ... }, so a call that set only fadeWhenFacingNorth never reached the native API and the compass stayed .adaptive, fading out at north. Android applies each field independently, so the platforms behaved differently.

Apply enabled and fadeWhenFacingNorth independently, reading the current visibility for whichever field the caller didn't provide, mirroring the Android CompassMappings implementation.

Related to #602.

On iOS, CompassSettings.fadeWhenFacingNorth was ignored unless enabled
was also set. CompassController.updateSettings only assigned
compass.visibility inside `if let visible = settings.enabled { ... }`,
so a call that set only fadeWhenFacingNorth never reached the native
API and the compass stayed .adaptive, fading out at north. Android
applies each field independently, so the platforms behaved differently.

Apply enabled and fadeWhenFacingNorth independently, reading the current
visibility for whichever field the caller didn't provide, mirroring the
Android CompassMappings implementation.

Related to mapbox#602.
@charles-plante charles-plante requested a review from a team as a code owner May 27, 2026 20:44
@charles-plante charles-plante requested a review from evil159 May 27, 2026 20:44
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Charles Plante seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@charles-plante
Copy link
Copy Markdown
Author

image

The license is signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants