Giter VIP home page Giter VIP logo

mapbox / mapbox-gl-native-ios Goto Github PK

View Code? Open in Web Editor NEW
211.0 118.0 121.0 229.11 MB

Interactive, thoroughly customizable maps for iOS powered by vector tiles and OpenGL

Home Page: https://www.mapbox.com/mobile/

License: Other

CMake 0.29% Makefile 0.25% JavaScript 2.94% Objective-C 35.34% C++ 0.68% Objective-C++ 54.41% Swift 1.42% C 0.09% Ruby 0.23% Shell 1.69% Rich Text Format 0.02% PowerShell 0.01% Dockerfile 0.07% Python 0.33% EJS 2.24%

mapbox-gl-native-ios's Introduction

Mapbox Maps SDKs for iOS and macOS

The latest version of Mapbox Maps SDK is now available at mapbox/mapbox-maps-ios. This version offers superior performance, features, and developer experience, and is the recommended mobile SDK solution for all Mapbox customers.

Mapbox maintains this repo to address bug fixes and security vulnerabilities. Please note that this project will cease to receive updates, including compatibility and bugfixes, after April 4, 2023. Here is a helpful guide about our latest SDK features and how to migrate to our latest version.

The Mapbox Maps SDK for iOS is an open-source framework for embedding interactive map views with scalable, customizable vector maps into Cocoa Touch applications on iOS 9.0 and above using Objective-C, Swift, or Interface Builder. It takes stylesheets that conform to the Mapbox Style Specification, applies them to vector tiles that conform to the Mapbox Vector Tile Specification, and renders them using Mapbox GL Native.

SDK Languages Build status
Mapbox Maps SDK for iOS Objective-C or Swift Circle CI build status
Mapbox Maps SDK for macOS Objective-C, Swift, or AppleScript Circle CI build status

License

Mapbox Maps SDK for iOS is licensed under the 2-Clause BSD license.

Mapbox GL Native v1.7.0 and above is licensed under the Mapbox Terms of Service.

mapbox-gl-native-ios's People

Contributors

1ec5 avatar alexshalamov avatar anandthakker avatar ansis avatar artemp avatar bleege avatar boundsj avatar brunoabinader avatar captainbarbosa avatar chrisloer avatar fabian-guerra avatar frederoni avatar friedbunny avatar guardiola31337 avatar hallahan avatar incanus avatar ivovandongen avatar jfirebaugh avatar jmkiley avatar julianrex avatar kkaefer avatar ljbade avatar lukaspaczos avatar mikemorris avatar osana avatar pozdnyakov avatar tmpsantos avatar tobrun avatar yhahn avatar zugaldia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mapbox-gl-native-ios's Issues

Allow changing offline metadata

mbgl::OfflineRegion supports getting the region’s metadata but not setting it. An offline region’s metadata typically contains a name. An application that allows the user to choose the name would typically also allow the user to change the name.

/cc @jfirebaugh @zugaldia

Metrics

  • Update mobile-metrics to support test from multiple repos (/cc @tobrun)
  • Migrate metrics to new repo

Tests

  • Ensure all existing tests pass (changes likely required due to file path differences)

Podspec for building from source code

Hi There,

We're trying to use the Mapbox cocoapod on iOS, however we're having an issue since we noticed that the framework is binary (as opposed to being built from source).

Our company unfortunately has a policy that requires us to only build projects from source for a variety of reasons, such as security audits of the code, ability to modify it if needed, and some file size limits on committing binaries into our git repo.

Since Mapbox is already open source, would it be possible to get variation of the Podspec that builds the framework from source code instead of using the pre-built binary?

Thanks!
Jason

VoiceOver accessibility on macOS

MGLMapView on OS X needs VoiceOver accessibility support like we have on iOS (#1496). The compass, zoom controls, attribution view, user dot, and annotations all need to be accessible.

Xcode Configuration

  • Copy/Modify (or create new) xcconfig files - UPDATE: we should be able to continue to use the existing generated ones, but please double check with @tmpsantos.
  • Create xcworkspace (in #12)
  • Address generated workspace settings - can we remove this hack? UPDATE: Keep as is.
  • Add projects to workspace & build

MGLIdeographicFontFamilyName should accept font display or PostScript name

Developers who use localIdeographFontFamily and specify a text-font with "Bold" in the name on some layers are expecting the text of those layers to show up as bolded on iOS, just like they do on Web and Android.

It looks like we did add a CoreText-based LocalGlyphRasterizer implementation on darwin in mapbox/mapbox-gl-native#10572, but for some reason, passing in different font weight values doesn't actually change the font weight: mapbox/mapbox-gl-native#10572 (comment). So, this ticket tracks debugging this issue further.


Note that the existing implementations are slightly different due to limitations on each platform:

To achieve this effect on Android, we use the platform API android.graphics.Typeface in LocalGlyphRasterizer to draw the glyphs locally. Typeface only supports a limited number of formatting options (bold, bold italic, italic, normal) in API 14 (our minimum deployment target) and does not support the specification of a numeric weight value until API 28.

On GL-JS, we check the name of the font on each layer and change the fontWeight if the font's name contains the word "Bold", "Medium", or "Light":

 if (!tinySDF) {
            let fontWeight = '400';
            if (/bold/i.test(stack)) {
                fontWeight = '900';
            } else if (/medium/i.test(stack)) {
                fontWeight = '500';
            } else if (/light/i.test(stack)) {
                fontWeight = '200';
            }
            tinySDF = entry.tinySDF = new GlyphManager.TinySDF(24, 3, 8, .25, family, fontWeight);
        }

Generate API diffs to better surface changes

Tools like apidiff exist to analyze frameworks and produce diffs of their APIs. We should apply this sort of tool in (at least) two ways:

1. Per pull request

Pull requests that change or add public API could have this information surfaced as a bot comment or GitHub check. This would help us identify subtle changes to public API that could be breaking.

2. Per release

We should generate and publish API diffs with our release documentation. It’s currently non-obvious in jazzy (and probably javadoc, too?) what code has changed in any given release, so a list of new/changed API would improve end-developers’ ability to upgrade confidently and quickly.

/cc @mapbox/maps-ios @mapbox/maps-android @1ec5

visibleAnnotations occasionally returns 0 entries, when an annotation is visible.

Platform: macOS
Mapbox SDK version: https://github.com/mapbox/mapbox-gl-native/tree/jrex-macosapp-visible-annotations

Steps to trigger behavior

  1. Checkout the above branch
  2. Add a annotation
  3. Repeat moving the annotation offscreen and then back on screen, then select the debug menu entry Show Visible Annotation Count and watch the log. Occasionally you'll see it read 0.

Short-lived video of the above: http://c.rxy.me/2w3n3T373v0T

Expected behavior

Annotation count should be 1 when the annotation is on screen.

cc @ChrisLoer

Finalize migration

  • Ensure a basic macOS project builds (CI/releases later)
  • Replace existing mapbox-gl-native documentation to reference this new repo
  • Make this repo public
  • Move existing issues to this repo.

Crash after calling MGLOfflineStorage.shared.resetDatabase and then initializing an instance of MGLMapView

We're using Mapbox in an iOS app and I need a way to wipe out/reset the Mapbox database (to include the ambient tile cache as well as any offline map packs that the user may have created). In looking through the API documentation, I ran across the resetDatabase method in the MGLOfflineStorage class and it seems to be exactly what I need. To be fair, the API docs do state that "You typically do not need to call this method." But it sounds like this method does exactly what I'm trying to accomplish so I added code to call it like this:

MGLOfflineStorage.shared.resetDatabase { e in
    if let error = e {
        print("Failed to reset Mapbox database!  Error: \(error.localizedDescription)")
    } else {
        print("Mapbox database was reset...")
    }
}

In my initial testing, it appears that the call is working (I'm seeing "Mapbox database was reset..." in the Xcode console). After this command runs, I check to see how many offline tile packs exist in the database like this:

MGLOfflineStorage.shared.reloadPacks()
if let offlinePacks = MGLOfflineStorage.shared.packs {
    print("\(offlinePacks.count) offline packs found in database...")
}

This shows "0 offline packs found in database..." where I had 3 before I ran the resetDatabase method.

I thought this was all working perfectly but then I ran into a problem. I need to perform this database reset in response to receiving a certain type of silent push notification from a server. Obviously that notification may arrive at any time. The app I'm working on uses a tab bar controller. The view controller that uses Mapbox is not the default view controller that is shown when the app is launched. If the "reset Mapbox" silent push notification arrives and the user has not yet selected my map view controller (which initializes an instance of MGLMapView in viewDidLoad()), the call to MGLOfflineStorage.shared.resetDatabase() appears to work properly but later when the user selects the map view controller for the first time, the app crashes and I see the following in the debugger:

com.mapbox.mbgl.DefaultFileSource (14): EXC_BAD_ACCESS (code=1, address=0x0)

I think the resetDatabase method is fairly new but has anyone ever run into this issue? For what it's worth, I've tested this with Mapbox 5.2.0 and 5.4.0. I'm using Swift 5, Xcode 11 and deploying to an iPhone running iOS 13.1 (but I've seen the same behavior on iOS 12.x, as well).

Steps to reproduce

  1. Do not intialize an instance of MGLMapView before completing step 2
  2. Call MGLOfflineStorage.shared.resetDatabase
  3. Initialize instance of MGLMapView

Expected behavior

The map initializes properly

Actual behavior

The app crashes and displays the following in Xcode:
com.mapbox.mbgl.DefaultFileSource (14): EXC_BAD_ACCESS (code=1, address=0x0)

Configuration

Mapbox SDK versions: 5.4.0
iOS/macOS versions: 12.x and 13.x
Device/simulator models: X, Xs Max
Xcode version: 11

[ios] Investigate arm64e compatibility

Xcode 10.1 added preview support for building arm64e slices:

To try the developer preview of arm64e, select your iOS app target in the Project Editor, find its Architectures build setting, select the Other… option, and add arm64e to the list of architectures. For more information, see Preparing Your App to Work with Pointer Authentication.

The App Store and TestFlight don't accept submissions containing arm64e. Xcode will remove arm64e content from your app when you distribute from the Organizer window. (42296212)

So, while it’s not yet possible for anyone but Apple to ship binaries with arm64e support, we should use this preview period to validate our framework’s support and do device testing.

(Incidentally, the information in the Xcode 10.1 release notes is slightly out of date — new frameworks/static libraries created with 10.2 will default to including arm64e in VALID_ARCHS. It’s a fairly safe bet that Apple will fully enable arm64e soon.)

/cc @julianrex @zugaldia

Crash on -[MGLMapView updateFromDisplayLink] and -[MGLMapView didMoveToWindow]

SIGABRT ABORT 0x00000001c776b104

Crashed: com.apple.main-thread
0  libsystem_kernel.dylib         0x1c776b104 __pthread_kill + 8
1  libsystem_pthread.dylib        0x1c77eb948 pthread_kill$VARIANT$armv81 + 296
2  libsystem_c.dylib              0x1c76c2d78 abort + 140
3  Metal                          0x1c9d7fe54 MTLGetWarningMode + 270
4  AppleMetalGLRenderer           0x1e93dfbbc gldPresentFramebufferData
5  GLEngine                       0x1ea2f029c glReadPixels_Exec
6  GLKit                          0x1d4e07bf8 -[GLKView snapshot] + 252
7  Mapbox                         0x10a70b494 -[MGLMapView sleepGL:] (MGLMapView.mm:1332)
8  CoreFoundation                 0x1c7b4394c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
9  CoreFoundation                 0x1c7b43918 ___CFXRegistrationPost_block_invoke + 64
10 CoreFoundation                 0x1c7b42e08 _CFXRegistrationPost + 392
11 CoreFoundation                 0x1c7b42ab4 ___CFXNotificationPost_block_invoke + 96
12 CoreFoundation                 0x1c7abac90 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1404
13 CoreFoundation                 0x1c7b42540 _CFXNotificationPost + 696
14 Foundation                     0x1c8553ca0 -[NSNotificationCenter postNotificationName:object:userInfo:] + 68
15 UIKitCore                      0x1f4ef2564 <redacted> + 268
16 UIKitCore                      0x1f4932350 <redacted> + 112
17 UIKitCore                      0x1f4ef23e4 <redacted> + 96
18 UIKitCore                      0x1f4785ee0 <redacted> + 1848
19 UIKitCore                      0x1f4783060 <redacted> + 852
20 UIKitCore                      0x1f4782cbc <redacted> + 432
21 UIKitCore                      0x1f4787e7c <redacted> + 220
22 UIKitCore                      0x1f4788ddc _performActionsWithDelayForTransitionContext + 112
23 UIKitCore                      0x1f4787d34 <redacted> + 248
24 UIKitCore                      0x1f478cc20 <redacted> + 368
25 UIKitCore                      0x1f4ad26e0 <redacted> + 468
26 FrontBoardServices             0x1ca60c6e4 __80-[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:]_block_invoke.359 + 228
27 libdispatch.dylib              0x1c760e484 _dispatch_client_callout + 16
28 libdispatch.dylib              0x1c75e53e0 _dispatch_block_invoke_direct$VARIANT$armv81 + 216
29 FrontBoardServices             0x1ca64aa9c __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 40
30 FrontBoardServices             0x1ca64a728 -[FBSSerialQueue _performNext] + 416
31 FrontBoardServices             0x1ca64ad44 -[FBSSerialQueue _performNextFromRunLoopSource] + 56
32 CoreFoundation                 0x1c7b651f0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
33 CoreFoundation                 0x1c7b65170 __CFRunLoopDoSource0 + 88
34 CoreFoundation                 0x1c7b64a54 __CFRunLoopDoSources0 + 176
35 CoreFoundation                 0x1c7b5f920 __CFRunLoopRun + 1040
36 CoreFoundation                 0x1c7b5f1f0 CFRunLoopRunSpecific + 436
37 GraphicsServices               0x1c9dd8584 GSEventRunModal + 100
38 UIKitCore                      0x1f4eead40 UIApplicationMain + 212
39 libswiftUIKit.dylib            0x10ba5cda0 UIApplicationMain(_:_:_:_:) + 168
40 InstaShopper                   0x1047f979c main (main.swift:5)
41 libdyld.dylib                  0x1c761ebb4 start + 4

Steps to reproduce

Not sure. Caught by crash reporting. However, it happens 100% in background, but this doesn't seem the same issue where it'd crash when the app was getting terminated (I only see "Will resign active" on my logs).

Expected behavior

Doesn't crash.

Actual behavior

💥

Configuration

Mapbox SDK versions: 4.7.0
iOS/macOS versions: iOS 11 and 12
Device/simulator models: All
Xcode version: 10.2

Fix iOS Code Coverage script

The ios-code-coverage.sh script needs to be updated for Xcode 11. Currently, nightly builds are failing because the coverage file cannot be found.

It looks like Xcode 11 changed the format of the .xcresult file. The .xccovreport file can't be accessed directly, as we currently do:

https://github.com/mapbox/mapbox-gl-native/blob/daf8e1289c3c8b437c97e1ec4250b521fa6edc52/platform/ios/scripts/ios-code-coverage.sh#L12-L15

There is an additional issue where the *.xcresult file is not being found to begin with, which causes the CI job to fail.

cc @julianrex

Can't compile SDK on latest MacOS Mojave with terminal

I followed the steps to compile the mapbox-gl-native on MacOS but I got this error when I try to compile from terminal:

make iframework BUILDTYPE=Release

`FORMAT= BUILD_DEVICE= SYMBOLS= BUILD_DOCS=true
./platform/ios/scripts/package.sh

  • Configuring dynamic framework for iphoneos 12.4 (symbols: YES, buildtype: RelWithDebInfo)
    Xcode 10.3
    Build version 10G8
  • Recording library version…
    mapbox-gl-native 7db7d64
  • Building targets (build 14948, version 5.4.0-alpha.2)
  • Building dynamic framework for iOS Simulator using dynamic scheme
    ▸ Running script 'CMake Rules'
    ▸ Compiling async_task.cpp

❌ /Users/admin/mapbox-gl-native/include/mbgl/util/noncopyable.hpp:15:5: unknown type name 'constexpr'

constexpr noncopyable() = default;
^

❌ /Users/admin/mapbox-gl-native/include/mbgl/util/noncopyable.hpp:15:15: constructor cannot have a return type

constexpr noncopyable() = default;
          ^~~~~~~~~~~

`

I read on several forums that I need to compile with C++11 but everything I tried didn't work or I don't know how to do it

-[MGLMapView accessibilityElementAtIndex:] performs poorly on Simulator

When running XCUITests, -[MGLMapView accessibilityElementAtIndex:] can occasionally consume 100% of the Simulator’s CPU indefinitely. This can cause the tests to fail if the test harness was waiting for the app to idle before continuing.

Perhaps related to mapbox/mapbox-gl-native#13860 and/or #172.

Screen Shot 2019-04-03 at 1 31 20 PM
see attached Instruments trace

Steps to reproduce

Run XCUITests on Simulator, e.g., using ios-sdk-examples — intermittently pegs CPU.

Configuration

Mapbox SDK versions: ios-v4.10.0-beta.1, others
Device/simulator models: iPhone SE (iOS 10.3.1), others
Xcode version: 10.2

/cc @julianrex @1ec5

MGLShapeSource.shape getter is always returning nil

Hello,

I have a json style loaded from a remote URL.
This style already contains and declares Sources and related layers.

When I need to display data on a source I do the following

let source = mapView.style.source(withIdentifier: "id") as? MGLShapeSource
source.shape = aShape

When setting the shape I can get the content of the source and I see the shape in there:

po source
<MGLShapeSource: 0x282d1c280; identifier = "id"; URL = (null); shape = <MGLShapeCollectionFeature: 0x2837d0480>>

The shape is then drawn on the map.

I later on interact with the map and try to fetch the source data from it the same way:

let source = mapView.style.source(withIdentifier: "id") as? MGLShapeSource
let currentMapShape = source.shape

currentMapShape is always nil

 Optional<MGLSource>
  - some : <MGLShapeSource: 0x282d1c280; identifier = "id"; URL = (null); shape = (null)>

The issue is clear by checking the style:

po mapView.style?.sources
▿ Optional<Set<MGLSource>>
  ▿ some : 28 elements
...
    - 21 : <MGLShapeSource: 0x282d1c280; identifier = "id"; URL = (null); shape = (null)>

Documentation says

If the receiver was initialized using `-initWithIdentifier:URL:options:`, this property is set to `nil`. This property is unavailable until the receiver is passed into `-[MGLStyle addSource:]`.
You can get/set the shapes within a collection via this property. Actions must be performed on the application's main thread.

I can see the ShapeSource I get is always the same (address is always 0x282d1c280)
however as soon as I leave the scope of where the shape was set..
it's impossible to fetch it again.

Why is the getter not working?

possible references: mapbox/mapbox-gl-native#9759

Steps to reproduce

  1. Add a source to a remote style
  2. Add a shape to the source
  3. try to get the shape out of the source again

Expected behavior

Old shape is returned

Actual behavior

nil is always returned

Configuration

Mapbox SDK versions: Mapbox-iOS-SDK (~> 4.11.0)
Xcode version: Version 10.2.1 (10E1001)

[iOS] Adding pitch messes up the bottom left corner pan gesture

Hello,

When I increase the pitch of the mapView and make a pan gesture from the middle to the bottom left corner of the device, the velocity of the gesture seems to be exponentially calculated and the view is thrown away really far. This does not happen with the 3 other corners and only occurs with a pitch > 0.

capture

Here is my basic configuration:

        mapView = MGLMapView(frame: view.bounds)
        mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
        mapView.delegate = self
        mapView.logoView.isHidden = true
        mapView.attributionButton.isHidden = true
        mapView.compassView.isHidden = true
        mapView.allowsRotating = true
        mapView.isPitchEnabled = true
        mapView.styleURL = MapViewStyleURL
        view.addSubview(mapView)

Steps to reproduce

  1. Make a basic implementation of the mapView
  2. Run and add some pitch
  3. Drag from the middle to the bottom left corner

Expected behavior

Normal pan velocity.

Actual behavior

Way to high velocity.

Configuration

Mapbox SDK versions: 4.10
iOS/macOS versions: iOS 13 and 12
Device/simulator models: XS Max but tested on various simulators like iPhone 7
Xcode version: 11.2 beta (11B41)

Callout is not updated when annotation's title or subtitle changes

Platform: iOS
Mapbox SDK version: 3.6.1

Steps to trigger behavior

  1. Add an annotation to the map that can present a callout with title and/or subtile
  2. Regularly update the annotation title/subtitle (e.g. every second to change a relative date display) via the properties' setters
  3. Select (tap or programmatically) the annotation to bring up the callout

Expected behavior

The updated property values for the title and subtitle are reflected in the callout.

This is what MapKit does (via KVO).

Actual behavior

The callout's content is only updated once closed and reopened.

UIKit for Mac build error

When trying to port an iOS app to the Mac via Catalyst in iOS 13 / macOS 10.15, Mapbox fails to compile because it is relying on a deprecated API (EAGLContext) that was not ported to UIKit for the Mac via Catalyst.

Steps to reproduce

  1. Include the MapBox SDK in a iOS project which is configured to use Catalyst to compile for macOS, too. (using the macOS SDK is not an option here)

  2. Attempt to build for the Mac

Expected behavior

The library builds successfully.

Actual behavior

The library does not build, and fails with the error "Unknown type name 'EAGLContext'".

Screen Shot 2019-06-18 at 10 53 49 PM

Configuration

Mapbox SDK versions: 5.0.0
iOS/macOS versions: iOS 13b2 / macOS 10.15b2
Device/simulator models:
Xcode version: Xcode 11b2

[ios, macos] Evaluate effect of "outlining" on SDK size when building with Xcode 11

Evaluate effect of "outlining" on SDK size when building with Xcode 11:

From the Xcode 11 beta release notes:

The machine code outliner is on by default under -Oz. It reduces code size by identifying identical code sequences across functions. Such sequences are encapsulated (“outlined”) in a single compiler generated function. Each original code sequence is replaced with a call to that outlined function. (46385499)

snapshot not correct

Steps to reproduce

1.run the demo(iOS simulator) --> show Snapshots
2. some pictures are not show
3.

Expected behavior

Actual behavior

Configuration

Mapbox SDK versions:
iOS/macOS versions:
Device/simulator models:
Xcode version:

Setup CI

  • Check for existing references to mapbox-gl-native
  • Ensure Github checks are working as before Moved to #33
  • Setup Circle CI project (if necessary - assuming we can reuse)

ios platform HTTP load failed

Steps to reproduce

1.When I use ios platform, It can't access the network
2.HTTP load failed, 0/0 bytes (error code: -999 [1:89])
3.

Expected behavior

Actual behavior

Configuration

Mapbox SDK versions: 5.5.0-alpha.2
iOS/macOS versions:iOS13
Device/simulator models:
Xcode version: 11.1

UI API called on a background thread

Running app with basic implementation arise Main Thread Checker debugger, in particular on map transitions.

Crashlogs:

=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView setTransform:]
PID: 396, TID: 35638, Thread name: (none), Queue name: NSOperationQueue 0x133b125c0 (QOS: UNSPECIFIED), QoS: 0
Backtrace:
4   Mapbox                              0x0000000101343e48 -[MGLCompassButton updateCompassAnimated:] + 248
5   Mapbox                              0x00000001013670c4 -[MGLMapView updateCompass] + 44
6   Mapbox                              0x0000000101364878 -[MGLMapView cameraIsChanging] + 52
7   Mapbox                              0x00000001012f7af4 _ZN14MGLMapViewImpl18onCameraIsChangingEv + 36
8   Mapbox                              0x0000000101415380 _ZNSt3__110__function6__funcIZN4mbgl9Transform15startTransitionERKNS2_13CameraOptionsERKNS2_16AnimationOptionsENS_8functionIFvdEEERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEEE3$_5NS_9allocatorISK_EEFbNSD_10time_pointINSD_12steady_clockESH_EEEEclEOSP_ + 668
9   Mapbox                              0x0000000101411874 _ZN4mbgl3Map4Impl8onUpdateEv + 172
10  Mapbox                              0x00000001015522d4 _ZN4mbgl5style5Style4Impl8addLayerENSt3__110unique_ptrINS0_5LayerENS3_14default_deleteIS5_EEEENSt12experimental8optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEE + 1604
11  Mapbox                              0x000000010154e380 _ZN4mbgl5style5Style8addLayerENSt3__110unique_ptrINS0_5LayerENS2_14default_deleteIS4_EEEERKNSt12experimental8optionalINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEE + 68
12  Mapbox                              0x000000010137496c -[MGLStyleLayer addToStyle:belowLayer:] + 252
13  Mapbox                              0x000000010137c990 -[MGLStyle insertLayer:aboveLayer:] + 760
14  ProximiioMapbox                     0x0000000103b25d00 __swift_destroy_boxed_opaque_existential_0 + 61080
15  ProximiioMapbox                     0x0000000103b2551c __swift_destroy_boxed_opaque_existential_0 + 59060
16  ProximiioMapbox                     0x0000000103b26b68 __swift_destroy_boxed_opaque_existential_0 + 64768
17  ProximiioMapbox                     0x0000000103b27cf8 __swift_destroy_boxed_opaque_existential_0 + 69264
18  ProximiioMapbox                     0x0000000103b27ff8 __swift_destroy_boxed_opaque_existential_0 + 70032
19  ProximiioMapbox                     0x0000000103b12374 ProximiioMapbox + 25460
20  ProximiioMapbox                     0x0000000103b12438 ProximiioMapbox + 25656
21  CFNetwork                           0x00000001b1bdc2cc CFNetServiceBrowserSearchForServices + 93016
22  CFNetwork                           0x00000001b1bec800 _CFHTTPMessageSetResponseProxyURL + 9540
23  Foundation                          0x00000001aed8961c 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1132060
24  Foundation                          0x00000001aec933d8 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 123864
25  Foundation                          0x00000001aed8b8a4 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1140900
26  Foundation                          0x00000001aec93070 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 122992
27  Foundation                          0x00000001aed8c29c 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1143452
28  Foundation                          0x00000001aed8bd68 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1142120
29  libdispatch.dylib                   0x0000000103cdd298 _dispatch_block_async_invoke2 + 104
30  libdispatch.dylib                   0x0000000103ccec04 _dispatch_client_callout + 16
31  libdispatch.dylib                   0x0000000103cd1808 _dispatch_continuation_pop + 524
32  libdispatch.dylib                   0x0000000103cd0c88 _dispatch_async_redirect_invoke + 624
33  libdispatch.dylib                   0x0000000103ce0168 _dispatch_root_queue_drain + 376
34  libdispatch.dylib                   0x0000000103ce0a90 _dispatch_worker_thread2 + 156
35  libsystem_pthread.dylib             0x00000001ae6e1f64 _pthread_wqthread + 212
36  libsystem_pthread.dylib             0x00000001ae6e4ae0 start_wqthread + 8
2019-10-22 00:06:33.470533+0200 Management[396:35638] [reports] Main Thread Checker: UI API called on a background thread: -[UIView setTransform:]
PID: 396, TID: 35638, Thread name: (none), Queue name: NSOperationQueue 0x133b125c0 (QOS: UNSPECIFIED), QoS: 0
Backtrace:
4   Mapbox                              0x0000000101343e48 -[MGLCompassButton updateCompassAnimated:] + 248
5   Mapbox                              0x00000001013670c4 -[MGLMapView updateCompass] + 44
6   Mapbox                              0x0000000101364878 -[MGLMapView cameraIsChanging] + 52
7   Mapbox                              0x00000001012f7af4 _ZN14MGLMapViewImpl18onCameraIsChangingEv + 36
8   Mapbox                              0x0000000101415380 _ZNSt3__110__function6__funcIZN4mbgl9Transform15startTransitionERKNS2_13CameraOptionsERKNS2_16AnimationOptionsENS_8functionIFvdEEERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEEE3$_5NS_9allocatorISK_EEFbNSD_10time_pointINSD_12steady_clockESH_EEEEclEOSP_ + 668
9   Mapbox                              0x0000000101411874 _ZN4mbgl3Map4Impl8onUpdateEv + 172
10  Mapbox                              0x00000001015522d4 _ZN4mbgl5style5Style4Impl8addLayerENSt3__110unique_ptrINS0_5LayerENS3_14default_deleteIS5_EEEENSt12experimental8optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEE + 1604
11  Mapbox                              0x000000010154e380 _ZN4mbgl5style5Style8addLayerENSt3__110unique_ptrINS0_5LayerENS2_14default_deleteIS4_EEEERKNSt12experimental8optionalINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEE + 68
12  Mapbox                              0x000000010137496c -[MGLStyleLayer addToStyle:belowLayer:] + 252
13  Mapbox                              0x000000010137c990 -[MGLStyle insertLayer:aboveLayer:] + 760
14  ProximiioMapbox                     0x0000000103b25d00 __swift_destroy_boxed_opaque_existential_0 + 61080
15  ProximiioMapbox                     0x0000000103b2551c __swift_destroy_boxed_opaque_existential_0 + 59060
16  ProximiioMapbox                     0x0000000103b26b68 __swift_destroy_boxed_opaque_existential_0 + 64768
17  ProximiioMapbox                     0x0000000103b27cf8 __swift_destroy_boxed_opaque_existential_0 + 69264
18  ProximiioMapbox                     0x0000000103b27ff8 __swift_destroy_boxed_opaque_existential_0 + 70032
19  ProximiioMapbox                     0x0000000103b12374 ProximiioMapbox + 25460
20  ProximiioMapbox                     0x0000000103b12438 ProximiioMapbox + 25656
21  CFNetwork                           0x00000001b1bdc2cc CFNetServiceBrowserSearchForServices + 93016
22  CFNetwork                           0x00000001b1bec800 _CFHTTPMessageSetResponseProxyURL + 9540
23  Foundation                          0x00000001aed8961c 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1132060
24  Foundation                          0x00000001aec933d8 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 123864
25  Foundation                          0x00000001aed8b8a4 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1140900
26  Foundation                          0x00000001aec93070 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 122992
27  Foundation                          0x00000001aed8c29c 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1143452
28  Foundation                          0x00000001aed8bd68 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1142120
29  libdispatch.dylib                   0x0000000103cdd298 _dispatch_block_async_invoke2 + 104
30  libdispatch.dylib                   0x0000000103ccec04 _dispatch_client_callout + 16
31  libdispatch.dylib                   0x0000000103cd1808 _dispatch_continuation_pop + 524
32  libdispatch.dylib                   0x0000000103cd0c88 _dispatch_async_redirect_invoke + 624
33  libdispatch.dylib                   0x0000000103ce0168 _dispatch_root_queue_drain + 376
34  libdispatch.dylib                   0x0000000103ce0a90 _dispatch_worker_thread2 + 156
35  libsystem_pthread.dylib             0x00000001ae6e1f64 _pthread_wqthread + 212
36  libsystem_pthread.dylib             0x00000001ae6e4ae0 start_wqthread + 8
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView alpha]
PID: 396, TID: 35638, Thread name: (none), Queue name: NSOperationQueue 0x133b125c0 (QOS: UNSPECIFIED), QoS: 0
Backtrace:
4   Mapbox                              0x0000000101343ef4 -[MGLCompassButton updateCompassAnimated:] + 420
5   Mapbox                              0x00000001013670c4 -[MGLMapView updateCompass] + 44
6   Mapbox                              0x0000000101364878 -[MGLMapView cameraIsChanging] + 52
7   Mapbox                              0x00000001012f7af4 _ZN14MGLMapViewImpl18onCameraIsChangingEv + 36
8   Mapbox                              0x0000000101415380 _ZNSt3__110__function6__funcIZN4mbgl9Transform15startTransitionERKNS2_13CameraOptionsERKNS2_16AnimationOptionsENS_8functionIFvdEEERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEEE3$_5NS_9allocatorISK_EEFbNSD_10time_pointINSD_12steady_clockESH_EEEEclEOSP_ + 668
9   Mapbox                              0x0000000101411874 _ZN4mbgl3Map4Impl8onUpdateEv + 172
10  Mapbox                              0x00000001015522d4 _ZN4mbgl5style5Style4Impl8addLayerENSt3__110unique_ptrINS0_5LayerENS3_14default_deleteIS5_EEEENSt12experimental8optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEE + 1604
11  Mapbox                              0x000000010154e380 _ZN4mbgl5style5Style8addLayerENSt3__110unique_ptrINS0_5LayerENS2_14default_deleteIS4_EEEERKNSt12experimental8optionalINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEE + 68
12  Mapbox                              0x000000010137496c -[MGLStyleLayer addToStyle:belowLayer:] + 252
13  Mapbox                              0x000000010137c990 -[MGLStyle insertLayer:aboveLayer:] + 760
14  ProximiioMapbox                     0x0000000103b25d00 __swift_destroy_boxed_opaque_existential_0 + 61080
15  ProximiioMapbox                     0x0000000103b2551c __swift_destroy_boxed_opaque_existential_0 + 59060
16  ProximiioMapbox                     0x0000000103b26b68 __swift_destroy_boxed_opaque_existential_0 + 64768
17  ProximiioMapbox                     0x0000000103b27cf8 __swift_destroy_boxed_opaque_existential_0 + 69264
18  ProximiioMapbox                     0x0000000103b27ff8 __swift_destroy_boxed_opaque_existential_0 + 70032
19  ProximiioMapbox                     0x0000000103b12374 ProximiioMapbox + 25460
20  ProximiioMapbox                     0x0000000103b12438 ProximiioMapbox + 25656
21  CFNetwork                           0x00000001b1bdc2cc CFNetServiceBrowserSearchForServices + 93016
22  CFNetwork                           0x00000001b1bec800 _CFHTTPMessageSetResponseProxyURL + 9540
23  Foundation                          0x00000001aed8961c 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1132060
24  Foundation                          0x00000001aec933d8 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 123864
25  Foundation                          0x00000001aed8b8a4 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1140900
26  Foundation                          0x00000001aec93070 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 122992
27  Foundation                          0x00000001aed8c29c 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1143452
28  Foundation                          0x00000001aed8bd68 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1142120
29  libdispatch.dylib                   0x0000000103cdd298 _dispatch_block_async_invoke2 + 104
30  libdispatch.dylib                   0x0000000103ccec04 _dispatch_client_callout + 16
31  libdispatch.dylib                   0x0000000103cd1808 _dispatch_continuation_pop + 524
32  libdispatch.dylib                   0x0000000103cd0c88 _dispatch_async_redirect_invoke + 624
33  libdispatch.dylib                   0x0000000103ce0168 _dispatch_root_queue_drain + 376
34  libdispatch.dylib                   0x0000000103ce0a90 _dispatch_worker_thread2 + 156
35  libsystem_pthread.dylib             0x00000001ae6e1f64 _pthread_wqthread + 212
36  libsystem_pthread.dylib             0x00000001ae6e4ae0 start_wqthread + 8

2019-10-22 00:06:49.644350+0200 Management[396:35638] [reports] Main Thread Checker: UI API called on a background thread: -[UIView alpha]
PID: 396, TID: 35638, Thread name: (none), Queue name: NSOperationQueue 0x133b125c0 (QOS: UNSPECIFIED), QoS: 0
Backtrace:
4   Mapbox                              0x0000000101343ef4 -[MGLCompassButton updateCompassAnimated:] + 420
5   Mapbox                              0x00000001013670c4 -[MGLMapView updateCompass] + 44
6   Mapbox                              0x0000000101364878 -[MGLMapView cameraIsChanging] + 52
7   Mapbox                              0x00000001012f7af4 _ZN14MGLMapViewImpl18onCameraIsChangingEv + 36
8   Mapbox                              0x0000000101415380 _ZNSt3__110__function6__funcIZN4mbgl9Transform15startTransitionERKNS2_13CameraOptionsERKNS2_16AnimationOptionsENS_8functionIFvdEEERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEEE3$_5NS_9allocatorISK_EEFbNSD_10time_pointINSD_12steady_clockESH_EEEEclEOSP_ + 668
9   Mapbox                              0x0000000101411874 _ZN4mbgl3Map4Impl8onUpdateEv + 172
10  Mapbox                              0x00000001015522d4 _ZN4mbgl5style5Style4Impl8addLayerENSt3__110unique_ptrINS0_5LayerENS3_14default_deleteIS5_EEEENSt12experimental8optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEE + 1604
11  Mapbox                              0x000000010154e380 _ZN4mbgl5style5Style8addLayerENSt3__110unique_ptrINS0_5LayerENS2_14default_deleteIS4_EEEERKNSt12experimental8optionalINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEE + 68
12  Mapbox                              0x000000010137496c -[MGLStyleLayer addToStyle:belowLayer:] + 252
13  Mapbox                              0x000000010137c990 -[MGLStyle insertLayer:aboveLayer:] + 760
14  ProximiioMapbox                     0x0000000103b25d00 __swift_destroy_boxed_opaque_existential_0 + 61080
15  ProximiioMapbox                     0x0000000103b2551c __swift_destroy_boxed_opaque_existential_0 + 59060
16  ProximiioMapbox                     0x0000000103b26b68 __swift_destroy_boxed_opaque_existential_0 + 64768
17  ProximiioMapbox                     0x0000000103b27cf8 __swift_destroy_boxed_opaque_existential_0 + 69264
18  ProximiioMapbox                     0x0000000103b27ff8 __swift_destroy_boxed_opaque_existential_0 + 70032
19  ProximiioMapbox                     0x0000000103b12374 ProximiioMapbox + 25460
20  ProximiioMapbox                     0x0000000103b12438 ProximiioMapbox + 25656
21  CFNetwork                           0x00000001b1bdc2cc CFNetServiceBrowserSearchForServices + 93016
22  CFNetwork                           0x00000001b1bec800 _CFHTTPMessageSetResponseProxyURL + 9540
23  Foundation                          0x00000001aed8961c 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1132060
24  Foundation                          0x00000001aec933d8 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 123864
25  Foundation                          0x00000001aed8b8a4 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1140900
26  Foundation                          0x00000001aec93070 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 122992
27  Foundation                          0x00000001aed8c29c 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1143452
28  Foundation                          0x00000001aed8bd68 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1142120
29  libdispatch.dylib                   0x0000000103cdd298 _dispatch_block_async_invoke2 + 104
30  libdispatch.dylib                   0x0000000103ccec04 _dispatch_client_callout + 16
31  libdispatch.dylib                   0x0000000103cd1808 _dispatch_continuation_pop + 524
32  libdispatch.dylib                   0x0000000103cd0c88 _dispatch_async_redirect_invoke + 624
33  libdispatch.dylib                   0x0000000103ce0168 _dispatch_root_queue_drain + 376
34  libdispatch.dylib                   0x0000000103ce0a90 _dispatch_worker_thread2 + 156
35  libsystem_pthread.dylib             0x00000001ae6e1f64 _pthread_wqthread + 212
36  libsystem_pthread.dylib             0x00000001ae6e4ae0 start_wqthread + 8

2019-10-22 00:06:49.637811+0200 Management[396:35635] [] tcp_input [C11.1:3] flags=[R] seq=396099860, ack=0, win=0 state=LAST_ACK rcv_nxt=396099860, snd_una=791954654
2019-10-22 00:06:49.649807+0200 Management[396:35635] [] tcp_input [C11.1:3] flags=[R] seq=396099860, ack=0, win=0 state=CLOSED rcv_nxt=396099860, snd_una=791954654
=================================================================
Main Thread Checker: UI API called on a background thread: -[UIView isHidden]
PID: 396, TID: 35638, Thread name: (none), Queue name: NSOperationQueue 0x133b125c0 (QOS: UNSPECIFIED), QoS: 0
Backtrace:
4   Mapbox                              0x000000010136712c -[MGLMapView updateScaleBar] + 64
5   Mapbox                              0x0000000101364888 -[MGLMapView cameraIsChanging] + 68
6   Mapbox                              0x00000001012f7af4 _ZN14MGLMapViewImpl18onCameraIsChangingEv + 36
7   Mapbox                              0x0000000101415380 _ZNSt3__110__function6__funcIZN4mbgl9Transform15startTransitionERKNS2_13CameraOptionsERKNS2_16AnimationOptionsENS_8functionIFvdEEERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEEE3$_5NS_9allocatorISK_EEFbNSD_10time_pointINSD_12steady_clockESH_EEEEclEOSP_ + 668
8   Mapbox                              0x0000000101411874 _ZN4mbgl3Map4Impl8onUpdateEv + 172
9   Mapbox                              0x00000001015522d4 _ZN4mbgl5style5Style4Impl8addLayerENSt3__110unique_ptrINS0_5LayerENS3_14default_deleteIS5_EEEENSt12experimental8optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEE + 1604
10  Mapbox                              0x000000010154e380 _ZN4mbgl5style5Style8addLayerENSt3__110unique_ptrINS0_5LayerENS2_14default_deleteIS4_EEEERKNSt12experimental8optionalINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEE + 68
11  Mapbox                              0x000000010137496c -[MGLStyleLayer addToStyle:belowLayer:] + 252
12  Mapbox                              0x000000010137c990 -[MGLStyle insertLayer:aboveLayer:] + 760
13  ProximiioMapbox                     0x0000000103b25d00 __swift_destroy_boxed_opaque_existential_0 + 61080
14  ProximiioMapbox                     0x0000000103b2551c __swift_destroy_boxed_opaque_existential_0 + 59060
15  ProximiioMapbox                     0x0000000103b26b68 __swift_destroy_boxed_opaque_existential_0 + 64768
16  ProximiioMapbox                     0x0000000103b27cf8 __swift_destroy_boxed_opaque_existential_0 + 69264
17  ProximiioMapbox                     0x0000000103b27ff8 __swift_destroy_boxed_opaque_existential_0 + 70032
18  ProximiioMapbox                     0x0000000103b12374 ProximiioMapbox + 25460
19  ProximiioMapbox                     0x0000000103b12438 ProximiioMapbox + 25656
20  CFNetwork                           0x00000001b1bdc2cc CFNetServiceBrowserSearchForServices + 93016
21  CFNetwork                           0x00000001b1bec800 _CFHTTPMessageSetResponseProxyURL + 9540
22  Foundation                          0x00000001aed8961c 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1132060
23  Foundation                          0x00000001aec933d8 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 123864
24  Foundation                          0x00000001aed8b8a4 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1140900
25  Foundation                          0x00000001aec93070 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 122992
26  Foundation                          0x00000001aed8c29c 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1143452
27  Foundation                          0x00000001aed8bd68 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1142120
28  libdispatch.dylib                   0x0000000103cdd298 _dispatch_block_async_invoke2 + 104
29  libdispatch.dylib                   0x0000000103ccec04 _dispatch_client_callout + 16
30  libdispatch.dylib                   0x0000000103cd1808 _dispatch_continuation_pop + 524
31  libdispatch.dylib                   0x0000000103cd0c88 _dispatch_async_redirect_invoke + 624
32  libdispatch.dylib                   0x0000000103ce0168 _dispatch_root_queue_drain + 376
33  libdispatch.dylib                   0x0000000103ce0a90 _dispatch_worker_thread2 + 156
34  libsystem_pthread.dylib             0x00000001ae6e1f64 _pthread_wqthread + 212
35  libsystem_pthread.dylib             0x00000001ae6e4ae0 start_wqthread + 8
2019-10-22 00:06:50.089698+0200 Management[396:35638] [reports] Main Thread Checker: UI API called on a background thread: -[UIView isHidden]
PID: 396, TID: 35638, Thread name: (none), Queue name: NSOperationQueue 0x133b125c0 (QOS: UNSPECIFIED), QoS: 0
Backtrace:
4   Mapbox                              0x000000010136712c -[MGLMapView updateScaleBar] + 64
5   Mapbox                              0x0000000101364888 -[MGLMapView cameraIsChanging] + 68
6   Mapbox                              0x00000001012f7af4 _ZN14MGLMapViewImpl18onCameraIsChangingEv + 36
7   Mapbox                              0x0000000101415380 _ZNSt3__110__function6__funcIZN4mbgl9Transform15startTransitionERKNS2_13CameraOptionsERKNS2_16AnimationOptionsENS_8functionIFvdEEERKNS_6chrono8durationIxNS_5ratioILl1ELl1000000000EEEEEE3$_5NS_9allocatorISK_EEFbNSD_10time_pointINSD_12steady_clockESH_EEEEclEOSP_ + 668
8   Mapbox                              0x0000000101411874 _ZN4mbgl3Map4Impl8onUpdateEv + 172
9   Mapbox                              0x00000001015522d4 _ZN4mbgl5style5Style4Impl8addLayerENSt3__110unique_ptrINS0_5LayerENS3_14default_deleteIS5_EEEENSt12experimental8optionalINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEEE + 1604
10  Mapbox                              0x000000010154e380 _ZN4mbgl5style5Style8addLayerENSt3__110unique_ptrINS0_5LayerENS2_14default_deleteIS4_EEEERKNSt12experimental8optionalINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEEE + 68
11  Mapbox                              0x000000010137496c -[MGLStyleLayer addToStyle:belowLayer:] + 252
12  Mapbox                              0x000000010137c990 -[MGLStyle insertLayer:aboveLayer:] + 760
13  ProximiioMapbox                     0x0000000103b25d00 __swift_destroy_boxed_opaque_existential_0 + 61080
14  ProximiioMapbox                     0x0000000103b2551c __swift_destroy_boxed_opaque_existential_0 + 59060
15  ProximiioMapbox                     0x0000000103b26b68 __swift_destroy_boxed_opaque_existential_0 + 64768
16  ProximiioMapbox                     0x0000000103b27cf8 __swift_destroy_boxed_opaque_existential_0 + 69264
17  ProximiioMapbox                     0x0000000103b27ff8 __swift_destroy_boxed_opaque_existential_0 + 70032
18  ProximiioMapbox                     0x0000000103b12374 ProximiioMapbox + 25460
19  ProximiioMapbox                     0x0000000103b12438 ProximiioMapbox + 25656
20  CFNetwork                           0x00000001b1bdc2cc CFNetServiceBrowserSearchForServices + 93016
21  CFNetwork                           0x00000001b1bec800 _CFHTTPMessageSetResponseProxyURL + 9540
22  Foundation                          0x00000001aed8961c 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1132060
23  Foundation                          0x00000001aec933d8 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 123864
24  Foundation                          0x00000001aed8b8a4 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1140900
25  Foundation                          0x00000001aec93070 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 122992
26  Foundation                          0x00000001aed8c29c 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1143452
27  Foundation                          0x00000001aed8bd68 0DF2911E-80CB-3289-8A1E-ED0913D55A12 + 1142120
28  libdispatch.dylib                   0x0000000103cdd298 _dispatch_block_async_invoke2 + 104
29  libdispatch.dylib                   0x0000000103ccec04 _dispatch_client_callout + 16
30  libdispatch.dylib                   0x0000000103cd1808 _dispatch_continuation_pop + 524
31  libdispatch.dylib                   0x0000000103cd0c88 _dispatch_async_redirect_invoke + 624
32  libdispatch.dylib                   0x0000000103ce0168 _dispatch_root_queue_drain + 376
33  libdispatch.dylib                   0x0000000103ce0a90 _dispatch_worker_thread2 + 156
34  libsystem_pthread.dylib             0x00000001ae6e1f64 _pthread_wqthread + 212
35  libsystem_pthread.dylib             0x00000001ae6e4ae0 start_wqthread + 8

Expected behavior

UI should not be called in background.

Actual behavior

Debugger blocks app flow

Configuration

Mapbox SDK versions: 5.4
iOS/macOS versions: 13.1.2
Device/simulator models: iPhone 7 Plus (real device) or iPhone 11 Max Pro (simulator)
Xcode version: 11.1

Crash when application resigns active and enters background while map view animates — CPU access for textures with MTLResourceStorageModePrivate storage mode is disallowed

Steps to reproduce

  1. Map running normally on the phone
  2. Locking the phone

The above steps reproduce the bug, however not consistently.

Expected behavior

  • No crash

Actual behavior

  • The crash seen below.

Configuration

mapbox 5.4.0
iOS 13.1.2
iphone 8
xcode 11.1

Trace console:
_validateGetBytes:29: failed assertion `CPU access for textures with MTLResourceStorageModePrivate storage mode is disallowed.'

Thread crash message:
mapbox/mapbox-gl-native#11 0x0000000104a94490 in ::-[MGLMapView willResignActive:](NSNotification *) at /Users/distiller/project/platform/ios/src/MGLMapView.mm:1341

Trace from Xcode:
Mapbox`::-[MGLMapView willResignActive:](NSNotification *):

  1. 0x104a94458 <+0>: stp x20, x19, [sp, #-0x20]!
  2. 0x104a9445c <+4>: stp x29, x30, [sp, #0x10]
  3. 0x104a94460 <+8>: add x29, sp, #0x10 ; =0x10
  4. 0x104a94464 <+12>: mov x19, x0
  5. 0x104a94468 <+16>: adrp x8, 832
  6. 0x104a9446c <+20>: ldr x1, [x8, #0x6d8]
  7. 0x104a94470 <+24>: bl 0x104cf65e4 ; symbol stub for: objc_msgSend
  8. 0x104a94474 <+28>: tbnz w0, #0x0, 0x104a944d0 ; <+120> at MGLMapView.mm:1350:1
  9. 0x104a94478 <+32>: adrp x8, 834
  10. 0x104a9447c <+36>: ldrsw x8, [x8, #0x6b4]
  11. 0x104a94480 <+40>: ldr x0, [x19, x8]
  12. 0x104a94484 <+44>: ldr x8, [x0]
  13. 0x104a94488 <+48>: ldr x8, [x8, #0xc8]
  14. 0x104a9448c <+52>: blr x8
  15. -> 0x104a94490 <+56>: bl 0x104cf662c ; symbol stub for: objc_retainAutoreleasedReturnValue
  16. 0x104a94494 <+60>: mov x20, x0
  17. 0x104a94498 <+64>: adrp x8, 832
  18. 0x104a9449c <+68>: ldr x1, [x8, #0x728]
  19. 0x104a944a0 <+72>: mov x0, x19
  20. 0x104a944a4 <+76>: mov x2, x20
  21. 0x104a944a8 <+80>: bl 0x104cf65e4 ; symbol stub for: objc_msgSend
  22. 0x104a944ac <+84>: mov x0, x20
  23. 0x104a944b0 <+88>: bl 0x104cf65fc ; symbol stub for: objc_release
  24. 0x104a944b4 <+92>: adrp x8, 834
  25. 0x104a944b8 <+96>: ldrsw x8, [x8, #0x6b8]
  26. 0x104a944bc <+100>: ldr x8, [x19, x8]
  27. 0x104a944c0 <+104>: cbz x8, 0x104a944d0 ; <+120> at MGLMapView.mm:1350:1
  28. 0x104a944c4 <+108>: ldr x0, [x8, #0x8]
  29. 0x104a944c8 <+112>: cbz x0, 0x104a944d0 ; <+120> at MGLMapView.mm:1350:1
  30. 0x104a944cc <+116>: bl 0x104bd77ac ; mbgl::Renderer::reduceMemoryUse at renderer.cpp:118
  31. 0x104a944d0 <+120>: ldp x29, x30, [sp, #0x10]
  32. 0x104a944d4 <+124>: ldp x20, x19, [sp], #0x20
  33. 0x104a944d8 <+128>: ret
  34. 0x104a944dc <+132>: mov x19, x0
  35. 0x104a944e0 <+136>: mov x0, x20
  36. 0x104a944e4 <+140>: bl 0x104cf65fc ; symbol stub for: objc_release
  37. 0x104a944e8 <+144>: b 0x104a944f0 ; <+152> at MGLMapView.mm
  38. 0x104a944ec <+148>: mov x19, x0
  39. 0x104a944f0 <+152>: mov x0, x19
  40. 0x104a944f4 <+156>: bl 0x104cf587c ; symbol stub for: _Unwind_Resume
  41. 0x104a944f8 <+160>: brk #0x1

From the ips file on the phone:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 0

Thread 0 name: Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001960d0ebc __pthread_kill + 8
1 libsystem_pthread.dylib 0x0000000195ff0c1c pthread_kill$VARIANT$armv81 + 192
2 libsystem_c.dylib 0x0000000195f408a0 __abort + 112
3 libsystem_c.dylib 0x0000000195f40830 __abort + 0
4 libsystem_c.dylib 0x0000000195f3fbf0 __assert_rtn + 204
5 Metal 0x00000001a9d7ed78 MTLIOAccelCommandBufferStorageGrowSegmentList.cold.1 + 0
6 Metal 0x00000001a9d6aecc MTLReportFailure + 476
7 MetalTools 0x00000001c4b97c70 _validateGetBytes+ 629872 (MTLDebugTexture*, MTLOrigin, MTLSize, unsigned long, unsigned long, void*, unsigned long, unsigned long, unsigned long) + 156
8 MetalTools 0x00000001c4b97b0c -[MTLDebugTexture getBytes:bytesPerRow:bytesPerImage:fromRegion:mipmapLevel:slice:] + 148
9 AppleMetalGLRenderer 0x00000001b0429748 gldReadFramebufferData + 1248
10 GLEngine 0x00000001b0370044 glReadPixels_Exec + 960
11 GLKit 0x00000001bebce9e4 -[GLKView snapshot] + 248
12 Mapbox 0x000000010129033c -[MGLMapView willResignActive:] + 541500 (MGLMapView.mm:1397)
13 CoreFoundation 0x000000019623409c CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 20
14 CoreFoundation 0x00000001962340e4 ___CFXRegistrationPost1_block_invoke + 64
15 CoreFoundation 0x0000000196233444 _CFXRegistrationPost1 + 368
16 CoreFoundation 0x00000001962330fc ___CFXNotificationPost_block_invoke + 104
17 CoreFoundation 0x00000001961af43c -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1416
18 CoreFoundation 0x0000000196232a4c _CFXNotificationPost + 1244
19 Foundation 0x000000019658f2d8 -[NSNotificationCenter postNotificationName:object:userInfo:] + 60
20 UIKitCore 0x000000019a2db698 -[UIApplication _deactivateForReason:notify:] + 832
21 UIKitCore 0x0000000199ac176c __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke_2 + 984
22 UIKitCore 0x0000000199f513ec _UIScenePerformActionsWithLifecycleActionMask + 100
23 UIKitCore 0x0000000199ac12f8 __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 196
24 UIKitCore 0x0000000199ac0e04 -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 476
25 UIKitCore 0x0000000199ac1124 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 736
26 UIKitCore 0x0000000199ac09e0 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 336
27 UIKitCore 0x0000000199ac4efc __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke_2 + 188
28 UIKitCore 0x0000000199e84028 +[BSAnimationSettings+ 5824552 (UIKit) tryAnimatingWithSettings:actions:completion:] + 824
29 UIKitCore 0x0000000199f6a5ac _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 244
30 UIKitCore 0x0000000199ac4c34 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke + 136
31 UIKitCore 0x0000000199f6a4a8 _UISceneSettingsDiffActionPerformActionsWithDelayForTransitionContext + 100
32 UIKitCore 0x0000000199ac4aa0 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 376
33 UIKitCore 0x0000000199939efc __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke + 636
34 UIKitCore 0x0000000199938a64 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 248
35 UIKitCore 0x0000000199939c34 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 220
36 UIKitCore 0x0000000199ea4e7c -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 464
37 FrontBoardServices 0x000000019b37243c -[FBSSceneImpl updater:didUpdateSettings:withDiff:transitionContext:completion:] + 544
38 FrontBoardServices 0x000000019b396e50 __88-[FBSWorkspaceScenesClient sceneID:updateWithSettingsDiff:transitionContext:completion:]_block_invoke_2 + 120
39 FrontBoardServices 0x000000019b37c0f8 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 232
40 FrontBoardServices 0x000000019b396d84 __88-[FBSWorkspaceScenesClient sceneID:updateWithSettingsDiff:transitionContext:completion:]_block_invoke + 184
41 libdispatch.dylib 0x0000000101016c04 0x101014000 + 11268
42 libdispatch.dylib 0x000000010101a028 0x101014000 + 24616
43 FrontBoardServices 0x000000019b3bb540 FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK + 40
44 FrontBoardServices 0x000000019b3bb20c -[FBSSerialQueue _queue_performNextIfPossible] + 404
45 FrontBoardServices 0x000000019b3bb734 -[FBSSerialQueue _performNextFromRunLoopSource] + 28
46 CoreFoundation 0x00000001962567e0 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 24
47 CoreFoundation 0x0000000196256738 __CFRunLoopDoSource0 + 80
48 CoreFoundation 0x0000000196255f20 __CFRunLoopDoSources0 + 260
49 CoreFoundation 0x000000019625101c __CFRunLoopRun + 1080
50 CoreFoundation 0x00000001962508bc CFRunLoopRunSpecific + 464
51 GraphicsServices 0x00000001a00bc328 GSEventRunModal + 104
52 UIKitCore 0x000000019a2e66d4 UIApplicationMain + 1936
53 LINC 0x0000000100c8e4c8 0x100c24000 + 435400
54 libdyld.dylib 0x00000001960db460 start + 4

Test map views within different view controller hierarchies

We should include more integration tests to monitor how MGLMapView interacts within different view and view controller hierarchies. These tests will live in the Integration Test Harness.

The tests should measure MGLMapView performance:

  • Within a UITabBarController, UIScrollView, UITableViewController, modally presented view controller and UINavigationBarController.
  • Present a modal view controller over the map view.
  • As a view that gets larger/smaller based on an action.
  • Under a drawer view.

As part of this work, we should also look at subviews within MGLMapView, such as custom annotation views and the attribution button.

The tests on the map view itself will be consistent for the most part. Some ideas for things to test:

  • Toggle quickly between two view controllers (@captainbarbosa's automated repro of mapbox/mapbox-gl-native#14232)
  • Measure map performance before and after switching view controllers.
  • Selecting/deselecting annotations.
  • Changing the map's center.
  • Beginning an annotation animation before switching view controllers.

Related: mapbox/mapbox-gl-native#14516

cc @julianrex @chloekraw

Replace GLKView with CAEAGLLayer

MGLMapView should set its layer to a CAEAGLLayer instead of embedding the GLKView.

The iOS implementation of MGLMapView embeds a GLKView, whereas the macOS implementation sets the MGLMapView’s own layer to an NSOpenGLLayer. The macOS implementation is more elegant than the iOS implementation. For example, there are no constraints to manage, so mapbox/mapbox-gl-native#4352 less visually jarring. The performance is likely better when view-backed annotations and tint colors are in use.

NSOpenGLLayer has no equivalent on iOS, but NSOpenGLLayer is only a lightweight wrapper around CAOpenGLLayer that uses AppKit types. The iOS equivalent to CAOpenGLLayer is CAEAGLLayer. Although the two classes aren’t identical, standardizing on a single architecture would let us unify some of the frontend rendering code.

/cc @julianrex @kkaefer

Documentation

  • Update help pages - PR open
  • Update website docs - PR open
    - [ ] Update ios-sdk-examples
  • Update mapbox-gl-native-ios
    - [ ] Any other repos?

For the Migrate bindings milestone, we should create the PRs, but not merge them. This needs to wait till the repo is open.

Problem resizing MGLMapView with constraints

My iOS app has a tab bar controller and two view controllers. One of the view controllers displays my Mapbox map which is initially constrained to the safe area layout guide at the top and the bottom of the screen. I've added a button that can be tapped on and when this occurs, I want to shrink (and animate) the height of the map so I can add a new view below it.

For the most part, this appears to be working as I expected but as you can see in the image below, when I tap the button and call updateConstraintsButtonTapped(sender:), the map view does re-size but while doing so, the map slides down (very quickly) from the top of the screen before sliding back up and resizing. I'd like the top of the map to stay pinned to the safe area layout guide and only see the bottom of the map view move when the resize occurs. I also noticed that when the resize occurs, the mapbox logo and attribution info button appear to slide up to "catch up" with the rest of the map. In the code below (and reflected in the image), I have the animation duration set to 0.33 but changing this to a longer value (like 3.0) makes the behavior much more apparent.

Here's what I'm seeing:

Here's the code I am currently using:

import Mapbox

class MapViewController: UIViewController {

    private var mapView = MGLMapView()
    private var button = UIButton()
    private var heightConstraint: NSLayoutConstraint!    
    private var mapCollapsed: Bool = false

    override func viewDidLoad() {
        super.viewDidLoad()
        mapView.translatesAutoresizingMaskIntoConstraints = false
        mapView.styleURL = URL(string: Constants.MapStyleUrlAsString)!
        view.addSubview(mapView)

        NSLayoutConstraint.activate([
            mapView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
            mapView.trailingAnchor.constraint(equalTo: view.trailingAnchor)
        ])

        let mapViewTopConstraint = NSLayoutConstraint(item: mapView, attribute: .top, relatedBy: .equal, toItem: view.safeAreaLayoutGuide, attribute: .top, multiplier: 1.0, constant: 0)
        mapViewTopConstraint.isActive = true

        heightConstraint = NSLayoutConstraint(item: mapView, attribute: .bottom, relatedBy: .equal, toItem: view.safeAreaLayoutGuide, attribute: .bottom, multiplier: 1.0, constant: 0)
        heightConstraint.isActive = true

        setupButton() // omitted for brevity
    }

    @objc func updateConstraintsButtonTapped(sender: UIButton!) {
        if mapCollapsed == false {
            mapCollapsed = true
            view.layoutIfNeeded()
            UIView.animate(withDuration: 0.33, delay: 0.0, options: [.curveEaseOut], animations: {
                self.heightConstraint.constant = -150
                self.view.layoutIfNeeded()
            })
        } else {
            mapCollapsed = false
            view.layoutIfNeeded()
            UIView.animate(withDuration: 0.33, delay: 0.0, options: [.curveEaseOut], animations: {
                self.heightConstraint.constant = 0
                self.view.layoutIfNeeded()
            })
        }
}

I tried posting this at StackOverflow but after a week, I had only gotten a couple of comments suggesting that it may be a bug in Mapbox so I thought I'd ask here. For what it's worth, I'm using the Mapbox iOS SDK v5.4.0, Xcode 11.1 and I've tried running this code both in simulators and on a couple of iPhones (XS Max, iPhone 11).

[build] Fix CI job skipping

CI job skipping is broken, perhaps meaning that our custom CIRCLE_MERGE_BASE envvar isn’t available yet:

You must specify a range of commits to check for changed files in as a parameter or environment variable.

Disabled in #13.

Refactor iosapp to remove/reorganize debug cases

We've accumulated a wide variety of debug code in iosapp over the years, much of which is no longer relevant or well-used. Where desirable, we should:

  • Move blocks of code out into tests.
  • Move remaining non-global groups of code (think DDS) into their own separate view controllers.
  • Make globally-useful debug options accessible from any view controller. (Think map info hud, core debug options.)

Sangria Distribution / Release

  • Update Carthage
  • Update Cocoapods
  • Update release scripts / ensure upload to S3 works
  • Ensure all workflows (related to alpha, beta, stable releases) pass
  • Migrate old releases. No - see #31

Issues/Proposals on Ornament Margins: (Follow on #13911)

Tested the new ornament margins provided by mapbox/mapbox-gl-native#13911 (after opening mapbox/mapbox-gl-native#14487)

Have two "issue":

  1. I would like to reset the margin to their default value at one point. There is currently no way of doing that.

Proposed Solution:

  1. Do you see advantage of providing a accessory method to set the contentInset of the map and the margin for all ornaments at the same time, in case some views are covering the map?

I currently do something like:

func configure(mapContentInset: UIEdgeInsets) {
        mapView.contentInset = mapContentInset
       
        // Scale Bar is on top-left corner (MGLOrnamentPositionTopLeft)
        mapView.scaleBarMargins = CGPoint(x: mapContentInset.left, y: mapContentInset.top)
        
        // Compass View is on top-right corner (MGLOrnamentPositionTopRight)
        mapView.compassViewMargins = CGPoint(x: mapContentInset.right, y: mapContentInset.top)
        
    }

Adding annotation at south pole, triggers CALayer exception.

Platform: iOS

Steps to trigger behavior

  1. Add an annotation at the south pole

    MGLTestAnnotation *annotation = [[MGLTestAnnotation alloc] init];
    annotation.coordinate = CLLocationCoordinate2DMake(-90.0,0.0);
    [mapView addAnnotation:annotation];
    
  2. This triggers a CALayer exception: CALayer position contains NaN: [nan nan]

  3. I have added a test branch, and a test case (testAddAnnotationWithBoundaryCoordinates) to reproduce this:
    https://github.com/mapbox/mapbox-gl-native/tree/jrex-addAnnotation-boundary-coords

Expected behavior

It makes sense that the south pole should be an invalid coordinate for projections, but in that case:

  1. addAnnotation itself should fail with a friendlier message, and disallow adding the annotation.

  2. Shouldn't the north pole (+90°, 0) also fail? Currently it does not.

  3. addAnnotation calls through to -[MGLMapView convertCoordinate:toPointToView:] which checks the coordinate with CLLocationCoordinate2DIsValid which is true for both the north and south pole. Perhaps we need to replace usage of this with an MGL version that considers both poles?

/cc @asheemmamoowala

Integrate Submodules

  • Add gl-native: #12 - remember to modify the readme, and PR comment with the Git sha of the mapbox-gl-native submodule.
  • Add Telemetry SDK Moved to #29
  • Add Accounts SDK
  • Switch makefile to use "new" build system Create makefile at root of repo, that calls new build system.
  • Generate gl-native Xcode project (make iproj should now remain the same)
  • Build empty framework with gl-native & telemetry (telemetry include as currently)
  • How to handle platform files in gl-native that include platform files in new repo 😢 Moved to #51
  • Related: How to split darwin files (and which ones) Moved to #51
    • http_file_source.mm - we'll need some kind of delegate mechanism here
    • replace MGLLog macros with mbgl::Log equivalents.
  • Ensure that mapbox-gl-native's makefile continues to function as expected for all platforms. Makefile is being removed.

[iOS] Heading generate delay movement

Seems didUpdate: heading introduces delay in rendering from didUpdate: location.
Looking at code https://github.com/mapbox/mapbox-gl-native/blob/5c565a5e51be8379ddc2ffb5c859d8cfebe2fcd5/platform/ios/src/MGLMapView.mm#L5954 seems that once heading update has been called, this make a call for location too and this override the list of the location submit so far.

This is like kinda increasing the queue of the position and generate delayed movement.
The more you move the heading the more delays you get in movement of location.

Steps to reproduce

  1. Activate heading and move with a location manager for position

Expected behavior

Heading should react, but not generate delays on lat/lon.

Actual behavior

Heading is like flooding the lat/lon and movements are delayed

Configuration

Mapbox SDK versions: 5.4
iOS/macOS versions: 13.1
Device/simulator models: Simulator and Device
Xcode version: 11.1

MapBox on Simulator extremely slow on Xcode 10

Hello!

I noticed similar issues opened for Xcode 9 (like mapbox/mapbox-gl-native#10199).
I nearly can't use the map in the simulator.

I would like to know if this is a known issue, some settings I need to configure or something else.

I included the map in a view controller:

class MapViewController: UIViewController {

private lazy var mapView: MGLMapView = {
        let mapView = MGLMapView(frame: view.bounds, styleURL: mapBoxUrl)
        mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
        // Set the map view's delegate
        mapView.delegate = self
        view.addSubview(mapView)
        return mapView
    }()
}

and the entire controller containing the map is included in another controller via child-parent connection:

func add(child: UIViewController, to parent: UIViewController) {
        parent.addChild(child)
        parent.view.addSubview(child.view)
        child.didMove(toParent: parent)
    }


extension ContainerViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        add(child: mapViewController, to: self)
        
        
    }
}

Configuration

  • Mapbox SDK version: Mapbox-iOS-SDK (4.9.0)
  • iOS version: 12.1
  • macOS version: 10.14.3 (18D109)
  • Device/simulator models: iPhone XR
  • Xcode version: Version 10.1 (10B61)

Thanks

Migrate to new repo

  • Add initial history/ref to gl-native: See WIP #12
  • Copy platform code/scripts to new repo (include macOS)
  • Update DEVELOPING/CONTRIBUTING/README/LICENSE
  • Update Github project settings (PR rules)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.