summaryrefslogtreecommitdiff
path: root/platform/osx
Commit message (Collapse)AuthorAgeFilesLines
* [ios, osx] Ignore invalid observation contextMinh Nguyễn2016-04-201-5/+13
| | | | If a subclass of MGLMapView registers itself as an observer of a non-multipoint annotation’s coordinate key path but fails to handle the change in its -observeValueForKeyPath:ofObject:change:context: implementation, the context would likely be a value other than the annotation’s tag. In that case, avoid doing anything in response to the coordinate changing. Even if the context in that case happens to match the annotation’s tag – say, because the developer passed in NULL (which is equal to 0) for the first added annotation (which would have a tag of 0) – the result would be an unnecessary but harmless update.
* [ios, osx] Avoid observing coordinate on MGLMultiPointMinh Nguyễn2016-04-201-15/+12
| | | | There’s no point observing the coordinate key path on MGLMultiPoint, since that property is immutable. Use the observation context instead of performing an annotation tag lookup when a coordinate has changed.
* [ios, osx] Fixed crash removing multipoint or duplicate annotationMinh Nguyễn2016-04-201-17/+22
| | | | | | Fixed a crash removing a polyline or polygon by observing the coordinate key path on all annotations, not just non-MGLMultiPoints. Pass in the annotation tag as the observation context. This fixes a crash when an annotation is added to the map view more than once, then removed more than once.
* [ios, osx] Use HTML links in documentationMinh Nguyễn2016-04-201-18/+19
| | | | | | Replaced Markdown syntax with HTML syntax for hyperlinks in documentation comments. HTML links work both inside Xcode (whether Objective-C or Swift) and on the Web (via jazzy). Fixes #3961.
* [ios, osx] Override user workspace settingsMinh Nguyễn2016-04-191-1/+1
|
* [osx] Build output goes to build/osxJohn Firebaugh2016-04-198-17/+17
|
* [ios, osx] Eliminate use of main.mkJohn Firebaugh2016-04-191-0/+2
|
* [ios, osx] Remove some non-functional platform.gyp xcode_settingsJohn Firebaugh2016-04-191-5/+0
| | | | Refs #4738
* [osx] Observe annotation coordinatesMinh Nguyễn2016-04-194-32/+83
| | | | MGLMapView observes changes to the coordinate property of each MGLAnnotation added to it. Changing the coordinate property in a KVO-compliant way causes the annotation to be relocated and its callout view, if present, to be dismissed. To avoid observing the same annotation twice yet also avoid expensive lookups when adding or removing annotations, MGLMapView indexes added point annotations in an NSMutableSet.
* Revert "[ios, osx] Make {ios,osx}app schemes non-shared"Minh Nguyễn2016-04-181-0/+101
| | | | This reverts commit bc3512773ffe942e6f70c43596490a6fcf8920a4.
* [osx] Create shared schemas for mbgl-offline, mbgl-render, and test targets ↵John Firebaugh2016-04-183-0/+276
| | | | | that set a working directory (#4742) These targets expect the working directory to be set to the repository root.
* [osx] Explicitly link SystemConfiguration.frameworkJohn Firebaugh2016-04-181-0/+6
|
* [ios, osx] Make {ios,osx}app schemes non-sharedJohn Firebaugh2016-04-181-101/+0
| | | | This avoids the risk of accidentally checking in a MAPBOX_ACCESS_TOKEN environment variable.
* [build] Bump geojson-vt-cpp to v4.1.2Bruno de Oliveira Abinader2016-04-181-1/+1
| | | | | Minor version bump to resolve cross-compilation issues while using geojson-vt-cpp v4.1.0.
* [build/osx] Fix missing generated header include pathBruno de Oliveira Abinader2016-04-181-0/+1
|
* [ios, osx] Took advantage of C99Minh Nguyễn2016-04-161-2/+2
| | | | Now that #4641 has removed the prohibition against C99 extensions, this change removes many pragma statements that suppress warnings about variadic macros and designated initializers. Designated initializers and Elvis operators have been introduced wherever appropriate.
* [osx] Fixed type mismatch and selector warningsMinh Nguyễn2016-04-162-10/+11
| | | | Fixed some issues that were obscured by the old gyp-generated build settings.
* [osx] Moved SDK from gyp into Xcode projectMinh Nguyễn2016-04-166-188/+848
| | | | | | | | Added a new Cocoa dynamic framework target target to the main OS X Xcode project. The target is based on the template provided by Xcode. It contains headers and source files in the darwin/ and osx/ subdirectories. Headers are explicitly marked public or project-internal instead of implicitly by subdirectory. Removed the osxsdk target from platform.gypi. The SDK target has a few dependencies that are managed by mason. Transform the config.gypi generated by configure into an .xcconfig file that Xcode uses to fill in compiler and linker flags. Added a CI scheme that builds the All aggregate target generated by gyp and the osxapp and SDK test targets.
* [osx] Added Xcode project for osxappMinh Nguyễn2016-04-1624-82/+612
| | | | | | | | osx.xcodeproj is an ordinary Xcode project with an ordinary Xcode target for osxapp, contained in an ordinary Xcode workspace that happens to also reference the gyp-generated platform.xcodeproj. The osxapp target links to and embeds Mapbox.framework, which is a product of the gyp-generated platform.xcodeproj. Moved XIBs into Base.lproj and icons into an asset catalog. Shared an Objective-C exception breakpoint, disabled by default.
* [ios, osx] Shared test bundleMinh Nguyễn2016-04-166-293/+5
| | | | | | 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.
* [ios] Removed alternative to -ObjCMinh Nguyễn2016-04-164-38/+0
| | | | | | Xcode’s static library template comes with the -ObjC linker flag by default. Instead of removing that flag, this change removes the various imperfect workarounds we’ve been using to ensure that private SDK categories link. Given the size decrease in this static library since #2966 was fixed, we should have room to spare for the more straightforward approach. Moreover, an application that uses MGLMapView in a storyboard no longer needs to add -ObjC to the application target, which bloated the entire application, including other frameworks that had no need for -ObjC. -ObjC isn’t even needed for dynamic frameworks, and the OS X SDK is only built as a dynamic framework.
* [all] Replace HTTPContextBase/HTTPRequestBase with FileSourceJohn Firebaugh2016-04-141-1/+1
|
* [core] Render from the main threadJohn Firebaugh2016-04-141-64/+39
| | | | Do not create a thread for the MapContext anymore.
* [osx] Scroll to zoomMinh Nguyễn2016-04-122-7/+32
| | | | | | | | Added a hidden preference to MGLMapView that enables “unnatural zooming”, in which the scroll wheel zooms in and out, as in a Web browser, instead of scrolling the map, as is the platform convention on iOS and OS X. Added a checkbox to osxapp’ preferences window that toggles this hidden preference via a binding. You can either use this checkbox or set the MGLScrollWheelZoomsMapView user default to YES. Fixes #4670.
* [ios, osx] The return of xcpretty, part II (#4676)John Firebaugh2016-04-111-0/+1
|
* [ios] Run core unit tests in CIJohn Firebaugh2016-04-111-0/+13
|
* [build] Refactor and simplify build systemJohn Firebaugh2016-04-0714-453/+389
| | | | | | | | | | | | | | * Main gyp files are now standardized as platform/<platform>/platform.gyp. * Each platform gyp file defines appropriate loop_lib and headless_lib variables. * Each platform gyp file includes mbgl.gypi, which defines base targets which may be useful to all platforms. * CI targets are consistent across platforms: `make $(PLATFORM) && make test-$(PLATFORM)`. * Renamed the "linux" test app to "glfw". It's now built in OS X CI. * Android build flakiness is fixed. * iOS CI builds the bench and iosapp targets. * Mesa version is now in one place. * CI scripts use bash "strict mode" and correct error handling. * All build output goes to the build directory. * Removed vestigial iOS/OS X/Android Travis scripts.
* [osx] Use a more reliable hack for the getting the .xcscheme file into placeJohn Firebaugh2016-04-012-11/+101
|
* [ios, osx] Replace libuv with native implementationsJohn Firebaugh2016-04-012-1/+1
|
* Merge branch 'release-ios-3.2.0-android-4.0.0'John Firebaugh2016-03-3012-46/+611
|\
| * [osx] Fixed testsMinh Nguyễn2016-03-291-2/+3
| | | | | | | | The previous change includes an additional salient change: a newly minted offline pack’s state is inactive initially, not unknown.
| * [ios, osx] Require progress to be requested manuallyMinh Nguyễn2016-03-292-1/+14
| | | | | | | | Requesting progress is expensive, so it is once again computed only on demand, rather than automatically at launch. Moved progress requesting back to iosapp and osxapp.
| * [osx] Offline pack manager in osxappMinh Nguyễn2016-03-297-4/+374
| | | | | | | | Added an offline pack download manager to osxapp to demonstrate the use of MGLOfflineStorage with Cocoa Bindings. Like the Offline Packs view controller in iosapp, new packs are added based on the foremost map view’s current state. Double-clicking a complete offline pack opens a new map window to the pack’s bounds.
| * [ios, osx] Include progress in progress change notificationMinh Nguyễn2016-03-292-0/+27
| | | | | | | | An MGLOfflinePackProgressChangedNotification notification now includes the pack’s state and progress values, which match the values in the corresponding MGLOfflinePack properties. Implemented NSValue category methods to store MGLOfflinePackProgress inside a dictionary.
| * [osx] Offline unit testsMinh Nguyễn2016-03-294-0/+176
| | | | | | | | | | | | Added unit tests for MGLTilePyramidOfflineRegion, MGLOfflinePack, and MGLOfflineStorage. Fixes #4426.
| * [ios, osx] Wrap coordinates converted from pointsMinh Nguyễn2016-03-251-1/+1
| | | | | | | | ref #4444
| * [ios, osx] Unified offline and ambient cachesMinh Nguyễn2016-03-181-41/+19
| | | | | | | | | | | | There is now only one instance of mbgl::OfflineFileSource, created when the shared MGLOfflineStorage object is initialized. Also create and use the shared MGLOfflineStorage object when initializing an MGLMapView object. The unified cache file is located in a subdirectory of Application Support, where the SDK has control over the file’s lifetime. The subdirectory is already named after the host application’s bundle identifier, ensuring that each Mapbox-powered application has an independent tile limit. If there’s an ambient cache in a subdirectory of Caches, delete it. If there’s an offline cache in a subdirectory of Documents on iOS or Caches on OS X, move it to the unified cache location in a subdirectory of Application Support. Fixes the iOS/OS X side of #4338.
* | [core] fix reparsing overscaled geojson tilesAnsis Brammanis2016-03-301-1/+1
| | | | | | | | fix #3838
* | [core] increase geojson buffer size to match -jsAnsis Brammanis2016-03-301-1/+1
| |
* | [core] Update to variant 1.1.0John Firebaugh2016-03-231-1/+1
| |
* | [osx] Remove unnecessary build stepsMinh Nguyễn2016-03-231-11/+0
| | | | | | Followup to 8cc08266200bba08333ad0e1b55a37e5ff0fccc9.
* | Reset the translation to zero without adjusting for view to fix non-zero ↵Dan Wexler2016-03-201-1/+1
|/ | | | frame origin bug.
* [ios, osx] Renamed MGLOfflineTask to MGLOfflinePackMinh Nguyễn2016-03-102-2/+2
| | | | “Offline pack” more effectively communicates the persistent nature of the downloaded content.
* [ios, osx] Renamed offline classesMinh Nguyễn2016-03-102-9/+9
| | | | 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.
* [osx] Added OS X support for offline downloadsMinh Nguyễn2016-03-1013-175/+18
|
* [ios] Non-embedded static frameworkMinh Nguyễn2016-03-081-1/+1
| | | | | | 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.
* [android|ios|osx] Fix return type for pixelForLatLngBruno de Oliveira Abinader2016-03-011-1/+1
|
* [core] PrecisionPoint is now ScreenCoordinateBruno de Oliveira Abinader2016-03-011-4/+4
|
* Merge branch 'release-ios-v3.1.0'Minh Nguyễn2016-02-241-17/+29
|\
| * [ios, osx] Exclude misses from nearby annotationsMinh Nguyễn2016-02-101-1/+2
| | | | | | | | | | | | 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.