Commit Graph

685 Commits

Author SHA1 Message Date
John Firebaugh
6cb606b4ed [ios] Remove redundant lines from ios/scripts/defaults.md
MASON_PLATFORM=$(HOST) and MASON_PLATFORM_VERSION=$(HOST_VERSION) are set by main.mk; there's no need to set them here.
2016-03-16 17:48:37 -07:00
Minh Nguyễn
d64b8ad25c [ios] Immediately remove offline pack from table
Remove all references to an offline pack before the call to -removePackWithCompletionHander:.
2016-03-14 11:56:27 -07:00
Bruno de Oliveira Abinader
8e30a4a080 [core] Harden Transform anchor & padding usage
Use optional values for anchor & padding in Map and Transform functions
instead of NaNs. Added unit tests to stress some edge cases.
2016-03-13 21:38:20 +02:00
Minh Nguyễn
3b225d57d9 ios-v3.2.0-pre.2 2016-03-11 13:50:06 -08:00
Minh Nguyễn
4bcc24d5af [ios] Fixed iosapp build
MBXDownloadsTableViewController.{h,m} had been renamed MBXOfflinePacksTableViewController.{h,m}, but the project had not been.
2016-03-10 20:22:19 -08:00
Minh Nguyễn
641c31507d [ios] Renamed downloads to offline packs in iosapp 2016-03-10 17:14:14 -08:00
Minh Nguyễn
ff9c3a57b0 [ios, osx] Renamed MGLOfflineTask to MGLOfflinePack
“Offline pack” more effectively communicates the persistent nature of the downloaded content.
2016-03-10 17:14:14 -08:00
Minh Nguyễn
77d99584ce [ios, osx] Distinguish between unknown and inactive state 2016-03-10 17:08:58 -08:00
Minh Nguyễn
8824237e2d [ios, osx] Documented offline APIs
Also categorized offline symbols for jazzy and moved styleURL from MGLOfflineRegion to MGLTilePyramidOfflineRegion, since you never know if there will be a region type not constrained by a style in the future.
2016-03-10 17:08:58 -08:00
Minh Nguyễn
0348c1ee96 [ios] Tap to pause/resume
Tapping on a download now pauses or resumes it. Tapping on a completed download navigates to the downloaded region and switches to the downloaded style.
2016-03-10 17:08:58 -08:00
Minh Nguyễn
f5ac63dfec [ios, osx] Renamed offline classes
Renamed SDK classes related to offline viewing to more closely match the terminology used by mbgl and the Android SDK while remaining consistent with Cocoa naming principles.
2016-03-10 17:08:58 -08:00
Minh Nguyễn
e36218a866 [osx] Added OS X support for offline downloads 2016-03-10 17:08:58 -08:00
Minh Nguyễn
081ee9fbef [ios] Added download manager to iosapp 2016-03-10 17:08:58 -08:00
Minh Nguyễn
77657b3896 [ios] Implemented offline API in iOS SDK
Fixes #3892.
2016-03-10 17:08:58 -08:00
Minh Nguyễn
a65730803e [ios] Converted iosapp to use storyboard 2016-03-10 17:08:58 -08:00
Minh Nguyễn
29688e2cd8 [ios] Disable implicit animation of user dot bounds
ref #1125
2016-03-10 12:03:26 -08:00
Jason Wray
64b163ee5d [ios] Add description strings to constituent classes 2016-03-10 13:48:00 -05:00
Minh Nguyễn
c2cd9335e9 [ios] Non-embedded static framework
Added a new ifabric Make target for packaging up a static framework similar to the one released as 3.0.1. Place artwork and certificate assets inside Mapbox.bundle inside Mapbox.framework. Link SystemConfiguration in the umbrella header.

Distinguish between the framework bundle and the resources bundle. For the dynamic frameworks and embedded static frameworks, the two are the same; for the non-embedded static framework, the latter resides inside the former.
2016-03-08 11:20:12 -08:00
Minh Nguyễn
0875a066cb [ios] Cleaned up NSLocalizedString usage
The format string would be localized, not the string resulting from expanding its placeholders. Also unindented a wildly indented block of code.
2016-03-05 21:49:57 -08:00
Minh Nguyễn
2d2ba3a482 [ios] Use MGLErrorDomain for errors 2016-03-05 21:44:22 -08:00
Jason Wray
2ed4a16605 [ios] Update telemetry opt-out docs link 2016-03-04 13:48:26 -05:00
boundsj
d10d3eef43 [iOS] #4148 Update event serialization to the V2 specification.
This updates the endpoint for events to "v2" and updates
appUserTurnstile, map.load, map.click, map.dragend, and location
to the V2 spec.
2016-03-03 17:45:10 -08:00
Jesse Bounds
c6d84f0d71 Merge branch 'release-ios-v3.2.0' 2016-03-03 15:47:23 -08:00
Bruno de Oliveira Abinader
c17e954983 [android|ios|osx] Fix return type for pixelForLatLng 2016-03-01 20:58:54 +00:00
Bruno de Oliveira Abinader
4994b3dc57 [core] PrecisionPoint is now ScreenCoordinate 2016-03-01 20:58:54 +00:00
Minh Nguyễn
73430aed38 [ios] Moved static include file
This file was originally added on the release-ios-v3.1.0 branch, before #3913 merged ios/ into platform/ios/. When the release branch was merged back into master in 17f44d7bd9, the file was left in the old ios/ directory.
2016-02-27 13:43:39 -08:00
Jesse Bounds
cb9054f9ec Update package script to reflect file path change 2016-02-27 06:58:31 -08:00
Jesse Bounds
ca82ae4be1 Update podspec, changelog for 3.2.0-pre.1-symbols 2016-02-27 06:13:51 -08:00
Jesse Bounds
09c9100891 Introduce MGLLocation Manager
https://github.com/mapbox/mapbox-gl-native/pull/4115

This change makes background data gathering more efficient by disabling
standard location updates when the device has been stationary for at
least five minutes. It also establishes region monitoring and
significant location change monitoring so that if the device appears to
be in motion again then background telemetry data collection can resume.
All of this reduces the amount of time required for telemetry data
collection to the time the device is in motion only. It also only
applies to host apps that already run in the background and have the
always location permission from their users.

This also includes some changes to make the internal pause/resume API of
the MGLMapboxEvents class less complex and autonomous. The side effects
of the map view waking or sleeping are no longer required for mapbox
events to work as intended.
2016-02-26 14:19:04 -08:00
Minh Nguyễn
fe7b52e792 [ios] Clarified schemes and destinations 2016-02-26 10:23:40 -08:00
Jesse Bounds
9a97a4d34f [ios] Introduce API Client
Addresses https://github.com/mapbox/mapbox-gl-native/issues/3704

This introduces a new utility class that wraps networking via
NSURLSession. All related code that used to live inside the telemetry
MGLMapboxEvents class has been pulled into the new MGLAPIClient.
An API client instance is used as a service by telemetry and can be
reused in the future when and if our networking needs grow or become
more complex.
2016-02-24 14:45:42 -08:00
Minh Nguyễn
d8c066ce0a [ios] Deleted redundant certificates
These certificates were copied to platform/default/resources/ in 4719b73ac7 but remained here, producing build warnings about duplicate build rules.
2016-02-24 12:24:08 -08:00
Jesse Bounds
f3ff38d125 [ios] Reduce async complexity 2016-02-24 09:32:26 -08:00
Minh Nguyễn
17f44d7bd9 Merge branch 'release-ios-v3.1.0' 2016-02-24 09:06:43 -08:00
Konstantin Käfer
662edea020 [ios] fix benchmark app 2016-02-24 16:49:05 +01:00
Minh Nguyễn
7bed2cebd2 [ios] Restored framework dependencies to static installation instructions
Backed out documentation about #4029 because it doesn’t apply when using a storyboard, and the installation instructions use a storyboard.
2016-02-22 10:44:49 -08:00
Minh Nguyễn
d836638407 [ios] Fixed zoom level for map feedback tool
The map feedback tool uses mapbox.js, so its zoom levels are one off the zoom levels used by Mapbox GL.
2016-02-22 09:44:43 -08:00
Jason Wray
15b9f3171a [ios] Refactor MGLMapView's location services
- Pause location services when the app goes to sleep; address iOS 8 blue bar issue.
- Only ask for location permissions if not already granted/denied.
- Cleanup usage of `.isDormant` → `.dormant`

Partially addresses #2945, for which a full and complete fix waits until #4030.
2016-02-19 13:14:54 -05:00
Jason Wray
390057b569 [ios] Set default polyline and polygon color to the map view tint color
Fixes #3927
2016-02-18 19:23:15 -05:00
Minh Nguyễn
9f4e8dd676 [ios] Removed manual framework linking from installation instructions
Even these three are no longer needed, now that the umbrella header pulls them in.
2016-02-18 14:51:51 -08:00
Minh Nguyễn
1c25dc098e [ios] Import required frameworks with static framework umbrella
The umbrella header inside the static framework now imports the required iOS SDK frameworks so manual linking is unnecessary. This change corrects a regression introduced in #3183, when the umbrella header used in version 3.0.1 was removed.
2016-02-18 14:41:47 -08:00
Minh Nguyễn
a57a88a038 [ios] Clarified manual installation instructions
People are used to dragging frameworks into the Linked Frameworks and Libraries section, but the SDK only works when embedded inside the application.

Fixes #4011.
2016-02-18 13:26:54 -08:00
Bruno de Oliveira Abinader
d900e7a9a3 [tests] Bumped KIF hash
Commit 766ff59663f19222993ed32e5be36894bcb6949d removes a generated
.gcda file that prevents proper lcov usage.
2016-02-18 15:01:58 +02:00
Jesse Bounds
9891d0eb79 [iOS] Generate and send a turnstile event when map view event is queued
This change adds logic to push a turnstile event whenever a map view
event is queued. It guards against sending the turnstile event more
than once per session.

Note that `pushTurnstileEvent` is actually a "force push" in that it
flushes the queue and, since it enqueues a turnstile event, the
flush's call to `postEvents` will attempt to send any queued events
even if telemetry is paused. This has the side effect of defeating
the other queue / timing / flush logic in place whenever map load
(and now implicitly turnstile) events are pushed.
2016-02-15 11:35:07 -08:00
Minh Nguyễn
55fca26ea5 [ios] Distinguish between AGV and semver
Distinguish between Apple Generic Versioning and Semantic Versioning in Info.plist. Also fill in the build number in the dynamic framework.

Fixes #3911.
2016-02-13 09:56:44 -08:00
Jason Wray
f37093e108 [ios] Fix screenshot link
[skip ci]
2016-02-12 19:37:52 -08:00
Jason Wray
c5e3b20891 [ios] Update linked library extension to .tbd
[skip ci]
2016-02-12 15:56:12 -08:00
John Firebaugh
13e2acbc75 [ios, osx] Consolidate remaining files in platform/{ios,osx} 2016-02-12 14:53:52 -08:00
Minh Nguyễn
51d7d204db [ios, osx] Exclude misses from nearby annotations
After filtering out elements of a vector using std::remove_if(), it’s apparently necessary to resize the vector. Otherwise, removing only has the effect of shifting the non-matching items to the end of the vector. This change reduces the annotation tap target back to almost what it was before #3261, except that these days the target is centered around the annotation image rather than the center point. There remains a much smaller slop area around the annotation, but nothing close to the effective padding before this change.

Fixes #3880.
2016-02-10 22:02:46 -08:00
Minh Nguyễn
bd59ab9a52 [core, ios, osx] Only constrain after adding to a window
Introduced a setter/getter for constrain mode. On iOS and OS X, the zoom level inspectable causes the zoom level to be set independently from the longitude and latitude. Thus, the latitude inspectable had no effect because the latitude was constrained to 0 at z0. Temporarily removing the heightwise constraint allows the map to center on the intended location before zooming, which is the usual case for storyboards and XIBs. On iOS, the only guarantee we have timing-wise is that all the inspectables are applied after initialization but before the view is added to a window. So we reimpose the heightwise constraint as soon as the view is added to a window, that is, before the user has a chance to pan the map out of bounds.

Fixes #3868.
2016-02-10 15:15:29 -08:00