Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Restore macOS map SDK; clean up iOS, macOS changelogs #178

Merged
merged 7 commits into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 68 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ BUILD_DOCS ?= true
ifeq ($(HOST_PLATFORM), macos)

IOS_OUTPUT_PATH = build/ios
IOS_PROJ_PATH = '$(IOS_OUTPUT_PATH)/Mapbox GL Native.xcodeproj'
IOS_PROJ_PATH = $(IOS_OUTPUT_PATH)/Mapbox\ GL\ Native.xcodeproj
IOS_WORK_PATH = platform/ios/ios.xcworkspace
IOS_USER_DATA_PATH = $(IOS_WORK_PATH)/xcuserdata/$(USER).xcuserdatad

Expand Down Expand Up @@ -219,6 +219,73 @@ darwin-check-public-symbols:

endif

#### macOS targets ############################################################

ifeq ($(HOST_PLATFORM), macos)

MACOS_OUTPUT_PATH = build/macos
MACOS_PROJ_PATH = $(MACOS_OUTPUT_PATH)/Mapbox\ GL\ Native.xcodeproj
MACOS_WORK_PATH = platform/macos/macos.xcworkspace
MACOS_USER_DATA_PATH = $(MACOS_WORK_PATH)/xcuserdata/$(USER).xcuserdatad

MACOS_XCODEBUILD = xcodebuild \
-derivedDataPath $(MACOS_OUTPUT_PATH) \
-configuration $(BUILDTYPE) \
-workspace $(MACOS_WORK_PATH) \
-jobs $(JOBS)

ifneq ($(CI),)
MACOS_XCODEBUILD += -xcconfig platform/darwin/ci.xcconfig
endif

$(MACOS_PROJ_PATH): $(MACOS_USER_DATA_PATH)/WorkspaceSettings.xcsettings $(BUILD_DEPS)
mkdir -p $(MACOS_OUTPUT_PATH)
(cd $(MACOS_OUTPUT_PATH) && $(CMAKE) -G Xcode ../../vendor/mapbox-gl-native/next \
-DCMAKE_SYSTEM_NAME=Darwin )

$(MACOS_USER_DATA_PATH)/WorkspaceSettings.xcsettings: platform/macos/WorkspaceSettings.xcsettings
mkdir -p "$(MACOS_USER_DATA_PATH)"
cp platform/macos/WorkspaceSettings.xcsettings "$@"

.PHONY: macos
macos: $(MACOS_PROJ_PATH)
set -o pipefail && $(MACOS_XCODEBUILD) -scheme 'CI' build $(XCPRETTY)

.PHONY: xproj
xproj: $(MACOS_PROJ_PATH)
xed $(MACOS_WORK_PATH)

.PHONY: macos-test
macos-test: $(MACOS_PROJ_PATH)
set -o pipefail && $(MACOS_XCODEBUILD) -scheme 'CI' test $(XCPRETTY)

.PHONY: macos-lint
macos-lint:
find platform/macos -type f -name '*.plist' | xargs plutil -lint

.PHONY: xpackage
xpackage: $(MACOS_PROJ_PATH)
SYMBOLS=$(SYMBOLS) ./platform/macos/scripts/package.sh

.PHONY: xdeploy
xdeploy:
caffeinate -i ./platform/macos/scripts/deploy-packages.sh

.PHONY: xdocument
xdocument:
OUTPUT=$(OUTPUT) ./platform/macos/scripts/document.sh

.PHONY: genstrings
genstrings:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This make rule got removed along with all the other macOS rules at some point, but it’s actually important for keeping both the iOS and macOS map SDKs in sync with Transifex.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @tmpsantos @mapbox/gl-native @brunoabinader

genstrings -u -o platform/macos/sdk/Base.lproj platform/darwin/src/*.{m,mm}
genstrings -u -o platform/macos/sdk/Base.lproj platform/macos/src/*.{m,mm}
genstrings -u -o platform/ios/resources/Base.lproj platform/ios/src/*.{m,mm}
-find platform/ios/resources platform/macos/sdk -path '*/Base.lproj/*.strings' -exec \
textutil -convert txt -extension strings -inputencoding UTF-16 -encoding UTF-8 {} \;
mv platform/macos/sdk/Base.lproj/Foundation.strings platform/darwin/resources/Base.lproj/

endif

#### Miscellaneous targets #####################################################

.PHONY: style-code
Expand Down
18 changes: 9 additions & 9 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ workflows:
only: /ios-.*/
branches:
ignore: /.*/
#- macos-debug
- macos-debug
nightly:
triggers:
- schedule:
Expand Down Expand Up @@ -177,9 +177,9 @@ commands:
build-macos-test:
steps:
- run:
name: Build and run macOS tests
command: make run-test
no_output_timeout: 5m
name: Build macos-test
command: make macos-test
no_output_timeout: 20m


check-public-symbols:
Expand All @@ -202,7 +202,7 @@ commands:
steps:
- run:
name: Install macOS dependencies
command: brew install cmake ccache
command: brew install cmake ccache pkg-config glfw3

collect-xcode-build-logs:
steps:
Expand Down Expand Up @@ -490,7 +490,7 @@ jobs:
# ------------------------------------------------------------------------------
macos-debug:
macos:
xcode: "10.1.0"
xcode: "11.2.1"
environment:
BUILDTYPE: Debug
HOMEBREW_NO_AUTO_UPDATE: 1
Expand All @@ -504,9 +504,9 @@ jobs:
- run:
name: Lint plist files
command: make macos-lint
- run:
name: Nitpick Darwin code generation
command: scripts/nitpick/generated-code.js darwin
#- run:
# name: Nitpick Darwin code generation
# command: scripts/nitpick/generated-code.js darwin
- save-dependencies
- store_artifacts:
path: test/fixtures
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ HEADER_SEARCH_PATHS = $(inherited) "$(PROJECT_DIR)/../../vendor/mapbox-gl-native

LD_GENERATE_MAP_FILE = YES

LIBRARY_SEARCH_PATHS = $(inherited) $(PROJECT_DIR) $(PROJECT_DIR)/vendor/mapbox-accounts-ios
LIBRARY_SEARCH_PATHS = $(inherited) $(PROJECT_DIR)

OTHER_CFLAGS = $(inherited) -fvisibility=hidden
OTHER_CPLUSPLUSFLAGS = $(inherited) -fvisibility=hidden -fcxx-modules
Expand Down
9 changes: 5 additions & 4 deletions platform/darwin/test/MGLTileSetTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ - (void)testTileSetFromTileURLTemplates {
#if TARGET_OS_IPHONE
UIColor *redColor = [UIColor redColor];
#else
// CSS uses the sRGB color space. In macOS 10.12 Sierra and below,
// -[NSColor redColor] is in the calibrated RGB space and has a slightly
// different sRGB value than on iOS and macOS 10.13 High Sierra.
NSColor *redColor = [NSColor colorWithSRGBRed:1 green:0 blue:0 alpha:1];
// CSS uses the sRGB color space.
// AppKit incorrectly uses calibrated RGB when exporting HTML, so input
// calibrated RGB to ensure round-tripping.
// <rdar://problem/46115233> <http://www.openradar.me/46115233>
NSColor *redColor = [NSColor colorWithCalibratedRed:1 green:0 blue:0 alpha:1];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a reprise of mapbox/mapbox-gl-native#13387 that’s now possible because CircleCI is running a newer version of macOS.

#endif
NSAttributedString *gl = [[NSAttributedString alloc] initWithString:@"GL" attributes:@{
NSBackgroundColorAttributeName: redColor,
Expand Down
18 changes: 11 additions & 7 deletions platform/ios/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
## 5.7.0 - February 13, 2020

### Bug fixes
* Fixed an issue where `symbolSortKey` could sort text and icons incorrectly. ([#16023](https://github.com/mapbox/mapbox-gl-native/pull/16023))
* Fixed an issue where `MGLSymbolStyleLayer.symbolSortKey` could sort text and icons incorrectly. ([#16023](https://github.com/mapbox/mapbox-gl-native/pull/16023))
* Fixed a crash when parsing GeoJSON sources. ([#16106](https://github.com/mapbox/mapbox-gl-native/pull/16106))

### Other changes
Expand All @@ -28,19 +28,23 @@ This release includes a known issue where the binary size has increased. ([#63](
- Manual installation: New Github release artifact (`mapbox-ios-sdk-5.6.0-beta.1-dynamic-with-events.zip`) contains the `MapboxMobileEvents.framework`; please install this along with `Mapbox.framework`

### Networking and storage
* Make network requests for expired resources lower priority than requests for new resources. ([#15950](https://github.com/mapbox/mapbox-gl-native/pull/15950))
* Expired resources are now fetched at a lower priority than new resources. ([#15950](https://github.com/mapbox/mapbox-gl-native/pull/15950))

### Bug fixes
* Fixed the rendering bug caused by redundant pending requests for already requested images [#15864](https://github.com/mapbox/mapbox-gl-native/pull/15864)
* Enable incremental vacuum for the offline database in order to make data removal requests faster and to avoid the excessive disk space usage (creating a backup file on VACUUM call). ([#15837](https://github.com/mapbox/mapbox-gl-native/pull/15837))
* Fix ornaments' view constraints bug when devices change to bold-text mode. ([#57](https://github.com/mapbox/mapbox-gl-native-ios/pull/57))
* Fixed `MGLShapeSource` source flickering on style transition. ([#15907](https://github.com/mapbox/mapbox-gl-native/pull/15907))
* Fixed flickering caused by unnecessary removing and re-adding of the render sources when the order of their corresponding style objects was changed in the updated style ([#15941](https://github.com/mapbox/mapbox-gl-native/pull/15941))
* Fixed an issue where style layers backed by a shape source could flicker when transitioning between styles. ([#15907](https://github.com/mapbox/mapbox-gl-native/pull/15907), [#15941](https://github.com/mapbox/mapbox-gl-native/pull/15941))
* Fixed a crash when `MGLSymbolStyleLayer.textFontSize` is set to an expression that evaluates to `0`. ([#16080](https://github.com/mapbox/mapbox-gl-native/pull/16080))

### Other changes
* Convert GeoJSON features to tiles for the loaded source description in a background thread and thus unblock the UI thread ([#15885](https://github.com/mapbox/mapbox-gl-native/pull/15885))

## 5.5.1 - February 20, 2020

* Fixed an issue where `MGLSymbolStyleLayer.symbolSortKey` could sort text and icons incorrectly. ([#16023](https://github.com/mapbox/mapbox-gl-native/pull/16023))
* Fixed an issue where style layers backed by a shape source could flicker when transitioning between styles. ([#15907](https://github.com/mapbox/mapbox-gl-native/pull/15907), [#15941](https://github.com/mapbox/mapbox-gl-native/pull/15941))

## 5.5.0 - November 5, 2019

### Performance improvements
Expand Down Expand Up @@ -87,7 +91,7 @@ This release includes a known issue where the binary size has increased. ([#63](
### Other changes

* Fixed a bug where the completion block passed to `-[MGLMapView flyToCamera:completionHandler:]` (and related methods) wouldn't be called. ([#15473](https://github.com/mapbox/mapbox-gl-native/pull/15473))
* Fixed a crash when offline pack invalidation happened on different threads. ([#15582](https://github.com/mapbox/mapbox-gl-native/pull/15582))
* Fixed a crash when `-[MGLOfflinePack invalidate]` is called on different threads. ([#15582](https://github.com/mapbox/mapbox-gl-native/pull/15582))
* Fixed a potential integer overflow at high zoom levels. ([#15560](https://github.com/mapbox/mapbox-gl-native/pull/15560))
* Fixed a bug with annotation view positions after camera transitions. ([#15122](https://github.com/mapbox/mapbox-gl-native/pull/15122/))

Expand Down Expand Up @@ -119,7 +123,7 @@ This release changes how offline tile requests are billed — they are now bill
* Added the `MGLSymbolStyleLayer.textWritingModes` layout property. This property can be set to `MGLTextWritingModeHorizontal` or `MGLTextWritingModeVertical`. ([#14932](https://github.com/mapbox/mapbox-gl-native/pull/14932))
* Fixed rendering and collision detection issues with using `MGLSymbolStyleLayer.textVariableAnchor` and `MGLSymbolStyleLayer.iconTextFit` properties on the same layer. ([#15367](https://github.com/mapbox/mapbox-gl-native/pull/15367))
* Fixed symbol overlap when zooming out quickly. ([#15416](https://github.com/mapbox/mapbox-gl-native/pull/15416))
* Fixed a rendering issue where non-SDF icons would be treated as SDF icons if they are in the same layer. ([#15456](https://github.com/mapbox/mapbox-gl-native/pull/15456))
* Fixed an issue where non-template images would draw as template images when used in the same style layer. ([#15456](https://github.com/mapbox/mapbox-gl-native/pull/15456))

### Other changes

Expand Down Expand Up @@ -227,7 +231,7 @@ This release changes how offline tile requests are billed — they are now bill

* The `-[MGLMapView setCamera:withDuration:animationTimingFunction:edgePadding:completionHandler:]` method now adds the current value of the `MGLMapView.contentInset` property to the `edgePadding` parameter. ([#14813](https://github.com/mapbox/mapbox-gl-native/pull/14813))
* Setting `MGLMapView.contentInset` now moves the map’s focal point to the center of the content frame after insetting. ([#14664](https://github.com/mapbox/mapbox-gl-native/pull/14664))
* Fixed a feature querying bug caused by incorrect sort feature index calculation. ([#14884](https://github.com/mapbox/mapbox-gl-native/pull/14884))
* Fixed an issue where `-[MGLMapView visibleFeaturesInRect:]` and `-[MGLShapeSource featuresMatchingPredicate:]` omitted some features from the return value. ([#14884](https://github.com/mapbox/mapbox-gl-native/pull/14884))

## 5.0.0 - May 22, 2019

Expand Down
3 changes: 3 additions & 0 deletions platform/ios/ios.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#include "../darwin/darwin.xcconfig"

LIBRARY_SEARCH_PATHS = $(LIBRARY_SEARCH_PATHS) $(PROJECT_DIR)/vendor/mapbox-accounts-ios
Loading