Repository navigation
Fixed account type setting; reworded IB designable message - #1615
Conversation
Need to look in the main bundle for Info.plist settings, because the developer has no access to the framework’s Info.plist. Need to check MGLMapboxMetricsEnabledSettingShownInApp before MGLMapboxAccessToken; otherwise, `MGLMapboxEvents` inspects the Settings bundle plist before MGLMapboxMetricsEnabledSettingShownInApp is even checked.
Access tokens are only required for showing Mapbox-hosted maps.
IB designables inside frameworks have no access whatsoever to the host app’s bundle (especially if the host app lacks any designables of its own). So it has no way of knowing whether the access token is set in Info.plist. We could continue to check whether it was set programmatically, but we’d still have no way of knowing whether the host app has a Settings bundle, the other prerequisite for displaying Mapbox maps. Therefore, this change removes the Mapbox logo from the designable and displays a reworded reminder unconditionally. It now displays the URL of the “First steps with Mapbox GL for iOS” guide. I kept Mapbox blue in the designable, but as a border, so you can easily tell where the view ends (a major usability problem for custom views in IB).
Mmm, am looking at this now because it was crashing the tests. Have a couple questions:
|
|
|
#1553 made
Nothing that |
This class method is marked unavailable in MGLAccountManager.h, so this code can never be reached.
Fixed account type setting; reworded IB designable message




This PR fixes some regressions from #1553, as well as some bugs that’ve been lingering for longer:
MGLMapboxMetricsEnabledSettingShownInApp = YESin Info.plist, you still get the assertion failure in-[MGLMapboxEvents init]because the access token is read in first, causing the sharedMGLMapboxEventsto be created. This change rearranges the order that the settings are read in, since one is dependent on the other.Fixes #1613.