[Bug]: Mapbox styles are not loaded, causing a black screen on iOS 18.4 and Xcode 16.3
Mapbox Implementation
Mapbox
Mapbox Version
11.8.0
React Native Version
0.76.9
Platform
iOS
@rnmapbox/maps version
10.1.37
Standalone component to reproduce
import React from 'react';
import {
MapView,
ShapeSource,
LineLayer,
Camera,
} from '@rnmapbox/maps';
const aLine = {
type: 'LineString',
coordinates: [
[-74.00597, 40.71427],
[-74.00697, 40.71527],
],
};
class BugReportExample extends React.Component {
render() {
return (
<MapView style={{flex: 1}}>
<Camera centerCoordinate={[-74.00597, 40.71427]} zoomLevel={14} />
<ShapeSource id="idStreetLayer" shape={aLine}>
<LineLayer id="idStreetLayer" />
</ShapeSource>
</MapView>
);
}
}
Observed behavior and steps to reproduce
Observed behavior: Black screen because app can't load the style. Gives a "MapLoad error Failed to load style: The network connection was lost." error. Happens on iOS version 18.4, Xcode 16.3.
Steps to reproduce:
- Update the package react-native to version 0.76.9 and install the dependencies.
- Run the example app on the repo.
- Visit any of the example maps. All of them are black. (Controls and the mapbox logo loads though.
Expected behavior
For the map style to load.
Notes / preliminary analysis
I tried with 3 different accounts(two of them were fresh registers. I followed the exact steps written in the guidelines and README of the example app. When I navigate to any of the maps after running it successfully, styles are both black. Probably it's unable to fetch them from the server. Happens on iOS version 18.4 and Xcode version 16.3. New release of Apple.
Additional links and references
No response
I think the issue is caused by the iOS 18.4 simulator, not just Mapbox, I'm also having issue with firebase messaging not working it can't find Apns,
I tested my app using xcode 16.3 on a physical device with ios 16.7 and it works properly.
@HamoBoker thanks for the response, I suspected an emulator issue too, its giving a network connection error. Works fine on iOS 18.3 and below.
I can confirm this issue as well. It was working fine on iOS 18.2 simulator.
It should be related to this Issue
Any updates or progress on this? I am having the same issue with TestFlight and on-device builds as well.
FYI: We've addressed the issue in the latest stable release 11.12.0 of MapboxMaps SDK.
https://github.com/mapbox/mapbox-maps-ios/releases/tag/v11.12.0
— Roman from Mapbox Maps SDK
Upstream issue