Minh Nguyễn
7ed31065ed
Cleaned up in-app opt-out property
...
Renamed the property to be consistent with the public class methods. Also removed a spurious #import of a .m file.
2015-05-12 16:16:48 -07:00
Minh Nguyễn
9850488253
Merge branch '1ec5-metrics-determinism' into 1ec5-metrics-opt-way-out
2015-05-12 16:12:25 -07:00
Minh Nguyễn
b1992a4516
Merge branch 'master' into 1ec5-metrics-opt-way-out
2015-05-12 16:09:10 -07:00
Minh Nguyễn
afbb9c2717
Enable Metrics by default default default
...
Enable Mapbox Metrics by default when Settings.bundle is absent, but allow Settings.bundle to override the default. Don’t register defaults for non-Mapbox preferences. The two-phase registration ensures that the defaults don’t default to unexpected values, yet gives the developer a chance to call `+[MGLAccountManager mapboxMetricsEnabledSettingShownInApp]` before the hard assertion.
Fixes #1518 .
2015-05-12 15:26:07 -07:00
Minh Nguyễn
b88b917cd4
Acknowledge the existence of other Mapbox GL classes
2015-05-12 12:28:43 -07:00
Minh Nguyễn
576caf0855
Corrected Settings.bundle assertion message
...
It’s `-[MGLAccountManager setMapboxMetricsEnabledSettingShownInApp:]`. Also clarified when the setter has to be called.
2015-05-12 11:49:40 -07:00
Brad Leege
3391d8f6d8
Merge pull request #1520 from mapbox/1516-opt-out-checking
...
Explicit Opt Out Checking
2015-05-12 11:04:14 -05:00
Brad Leege
87551c6d0e
#1516 - Renaming setShowsOptOutInApp to setMapboxMetricsEnabledSettingShownInApp for app consistency. Implementing wordsmith edits to NSAssert text. Removing technical debt.
2015-05-12 10:50:46 -05:00
Minh Nguyễn
54a703bcb2
Consolidated logic for pausing/resuming MGLMapboxEvents
...
`MGLMapboxEvents` automatically recreates its location manager when the host app is reauthorized for Location Services. Added some redundancy to ensure that there is no location manager when either Location Services or Mapbox Metrics is off.
2015-05-12 01:38:04 -07:00
Minh Nguyễn
58d695f6d3
Respond to opt-out setting change immediately
...
As soon as the user returns to the host app after changing the opt-out preference in Settings, `MGLMapboxEvents` responds by pausing or resuming. Also moved the IB designables agent check to occur only once, at launch, since the process name is not expected to change mid-session.
2015-05-12 01:38:04 -07:00
Minh Nguyễn
ff0ec15e1d
More cleanup and sanitization
...
Moved constant values from ivars into constants. Invalidate the flush timer and clear the event queue on pause. Rewrote some flush logic to be easier to follow.
2015-05-12 01:38:04 -07:00
Minh Nguyễn
2f02a6538e
Folded MGLMetricsLocationManager into MGLMapboxEvents
...
`MGLMetricsLocationManager` was nothing but overhead for `CLLocationManager`. Also removed an unused method.
2015-05-12 01:36:56 -07:00
Minh Nguyễn
c1fe6e1890
Resume iff Metrics is enabled
2015-05-12 01:36:56 -07:00
Minh Nguyễn
f860169f35
Refactored MGLMapboxEvents for better data management
...
The shared `MGLMapboxEvents` now owns the only instance of `MGLMetricsLocationManager`. It also owns a `MGLMapboxEventsData` object, to which all user-specific data has been relegated. This object can be built up and torn down on the fly, whenever the opt-out preference is toggled. `MGLMapboxEvents` has also given up knowledge of the access token and now queries `MGLAccountManager` for that information, which `MGLMapView` keeps up-to-date.
2015-05-12 01:36:56 -07:00
Minh Nguyễn
60ed9e6d2e
Objective-C method naming convention
...
Removed “get” from names of methods that perform no network or file access.
2015-05-12 01:36:29 -07:00
Minh Nguyễn
1503f33140
Predicate MGLMapboxEvents initialization on user opt-out
2015-05-12 01:36:29 -07:00
Minh Nguyễn
4837359471
Register default user defaults on class initialization
...
`-[MGLMapboxEvents init]` only gets called if `-[MGLMapboxEvents sharedManager]` sees that user defaults call for an `MGLMapboxEvents` to be created. But those user defaults were only being registered inside `-[MGLMapboxEvents init]`. This change moves the registration to `+initialize`, which is called as soon as the class is loaded.
2015-05-12 01:36:29 -07:00
Brad Leege
48e21ae6e9
#1516 - Adding explicit checks for developer implementation of user Opt Out functionality
2015-05-11 23:31:22 -05:00
Brad Leege
d4fcb5bb98
Merge pull request #1469 from mapbox/1435-android-gl-crash
...
Android GL Crash
2015-05-11 11:42:21 -05:00
Minh Nguyễn
965bc41d43
Round zoom level for Map Feedback tool
...
The Map Feedback tool is still using mapbox.js, so it doesn’t support fractional zoom levels yet.
2015-05-10 23:34:47 -07:00
Minh Nguyễn
7da7f65579
Dismiss attribution popover on rotation
...
Constraints go invalid when rotating an iPad while the popover is visible and anchored to the ℹ️ .
2015-05-10 23:32:38 -07:00
Jason Wray
fbafa15395
Add long/lat/zoom to feedback URL
2015-05-10 23:14:16 -07:00
Minh Nguyễn
4de7f89f47
Turned copyright notices into action buttons
2015-05-10 04:19:01 -07:00
Minh Nguyễn
965f90c449
Attribute Mapbox and OpenStreetMap in-app
...
ℹ️ now pops up an action sheet with explicit attribution and a direct link to the Map Feedback tool.
2015-05-10 03:53:24 -07:00
Leith Bade
703e0bc2ee
Ignore deactivate when no valid EGL display. Fixes #1435
...
Initialise NativeMapView's EGL variables before Map
Fix hang
Add check for double pause
Add test for double pause
2015-05-09 12:02:39 +10:00
Brad Leege
08f1d4b511
#1481 - Changing events array to be created with +arrayWithArray
2015-05-08 15:24:19 -05:00
Brad Leege
2eef6b4412
#1481 - Refactoring to use iOS -copy and -removeAllObjects to get away from having to do potentially less stable index calculations
2015-05-08 15:02:32 -05:00
Brad Leege
9d0b67450d
#1481 - Replacing flushAt with eventQueue count of upper range limit
2015-05-08 14:53:39 -05:00
Minh Nguyễn
13a88c5dec
Merge pull request #1480 from mapbox/1ec5-metrics-keys
...
Rename settings keys
2015-05-08 12:06:51 -07:00
Minh Nguyễn
bb788f56f2
Renamed settings keys
...
The new keys fit the standard naming convention for Info.plist keys and more clearly communicate how they’re to be used.
2015-05-08 11:51:48 -07:00
Konstantin Käfer
f96580de61
catch NaN values from UIPinchGestureRecognizer
2015-05-08 20:25:43 +02:00
Brad Leege
9f0e9fe847
#1474 - Setting flushAfter back to 60 seconds. Removing debug log statements
2015-05-08 10:23:14 -05:00
Brad Leege
11886a9004
#1474 - Adding timer cleanup logic to -flush so that it doesn't loop indefinitely
2015-05-08 10:21:00 -05:00
Brad Leege
ea3979b19e
#1474 - Refactoring timer to be started when first event is added to queue. Debug logic and content also included
2015-05-08 10:13:05 -05:00
Konstantin Käfer
7dbe768ffc
change the window title to indicate the current style
2015-05-07 11:01:15 +02:00
Thiago Marcos P. Santos
769364c117
Make all GLFWView attributes private
2015-05-07 11:01:15 +02:00
Thiago Marcos P. Santos
168d7c4f17
Add style change functionality to the Linux test app
...
Makes the life of people using Linux as development environment way
easier.
Just press 's' to cycle through 3 different styles.
2015-05-07 11:01:15 +02:00
Justin R. Miller
68ff978cd6
fix lingering backgrounding crashes & add debug mode
2015-05-06 15:13:51 -07:00
Minh Nguyễn
61523d50b8
Merge branch 'master' into 1ec5-analyzer
2015-05-06 12:04:19 -07:00
Brad Leege
acd27fc386
Merge pull request #1329 from mapbox/1225-start-token
...
MapboxGL Startup Infrastructure
2015-05-05 13:00:25 -05:00
Brad Leege
804c092c81
#1225 - Simplifying MGLAccountManager for initial setup and access to AccessToken
2015-05-05 11:50:01 -05:00
Minh Nguyễn
ec3757309f
Fixed leaks of copied CF objects
2015-05-05 12:10:44 -04:00
Minh Nguyễn
fc576ddef6
Suppressed an uninitialized value warning from the static analyzer
...
While tracking the user’s location, a double tap not near the user dot now turns off location tracking instead of bouncing between the tapped location and the user location.
2015-05-05 12:02:47 -04:00
Minh Nguyễn
900d140f23
Fixed dead store analyzer warnings
...
These values weren’t being used for anything.
2015-05-05 11:41:02 -04:00
Minh Nguyễn
ec241d17ff
Fixed NSMutableString leak
...
Fixed analyzer warnings in http-nsurl target, which is MRR rather than ARC.
2015-05-05 11:33:39 -04:00
Konstantin Käfer
691c305467
add Map::isFullyLoaded()
...
returns whether the Map is still loading/parsing any assets or whether everything is there and a render will likely be complete
2015-05-05 11:47:23 +02:00
Konstantin Käfer
248e48eacc
decode URLS when loading from file system
2015-05-05 11:47:23 +02:00
Konstantin Käfer
286338c978
[iOS] send map rendering notifications
2015-05-05 11:47:22 +02:00
Brad Leege
4ce4e979ff
Updating from master
2015-05-04 17:04:46 -05:00
Brad Leege
7f6cc6cc6d
#1225 - Renaming getAccessToken method to sharedAccessToken to avoid any iOS get naming conventions
2015-05-04 16:52:41 -05:00