fix(ios): resolve pending layer waiters - #4288
Open
LukasB-DEV wants to merge 1 commit into
Open
Conversation
LukasB-DEV
requested a deployment
to
CI with Mapbox Tokens
August 27, 2026 08:15 — with
GitHub Actions
Waiting
LukasB-DEV
requested a deployment
to
CI with Mapbox Tokens
August 27, 2026 08:15 — with
GitHub Actions
Waiting
LukasB-DEV
requested a deployment
to
CI with Mapbox Tokens
August 27, 2026 08:15 — with
GitHub Actions
Waiting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
On iOS, a layer mounted with
belowLayerIDbefore its anchor layer exists is queued bywaitForLayerWithID. However,RNMBXMapView.layerAdded(_:)was left as a TODO, so the queued callbacks were never invoked after the anchor layer was added.As a result, the dependent layer remained absent from the map.
This change removes and invokes the callbacks waiting for the newly added layer. It mirrors the existing Android implementation and also prevents fulfilled callbacks from remaining retained in
layerWaiters.This is a general iOS layer-ordering issue and is not specific to an application integration.
No linked issue.
Reproduction and verification
Tested against unmodified
mainEnvironment:
@rnmapbox/maps10.3.5Before the fix:
FAIL: WAITING LAYER MISSINGbelowLayerID="anchor-layer"was absent.After the fix:
PASS: WAITING LAYER RENDEREDChecklist
CONTRIBUTING.mdyarn generatein the root folderyarn generatecompleted successfully and produced no changes./exampleapp.Screenshot OR Video
Before — unfixed
main:After — commit 9af2571:
Tests
yarn generate— passed, generated tree remained unchangedyarn test— passed, 22 test suites and 112 testsyarn typecheck— passedgit diff --check— passedComponent to reproduce the issue you're fixing
BugReportExample.js