Commit Graph

29 Commits

Author SHA1 Message Date
Justin R. Miller
f5a0586408 move from Fabric framework to bare headers per Twitter recommendation
Rolls back part of #2742
2015-11-09 17:35:43 -08:00
Justin R. Miller
0e5063799a bump iOS version to 3.0.0-pre.5 2015-11-06 17:57:47 -08:00
Justin R. Miller
423cfc11e5 refs #2966: remove -ObjC linker flag & bring in categories via other means 2015-11-06 16:16:50 -08:00
Minh Nguyễn
1e27092669 Strip whitespace and newlines from access token and style URL
Just in case browser weirdness or a tendency to triple-click-select is causing some cases of #2012.
2015-11-03 14:46:30 -08:00
Justin R. Miller
9067fd43f3 bump iOS version to 3.0.0-pre.4 2015-11-02 16:12:52 -08:00
Justin R. Miller
2aa3ab0c14 bump iOS version in podspec/Fabric 2015-10-30 15:23:50 -07:00
Justin R. Miller
847cee0c89 re-bump for ios-v3.0.0-pre.2 2015-10-23 16:33:37 -07:00
Justin R. Miller
cf46b2f770 bump iOS version for 2.2.0-pre.2 2015-10-23 16:08:34 -07:00
Justin R. Miller
144a4714f0 refs #2684: integrate Twitter Fabric 2015-10-23 14:13:56 -07:00
Minh Nguyễn
bf6a100801 Avoid null-change KVO notifications
If no access token is set in the Info.plist, avoid triggering a KVO notification about the access token changing. By the same token (heh), avoid pulling a C string out of the change dictionary if the access token is being nilled out.
2015-06-17 16:49:12 -07:00
Minh Nguyễn
f46328655e Audited headers for nullability
Added some nullability qualifiers in method implementation selectors for consistency with declarations.

The user dot view now has a non-zero size. Previously only its layer was sized properly. Also resolved some pedantic warnings about missing designated initializer overrides.

Xcode 6.3 or above is now required for building this project.
2015-06-11 11:37:23 -07:00
Minh Nguyễn
2200c51a33 Removed unavailable method implementation
This class method is marked unavailable in MGLAccountManager.h, so this code can never be reached.
2015-05-21 13:29:46 -07:00
Minh Nguyễn
70381d2705 Fixed up various Info.plist edge cases
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.
2015-05-21 01:49:53 -07:00
Minh Nguyễn
256b748458 Merge branch '1ec5-plist-1535' 2015-05-20 14:38:36 -07:00
Minh Nguyễn
90a50c0c41 Observe access token changes
The singleton `MGLAccountManager` wants to be the sole arbiter of the access token, but each instance of `mbgl::Map` (`mbgl::DefaultFileSource` in #1607) has its own copy of the access token. Now `MGLMapView` observes for changes to the `MGLAccountManager`’s access token and synchronizes `mbgl::Map` with it.
2015-05-20 11:49:59 -07:00
Minh Nguyễn
a081f1af5b Removed redundant declaration 2015-05-20 10:47:42 -07:00
Minh Nguyễn
2c7d0567fa Privatized MGLMapboxEvents
`-pauseMetricsCollection` and `-resumeMetricsCollection` were originally introduced to mitigate concerns around battery usage, but `MGLMapboxEvents` has since evolved to tread much lighter on the battery. There’s no longer any need for the client to call these methods directly. The iOS test project now includes MGLMapboxEvents.h explicitly to avoid having to package a header that will go unused.
2015-05-18 11:55:54 -07:00
Minh Nguyễn
cbb7112e8c Set up MGLAccountManager without any prodding
`MGLAccountManager` is now guaranteed to initialize without the code ever making any mention of it. It also is guaranteed to be set up before `MGLMapboxMetrics` but will definitely cause `MGLMapboxMetrics` to be set up on the main thread if the access token is set in Info.plist.
2015-05-13 16:08:40 -07:00
Minh Nguyễn
2529baa62b Grab access token and other app-wide data from Info.plist
That way there’s no ambiguity about when you should call things like `+[MGLAccountManager setMapboxMetricsEnabledSettingShownInApp:]`. In fact, that method is now deprecated because it’s so easy to call in the wrong place.

Fixes #1535.
2015-05-13 15:33:28 -07:00
Minh Nguyễn
9a404a3088 Return nil for IB designables agent
In Objective-C, the return value for a non-void method is the receiver by default. Hello NeXTSTEP.
2015-05-13 07:53:32 -07:00
Justin R. Miller
190e911209 fix dispatch-thread pattern
1. Always bail early if in IB.
 2. Always run on main thread if not already.
 3. THEN dispatch_once to create the static instance.
2015-05-12 18:23:59 -07:00
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
b1992a4516 Merge branch 'master' into 1ec5-metrics-opt-way-out 2015-05-12 16:09:10 -07: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
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
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
804c092c81 #1225 - Simplifying MGLAccountManager for initial setup and access to AccessToken 2015-05-05 11:50:01 -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
Brad Leege
0e36bf1c8d #1225 - Restoring MapboxGL.h as an Umbrella header file by splitting the singleton code into MGLAccountManager.h and .m 2015-05-04 16:13:18 -05:00