Commit Graph

24 Commits

Author SHA1 Message Date
Jesse Bounds
2e3145db47 Replace embedded telem implementation with mapbox-mobile-events library (#10698)
* [ios] Introduce mobile events dependency

This adds the mobile events dependency including the events library's namespaced header file so that the related compiled symbols are prefixed to make them specific to the maps SDK. A pre-compiled header file is added so that the namespaced header file is added in all places where it is needed (most importantly every events library file).

* [ios] Use new events library for telemetry events

This makes the following significant changes:

Refactors the MGLMapboxEvents singleton to delegate internally to an instance of MMEEventsManager that it keeps for itself. The MGLMapboxEvents public API is refactored to reflect this. Note: MGLMapboxEvents continues to handle checking for opt out

Uses that new events API in MGLMapboxEvents to send all telem events (and turnstile)

All embedded certs are removed since the new telem library uses public key info pinning

Legacy telemetry utility classes for location and networking are removed since those are implemented in the telem library

* [ios] Update submodules initialized by cmake

We no longer bring in SMCalloutView as a submodule so it is removed.
We now vendor the telemetry events library as a submodule so it is added.

* Update mapbox-mobile-events

* Update mobile events lib

* Set events options with MGL user defaults values

For options that historically could be set with user defaults in the Maps SDK, collect them and set the appropriate property values in the new events library.

Also, check the existence of two new optional configuration values MGLTelemetryAccessToken and MGLTelemetryBaseURL so that the events endpoint and access token can be configured and the access token can easily be set dynamically and apart from the access token for the maps API.

MGLTelemetryBaseURL replaces the legacy MGLTelemetryTestServerURL. This is ok because this value was never intended to be used by client applications. The new name better reflects the fact that the URL can be changed to any backend stack, not just a test server.

Because it is possible for the configuration values to be read from user defaults before the events manager is fully set up, this also adds a local cache for the baseURL and accessToken values so that they can be stored and applied once it is time to setup the the events manager.

* Update mapbox-mobile-events

mapbox-mobile-events was forced pushed to include https://github.com/mapbox/mapbox-events-ios/pull/28

* Rename MGLMapboxEvents singleton access method

Manager is not in the name of the class. Just call it an instance.

* Update mapbox-mobile-events

* Add comments about config value loading

* Guard against creating events for IB

* Refactor user defaults update handler

This updates the handling logic for user defaults to break apart config changes that require a check for pausing or resuming the events lib’s telemetry collection from config changes that can happen with no update to the pause/resume state.

It also ports the optimization from https://github.com/mapbox/mapbox-gl-native/pull/10803 so that the call to pause and resume is not performed unless the user defaults store has new values that have not yet been applied to the events library.

* Update mapbox-mobile-events

* Rename events submodule folder

* Fix incorrect events library refs

* Update mapbox-mobile-events

* Update user user agent id value

This value aligns with our schme of {source-sdk-platform} and will be used by the events library in the user agent and vendorid.

* Update mapbox-mobile-events

Pin to v3.0.0 (d522b18)

* Improve code comments

* [ios] Fixed a broken file reference to MGLTelemetryConfig.
2018-02-20 09:54:11 -05:00
Jason Wray
5cefa51511 [ios] Rename SMCalloutView and stop using submodule 2017-10-11 12:21:27 -07:00
Konstantin Käfer
bb931505c5 [build] Remove Mason submodule in favor of CMake mason 2017-02-08 19:07:16 +01:00
John Firebaugh
c68e327e86 [build] Use https for mapbox-gl-js submodule
This allows pushing directly from the submodule, if you have https authentication set up.
2017-01-25 19:01:35 -06:00
John Firebaugh
317b2bf42f [build] Use a submodule for mapbox-gl-js rather than an npm dependency 2016-12-22 15:41:10 -08:00
Jason Wray
01b0b0bf0b [ios] Move OHHTTPStubs to Git submodule and update to 5.2.0 2016-08-25 13:41:19 -04:00
Minh Nguyễn
be8f83770d [ios, osx] Shared test bundle
The iOS and OS X SDKs now share a non-UI test bundle. Moved the iOS UI test bundle into a uitest/ subdirectory and moved the OS X SDK tests into the darwin/ subdirectory.

Upgraded KIF to v3.4.2.
2016-04-16 22:46:24 -07:00
John Firebaugh
13e2acbc75 [ios, osx] Consolidate remaining files in platform/{ios,osx} 2016-02-12 14:53:52 -08:00
Mike Morris
79a5a96037 [core] mason geojsonvt-2.1.6.3
- [osx] set -fvisibility-inlines-hidden in gyp/common.gypi to silence
  mismatched visibility linker warnings
- [linux] set cxx_host in GYP_FLAGS to set -fabi-version=0 on gcc builds
  to use clang-built mason binaries
- [ios] update symbol visibility for iOS tests
- [ios] link libgeojsonvt.a in iOS tests xcodeproj
  - add libgeojsonvt.a to General -> Linked Frameworks and Libraries
  - add mason_packages (recursive) to Build Settings -> Library Search Path
- [ios] add libuv and geojsonvt first in iOS libtool smush to ensure symbols
  are found by later compilation units where they are undefined
2015-11-02 18:41:34 -05:00
Leith Bade
abf93c008b [core] Remove bundled styles.
Fixes #2239
2015-10-30 13:09:04 -07:00
John Firebaugh
15a66b8989 Consolidate test-suite rendering harnesses (#2236) 2015-09-04 10:52:14 -07:00
Justin R. Miller
bd0bf294bf squash of #1655: shape annotations support for core & iOS 2015-06-15 18:30:39 -07:00
Justin R. Miller
b528d7cc03 fixes #830, #880: bring back iOS functional tests 2015-04-23 17:54:08 -07:00
Justin R. Miller
10a30daed6 refs #894, fixes #1074: callout views for iOS 2015-03-24 18:43:24 -07:00
Justin R. Miller
d4d4cd4415 move iOS code from gl-cocoa to this project 2015-02-09 18:01:40 -08:00
Konstantin Käfer
704b3719f5 use standard DEBUG macro rather than NDEBUG 2015-02-04 10:49:07 +01:00
Konstantin Käfer
272fa8935e make storage lib separate so we can build without storage libs 2015-02-04 10:49:07 +01:00
Konstantin Käfer
ce1e151831 Merge branch 'local-mason'
Conflicts:
	.gitmodules
	styles
2014-10-31 18:03:23 -04:00
Konstantin Käfer
03ae142d72 use a local version of mason instead of writing into ~/.mason
fixes #526
2014-10-31 17:33:10 -04:00
John Firebaugh
d675828fe1 Get mapbox-gl-styles via submodule (fixes #511) 2014-10-31 17:14:30 -04:00
Konstantin Käfer
86230821e4 use test suite as submodule instead of using npm 2014-10-31 12:02:39 -04:00
Dane Springmeyer
238488c413 fix #313 2014-06-05 00:54:38 -07:00
Justin R. Miller
9dd2bc607e mapbox-gl-cocoa renaming 2014-05-31 12:49:09 -07:00
Justin R. Miller
9a79f348fa move debug app over to use of Cocoa API 2014-05-14 11:42:52 -07:00