Commit Graph

421 Commits

Author SHA1 Message Date
Jason Wray
45a0f48ea0 [ios] Add telemetry setting directly to attribution button action sheet
- Deprecate and no-op `+[MGLAccountManager mapboxMetricsEnabledSettingShownInApp]`
- Check for attribution button hiding and make sure ToS are understood
2016-01-09 01:21:45 -05:00
Minh Nguyễn
6fcb9f4da1 [ios] Invalidate CADisplayLink
CADisplayLink holds a strong reference to its target, forming a cycle that must be broken with -[CADisplayLink invalidate] when the animation is complete. I don’t yet have enough faith that will-change and did-change notifications are always coming from mbgl in pairs, so this change limits CADisplayLink to when MGLMapView is in the view hierarchy. It also pauses the CADisplayLink when the view is hidden or the application is in the background. Finally, -[MGLMapView invalidate] has been renamed because that term tends not to mean “redraw” in Cocoa but is rather tied to timers.

Fixes #3130.

[ios] Also invalidate CADisplayLink on removal from window

[ios] Also shut down CADisplayLink when view is hidden
2016-01-07 20:28:44 -08:00
Minh Nguyễn
11d99bd890 [ios] Refined custom callout view support
Renamed MGLCalloutView to MGLCompactCalloutView and MGLCalloutViewProtocol to MGLCalloutView to avoid an awkward workaround for a Swift name collision. Replaced individual title and subtitle properties with a single representedObject property that lets you use custom annotation properties in the custom callout view. Overrode a problematic SMCalloutView method. Added lots more documentation.
2016-01-06 23:43:07 -08:00
Romain Quidet
b70fd7ae69 [ios] basic custom callout view on demo app 2016-01-06 23:42:48 -08:00
Minh Nguyễn
1a501d4ec4 Happy new year! 2016-01-05 14:01:58 -08:00
Minh Nguyễn
f8f735b574 Rewrote documentation
Rewrote some copy to provide more context and link to more GL-related repos, including GL JS. Put the various SDKs in a table so we can show the various CI bot status images.

Integrated target list into the relevant documents. Rewrote large portions of iOS and OS X setup documentation to guide normal developers to more friendly places. Combined some Android documentation.

Moved SDK-specific documentation into platform/. Added a temporary readme in ios/ that points to the one in platform/ios/.
2016-01-05 08:04:16 -08:00
John Firebaugh
b60b6c47c0 [core] Merge SQLiteCache into the platform library
OfflineFileSource will depend on SQLite too.
2015-12-22 12:09:14 -08:00
John Firebaugh
110f1ec796 [ios, android] Add methods to remove a custom layer 2015-12-17 15:15:55 -08:00
Minh Nguyễn
ff928a3013 [ios] Fixed off-by-one error due to merge
This needs to be converted into a giant switch statement, but that wouldn’t prevent issues like this cropping up in a merge anyways.
2015-12-16 15:48:55 -08:00
Minh Nguyễn
350cafb903 Revert "Revert "[ios] Custom style layer""
This reverts commit 081e4e4451.
2015-12-16 15:48:55 -08:00
John Firebaugh
081e4e4451 Revert "[ios] Custom style layer"
ec9a4cd328
2015-12-16 14:05:54 -08:00
Minh Nguyễn
ec9a4cd328 [ios] Custom style layer
Exposed Map::addCustomLayer() publicly as an undocumented, block-based API. This change avoids the terms “layer”, “initialize”, “render”, and “altitude” because they overload existing terminology in the SDK, UIKit, or MapKit. (“Layer” is qualified as “style layer”.) There are outstanding questions about ARC memory management, but this approach works in both Objective-C and Swift for pure OpenGL programming.

Added a demo to iosapp that draws a green layer below any labels in Mapbox Streets.
2015-12-16 11:03:54 -08:00
Minh Nguyễn
4e0e816653 [ios, osx] Added flyToCamera: variation that uses default duration 2015-12-15 12:52:13 -08:00
Minh Nguyễn
5dd00d1072 [ios] World tour on iOS 2015-12-15 12:52:13 -08:00
Minh Nguyễn
0cab7809eb [osx] Rewrote platform-osx and osxapp
platform-osx now vends a real NSView subclass, MGLMapView, that is readily embedded inside a Cocoa application for OS X. MGLMapView is backed by an NSOpenGLLayer for optimal performance and integration with other layer-backed views. It supports keyboard shortcuts and several gestures and hosts attribution, zooming, and rotation controls as subviews. osxapp is now a bona fide Cocoa application that embeds MGLMapView inside a XIB. osxapp has preferences and a share button for tight integration with custom styles.

Enabling asynchronous rendering would be more consistent with iOS but increases CPU usage so much, even when idle, that it isn’t worth any performance gain. The bigger issue is that VAOs aren’t being used.

make xpackage creates a static library similar to the one created by make ipackage. make clean cleans additional places where build output ends up.

The OS X minimum deployment target has been increased from 10.9 to 10.10. osxapp’s window has a full size content view, which requires 10.10. Lightweight generics require iOS 9+ and OS X 10.11 regardless, because it was only in that release that Foundation collection classes started adopting lightweight generics.

Shuffled files around and refactored annotations so that iOS and OS X share a good chunk of the annotations code, which now takes advantage of polymorphism. MGLMapView can now display annotations but cannot yet select them. In osxapp, a long press drops a pin, and so does the map view’s context menu.

Annotations have NSPopovers as callouts, and their view controllers can be customized. Annotation image alignment rects are respected for hit testing purposes and for positioning the callout anchor. Callouts in osxapp demonstrate the use of bindings to keep callouts in sync with underlying model objects.
2015-12-13 17:17:35 -08:00
Minh Nguyễn
d11d53da5e [ios] Silly rabbit, Cocoa bindings are for Mac developers!
Reapplied 56ea347c49 for #3199, which got lost in a merge.
2015-12-12 15:31:37 -08:00
Justin R. Miller
b561678ce3 bring back symbols for iOS CocoaPods direct uses 2015-12-07 13:10:53 -08:00
Justin R. Miller
7beb051c26 Merge branch 'release-ios-v3.0.1' 2015-12-07 13:03:26 -08:00
Justin R. Miller
c8c485090b properly point to distributed license file 2015-12-07 13:01:28 -08:00
Justin R. Miller
8fb141a3e4 bump build for ios-v3.0.1 (no symbols) 2015-12-07 12:21:22 -08:00
Justin R. Miller
9507bc038e fixes #3181: move from vendored lib to framework
- Add license file to framework build step to satisfy CocoaPods linting.
- Log version when rolling framework (refs #3046).
- fixes #1426: get rid of dummy file since we make our own framework.
2015-12-07 12:16:41 -08:00
Justin R. Miller
032e3a66f3 fixes #3181: move from vendored lib to framework
- Add license file to framework build step to satisfy CocoaPods linting.
- Log version when rolling framework (refs #3046).
- fixes #1426: get rid of dummy file since we make our own framework.
2015-12-07 12:14:29 -08:00
Minh Nguyễn
56ea347c49 [ios] Silly rabbit, Cocoa bindings are for Mac developers!
Replaced the term “Cocoa bindings” in documentation because this library is for iOS, not OS X.
2015-12-04 19:16:23 -08:00
Justin R. Miller
0184b5ba9f bump iOS version to 3.0.1-pre.1 2015-12-03 11:15:42 -08:00
Justin R. Miller
68c0237435 move back to symbolicated iOS fetch in master 2015-11-30 11:11:46 -08:00
Justin R. Miller
8d25d9ab1a Merge branch 'release-ios-v3.0.0' 2015-11-30 11:10:27 -08:00
Bruno de Oliveira Abinader
1f0820c8e8 [core] Added MapDebugOptions
Map debug options are now cycled up to all debug options enabled, then
back to none.
2015-11-27 17:47:02 +02:00
Minh Nguyễn
062746291b Demonstrate show annotations in iosapp
ref #3110
2015-11-24 13:27:19 -08:00
Justin R. Miller
6d4e86f41d bump podspec to 3.0.0 final (no symbols) 2015-11-23 17:03:54 -08:00
Justin R. Miller
6c74da947b bump iOS version to 3.0.0-rc.1 2015-11-23 11:17:45 -08:00
Justin R. Miller
8a774ad9a9 show current version changelog section in docs & link externally to full
This is going to fail and output nothing for -pre and -rc tags for now
until #3046 is addressed. We can't yet grab those but still have final
releases sort after them.
2015-11-23 11:15:10 -08:00
Justin R. Miller
24136b02e9 bump version to ios-v3.0.0-pre.10 2015-11-20 18:37:47 -08:00
Justin R. Miller
73daa180b6 bump version to ios-v3.0.0-pre.9 2015-11-18 18:43:12 -08:00
Justin R. Miller
f2a28f095b refs #2380: plop Settings.bundle inside of framework distribution 2015-11-18 18:41:14 -08:00
Justin R. Miller
ce679eea40 refs #2380: plop Settings.bundle inside of framework distribution 2015-11-18 18:29:34 -08:00
Justin R. Miller
ea4575af68 bump version to ios-v3.0.0-pre.8
[skip ci]
2015-11-16 17:46:45 -08:00
Justin R. Miller
728847329c refs #3045: implicitly link dependencies for framework
[skip ci]
2015-11-16 16:26:30 -08:00
Justin R. Miller
f8f7cd9259 refs #3045: implicitly link dependencies for framework
[skip ci]
2015-11-16 16:25:56 -08:00
Justin R. Miller
ac2a9b0254 refs #3045: correct bundle identifier for iOS framework target
[skip ci]
2015-11-16 16:10:38 -08:00
Justin R. Miller
445145406f bump version to ios-v3.0.0-pre.7 2015-11-16 16:10:32 -08:00
Justin R. Miller
915ab694e2 refs #3045: correct bundle identifier for iOS framework target
[skip ci]
2015-11-16 16:07:44 -08:00
Justin R. Miller
97502ee816 bump version to ios-v3.0.0-pre.7 2015-11-16 12:13:22 -08:00
Justin R. Miller
01b4f160d4 static framework target for iOS 2015-11-16 11:58:33 -08:00
Justin R. Miller
42a60a6661 static framework target for iOS 2015-11-16 11:53:00 -08:00
Justin R. Miller
8e6b9a0d96 bump iOS version to 3.0.0-pre.6
[skip ci]
2015-11-13 14:39:18 -08:00
Minh Nguyễn
c4cbe648b1 [iOS] Replaced deprecated podspec flag
Per https://github.com/mapbox/mapbox-gl-native/issues/1870#issuecomment-132417161.

ref CocoaPods/CocoaPods#3573
2015-11-09 11:37:58 -08:00
Minh Nguyễn
28ec908a3f Updated references to old build docs
Fixes #2871.
2015-11-09 10:15:53 -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
815516a6f7 fixes #2961: download payload over HTTPS 2015-11-06 17:04:11 -08:00
Mike Morris
dfb36d6231 [core] move mbgl.gyp to gyp directory
So npm won't clobber binding.gyp, refs
https://github.com/npm/npm/issues/10243
2015-11-04 11:34:35 -05:00