Skip to content

Commit 3c46f4d

Browse files
authored
fix: resolve map view initialization timing issue (#504)
1 parent a8ddabb commit 3c46f4d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ios/react-native-navigation-sdk/NavViewController.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ - (void)loadView {
7979
- (void)viewDidLoad {
8080
[super viewDidLoad];
8181

82-
[_viewCallbacks handleMapReady];
82+
// Defer to next run loop to ensure view props are set before calling onMapReady
83+
dispatch_async(dispatch_get_main_queue(), ^{
84+
if (self->_viewCallbacks) {
85+
[self->_viewCallbacks handleMapReady];
86+
}
87+
});
8388
}
8489

8590
- (void)viewDidLayoutSubviews {

0 commit comments

Comments
 (0)