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

Commit

Permalink
Merge branch 'master' into docs
Browse files Browse the repository at this point in the history
* master:
  Made changes to podspec for Xcode 12 build issues  (#482)
  Fix frame-delay bug affect UIViews. (#483)
  Bump sdk version to 6.2.1 (#477)
  Update gl-native to 5.1.0 (#475)
  Fix crash with nil font family name (#476)
  Location manager crash fix when a selector is not implemented (#474)
  Address crash when localFontFamilyName is nil (#467)
  Ensure pending completion blocks, even if rendering is not strictly required. (#463)
  [macos] respect MGLMapSnapshotter on macOS. (#448)
  Support Xcode 12 by excluding arm64 simulators and bumping Telemetry to 0.10.4 (#458)
  Release prep for version 6.2.0 (#453)
  Rename identifer -> identifier (#423)
  Fixed some typos and updated change log (#443)
  • Loading branch information
Katy DeCorah committed Sep 30, 2020
2 parents 4acd6e4 + f95c11b commit 8df87ee
Show file tree
Hide file tree
Showing 32 changed files with 241 additions and 224 deletions.
4 changes: 2 additions & 2 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
binary "https://api.mapbox.com/downloads/v2/carthage/mobile-maps-gl-core/mapbox-ios-sdk-gl-core-static.json" == 5.0.0
github "mapbox/mapbox-events-ios" ~> 0.10.2
binary "https://api.mapbox.com/downloads/v2/carthage/mobile-maps-gl-core/mapbox-ios-sdk-gl-core-static.json" == 5.1.0
github "mapbox/mapbox-events-ios" ~> 0.10.4
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
binary "https://api.mapbox.com/downloads/v2/carthage/mobile-maps-gl-core/mapbox-ios-sdk-gl-core-static.json" "5.0.0"
github "mapbox/mapbox-events-ios" "v0.10.3"
binary "https://api.mapbox.com/downloads/v2/carthage/mobile-maps-gl-core/mapbox-ios-sdk-gl-core-static.json" "5.1.0"
github "mapbox/mapbox-events-ios" "v0.10.4"
17 changes: 2 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ export TARGET_BRANCH ?= master

CMAKE ?= cmake

XCODE_VERSION := $(shell xcrun xcodebuild -version | head -1 | awk '{print $2}')
BETA := $(if $(filter $(XCODE_VERSION),12.0),true,false)


ifeq ($(BUILDTYPE), Release)
else ifeq ($(BUILDTYPE), RelWithDebInfo)
else ifeq ($(BUILDTYPE), Sanitize)
Expand Down Expand Up @@ -145,27 +141,18 @@ ifneq ($(SKIP_TESTING),)
IOS_XCODEBUILD_SIM += -skip-testing:$(SKIP_TESTING)
endif

ifeq ($(BETA),true)
IOS_XCODEBUILD_SIM += -xcconfig xcode-12-beta-fix.xcconfig
else
ifneq ($(CI),)
IOS_XCODEBUILD_SIM += -xcconfig platform/darwin/ci.xcconfig
endif
endif

$(IOS_OUTPUT_PATH):
mkdir -p $@

$(NETRC_FILE):
@echo "$$NETRC" > $(NETRC_FILE)

$(CARTHAGE_DEPS): $(NETRC_FILE) | $(IOS_OUTPUT_PATH)
ifeq ($(BETA),true)
@echo "Beta Xcode - applying Carthage workaround"
XCODE_XCCONFIG_FILE=$(CURDIR)/xcode-12-beta-fix.xcconfig carthage bootstrap --platform iOS --use-netrc
else
$(CARTHAGE_DEPS): | $(NETRC_FILE) $(IOS_OUTPUT_PATH)
carthage bootstrap --platform iOS --use-netrc
endif
@echo "Finishing bootstrapping"

$(IOS_USER_DATA_PATH)/WorkspaceSettings.xcsettings: platform/ios/WorkspaceSettings.xcsettings
Expand Down Expand Up @@ -340,4 +327,4 @@ distclean: clean
-rm -rf Carthage \
~/Library/Caches/carthage \
~/Library/Caches/org.carthage.kit
-rm -rf ./node_modules
-rm -rf ./node_modules
2 changes: 1 addition & 1 deletion platform/darwin/src/MGLFeature_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ id <MGLFeature> MGLFeatureFromMBGLFeature(const mbgl::GeoJSONFeature &feature);
MGLShape* MGLShapeFromGeoJSON(const mapbox::geojson::geojson &geojson);

/**
Takes an `mbgl::GeoJSONFeature` object, an identifer, and attributes dictionary and
Takes an `mbgl::GeoJSONFeature` object, an identifier, and attributes dictionary and
returns the feature object with converted `mbgl::FeatureIdentifier` and
`mbgl::PropertyMap` properties.
*/
Expand Down
4 changes: 2 additions & 2 deletions platform/darwin/src/MGLMapSnapshotter.mm
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ - (void)startWithQueue:(dispatch_queue_t)queue overlayHandler:(MGLMapSnapshotOve
return nil;
}

if (logoImage) {
if (logoImage && options.showsLogo) {
[logoImage drawInRect:logoImageRect];
}

Expand Down Expand Up @@ -725,7 +725,7 @@ - (void)configureWithOptions:(MGLMapSnapshotOptions *)options {
.withAssetPath(NSBundle.mainBundle.resourceURL.path.UTF8String);

// Create the snapshotter
auto localFontFamilyName = config.localFontFamilyName ? std::string(config.localFontFamilyName.UTF8String) : nullptr;
mbgl::optional<std::string> localFontFamilyName = config.localFontFamilyName ? mbgl::optional<std::string>(std::string(config.localFontFamilyName.UTF8String)) : mbgl::nullopt;
_delegateHost = std::make_unique<MGLMapSnapshotterDelegateHost>(self);
_mbglMapSnapshotter = std::make_unique<mbgl::MapSnapshotter>(
size, pixelRatio, resourceOptions, *_delegateHost, localFontFamilyName);
Expand Down
22 changes: 11 additions & 11 deletions platform/darwin/src/MGLStyle.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ This set does not include Mapbox Streets source identifiers, which are included
style URL to an explicitly versioned style using a convenience method like
`+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`’s “Style URL”
inspectable in Interface Builder, or a manually constructed `NSURL`. This
approach also avoids source identifer name changes that will occur in the default
approach also avoids source identifier name changes that will occur in the default
style’s sources over time.
@return An instance of a concrete subclass of `MGLSource` associated with the
Expand Down Expand Up @@ -312,7 +312,7 @@ This set does not include Mapbox Streets source identifiers, which are included
style URL to an explicitly versioned style using a convenience method like
`+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`’s “Style URL”
inspectable in Interface Builder, or a manually constructed `NSURL`. This
approach also avoids source identifer name changes that will occur in the default
approach also avoids source identifier name changes that will occur in the default
style’s sources over time.
@param source The source to remove from the current style.
Expand All @@ -327,7 +327,7 @@ This set does not include Mapbox Streets source identifiers, which are included
style URL to an explicitly versioned style using a convenience method like
`+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`’s “Style URL”
inspectable in Interface Builder, or a manually constructed `NSURL`. This
approach also avoids source identifer name changes that will occur in the default
approach also avoids source identifier name changes that will occur in the default
style’s sources over time.
@param source The source to remove from the current style.
Expand Down Expand Up @@ -355,7 +355,7 @@ This set does not include Mapbox Streets source identifiers, which are included
the style URL to an explicitly versioned style using a convenience method like
`+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`’s “Style URL”
inspectable in Interface Builder, or a manually constructed `NSURL`. This
approach also avoids layer identifer name changes that will occur in the default
approach also avoids layer identifier name changes that will occur in the default
style’s layers over time.
@return An instance of a concrete subclass of `MGLStyleLayer` associated with
Expand All @@ -368,7 +368,7 @@ This set does not include Mapbox Streets source identifiers, which are included
Adds a new layer on top of existing layers.
@note Adding the same layer instance more than once will result in a
`MGLRedundantLayerException`. Reusing the same layer identifer, even with
`MGLRedundantLayerException`. Reusing the same layer identifier, even with
different layer instances, will also result in an exception.
@note Layers should be added in
Expand All @@ -385,7 +385,7 @@ This set does not include Mapbox Streets source identifiers, which are included
Inserts a new layer into the style at the given index.
@note Adding the same layer instance more than once will result in a
`MGLRedundantLayerException`. Reusing the same layer identifer, even with
`MGLRedundantLayerException`. Reusing the same layer identifier, even with
different layer instances, will also result in an exception.
@note Layers should be added in
Expand All @@ -408,11 +408,11 @@ This set does not include Mapbox Streets source identifiers, which are included
the style URL to an explicitly versioned style using a convenience method like
`+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`’s “Style URL”
inspectable in Interface Builder, or a manually constructed `NSURL`. This
approach also avoids layer identifer name changes that will occur in the default
approach also avoids layer identifier name changes that will occur in the default
style’s layers over time.
Inserting the same layer instance more than once will result in a
`MGLRedundantLayerException`. Reusing the same layer identifer, even with
`MGLRedundantLayerException`. Reusing the same layer identifier, even with
different layer instances, will also result in an exception.
@param layer The layer to insert.
Expand All @@ -433,11 +433,11 @@ This set does not include Mapbox Streets source identifiers, which are included
the style URL to an explicitly versioned style using a convenience method like
`+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`’s “Style URL”
inspectable in Interface Builder, or a manually constructed `NSURL`. This
approach also avoids layer identifer name changes that will occur in the default
approach also avoids layer identifier name changes that will occur in the default
style’s layers over time.
Inserting the same layer instance more than once will result in a
`MGLRedundantLayerException`. Reusing the same layer identifer, even with
`MGLRedundantLayerException`. Reusing the same layer identifier, even with
different layer instances, will also result in an exception.
@param layer The layer to insert.
Expand All @@ -458,7 +458,7 @@ This set does not include Mapbox Streets source identifiers, which are included
the style URL to an explicitly versioned style using a convenience method like
`+[MGLStyle outdoorsStyleURLWithVersion:]`, `MGLMapView`’s “Style URL”
inspectable in Interface Builder, or a manually constructed `NSURL`. This
approach also avoids layer identifer name changes that will occur in the default
approach also avoids layer identifier name changes that will occur in the default
style’s layers over time.
@param layer The layer object to remove from the map view. This object
Expand Down
2 changes: 1 addition & 1 deletion platform/darwin/src/MGLStyleLayer_Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct LayerWrapper {
format: \
@"Either this layer got invalidated after the style change or " \
@"-[MGLStyle removeLayer:] has been called " \
@"with this instance but another style layer instance was added with the same identifer. It is an " \
@"with this instance but another style layer instance was added with the same identifier. It is an " \
@"error to send any message to this layer since it cannot be recovered after removal due to the " \
@"identifier collision. Use unique identifiers for all layer instances including layers of " \
@"different types."]; \
Expand Down
4 changes: 2 additions & 2 deletions platform/darwin/test/MGLStyleTests.mm
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ - (void)testAddingSourceOfTypeABeforeSourceOfTypeBWithSameIdentifier {
// Add the shape source
[self.style addSource:imageSource];

// Attempt to remove a vector tile source with the same identifer as the shape source
// Attempt to remove a vector tile source with the same identifier as the shape source
MGLVectorTileSource *vectorTileSource = [[MGLVectorTileSource alloc] initWithIdentifier:@"some-identifier" tileURLTemplates:@[] options:nil];
[self.style removeSource:vectorTileSource];
// The image source should still be added
Expand All @@ -221,7 +221,7 @@ - (void)testAddingSourceOfTypeABeforeSourceOfTypeBWithSameIdentifier {
// Add the vector tile source
[self.style addSource:vectorTileSource];

// Attempt to remove the previously created raster tile source that has the same identifer as the shape source
// Attempt to remove the previously created raster tile source that has the same identifier as the shape source
[self.style removeSource:rasterTileSource];
// The vector tile source should still be added
XCTAssertTrue([[self.style sourceWithIdentifier:imageSource.identifier] isMemberOfClass:[MGLVectorTileSource class]]);
Expand Down
36 changes: 26 additions & 10 deletions platform/ios/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,51 @@

Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started.

## 6.2.0
## master

**This release supports beta versions of iOS 14.**
### 🐞 Bug fixes

* Fixed a bug with UIViews being incorrectly updated with a one frame delay. ([#483](https://github.com/mapbox/mapbox-gl-native-ios/pull/483))
* Fixed an issue where CocoaPods users could not install the SDK when using Xcode 12. ([#482](https://github.com/mapbox/mapbox-gl-native-ios/pull/82))

## 6.2.1 - September 23, 2020

* Fixed an issue where completion blocks were not called until the map was rendered. ([#463](https://github.com/mapbox/mapbox-gl-native-ios/pull/463))
* Fixed an issue that caused a crash when custom location managers did not implement `MGLLocationManager.accuracyAuthorization`. ([#474](https://github.com/mapbox/mapbox-gl-native-ios/pull/474))
* Fixed a crash that occurred when `MGLIdeographicFontFamilyName` was set to `NO`. ([#467](https://github.com/mapbox/mapbox-gl-native-ios/pull/467), [#476](https://github.com/mapbox/mapbox-gl-native-ios/pull/476))
* Fixed an issue with local font glyph rendering, by updating the core library to version 5.1.0. ([#475](https://github.com/mapbox/mapbox-gl-native-ios/pull/475))

### 🔧 Dependencies

* Core library updated to `5.1.0`. ([#475](https://github.com/mapbox/mapbox-gl-native-ios/pull/475))

## 6.2.0 - September 17, 2020

You should not submit apps built with `6.2.0-beta.N` to the App Store. If you need to submit a build to TestFlight you should use Xcode 12 beta 6 (or newer). [Read more](https://github.com/mapbox/mapbox-gl-native-ios/issues/418).
**This release supports iOS 14 and Xcode 12**
For building with Xcode 12, please ensure that mapbox-events-ios is at version 0.10.4 or higher. Please see our [dependency instructions](https://docs.mapbox.com/ios/maps/overview/#add-the-dependency) for more details. This version does not support Apple Silicon Macs (arm64).

### ✨ New features

* Added `MGLLocationManager.accuracyAuthorization` to check the level of accuracy the app is allowed to support. ([#361](https://github.com/mapbox/mapbox-gl-native-ios/pull/361))
* Added `[MGLLocationManager requestTemporaryFullAccuracyAuthorizationWithPurposeKeyproperty:]` to allow developers request just-in-time full-accuracy permissions. ([#361](https://github.com/mapbox/mapbox-gl-native-ios/pull/361))
* Added `[MGLLocationManager requestTemporaryFullAccuracyAuthorizationWithPurposeKey:]` to allow developers request just-in-time full-accuracy permissions. ([#361](https://github.com/mapbox/mapbox-gl-native-ios/pull/361))
* Added `[MGLLocationManagerDelegate locationManagerDidChangeAuthorization:]` to let `MGLMapView` know about privacy changes. ([#376](https://github.com/mapbox/mapbox-gl-native-ios/pull/376))
* Added `[MGLMapViewDelegate mapView:didChangeLocationManagerAuthorization:]` to allow developers adjust their apps to privacy settings changes. ([#376](https://github.com/mapbox/mapbox-gl-native-ios/pull/376))
* Added an approximate user location halo when `MGLLocationManager.accuracyAuthorization` is set to `CLAccuracyAuthorizationReducedAccuracy`. ([#381](https://github.com/mapbox/mapbox-gl-native-ios/pull/381))
* The `MGLAccuracyAuthorizationDescription` as element of `NSLocationTemporaryUsageDescriptionDictionary` Info.plist key can now be set to describe why you request accuracy authorization. ([#392](https://github.com/mapbox/mapbox-gl-native-ios/pull/392))
* Added `[MGLMapViewDelegate mapViewStyleForDefaultUserLocationAnnotationView:]` and `MGLUserLocationAnnotationViewStyle` class to allow developers customize the default user location annotation view UI style. ([#403](https://github.com/mapbox/mapbox-gl-native-ios/pull/403))
* Added `MGLNetworkConfiguration.connected` property to enforce `MGLMapView` to use cached tiles. ([#416](https://github.com/mapbox/mapbox-gl-native-ios/pull/416))
* Enabled local glyph rasterization for all writing systems. The new feature uses real glyph metrics and improves rendering quality for mixed (Latin / CJKV) labels. (#561)
* Minimum and Maximum allowed values are now considered for style layer properties, as defined by the specification. If a style property is assigned with a value outside the allowed range, the property gets assigned with its default value instead. (#647)
* Fixed an issue that caused ornaments to consider safe areas when `MGLMapView.automaticallyAdjustsContentInset` is set to `NO`. ([#420](https://github.com/mapbox/mapbox-gl-native-ios/pull/420))

### 🐞 Bug fixes

* Fixed an issue where the map would hang periodically (on iOS 14 beta). ([#411](https://github.com/mapbox/mapbox-gl-native-ios/pull/411))
* Fixed an issue where the map would hang periodically (on iOS 14). ([#411](https://github.com/mapbox/mapbox-gl-native-ios/pull/411))
* Fixed a sporadic crash when the application "resigns active", for example, when showing Control Center. ([#412](https://github.com/mapbox/mapbox-gl-native-ios/pull/412))
* Fixed an issue that caused ornaments to consider safe areas when `MGLMapView.automaticallyAdjustsContentInset` is set to `NO`. ([#420](https://github.com/mapbox/mapbox-gl-native-ios/pull/420))
* Fixed an issue that caused rendering crashes when entering the background. ([#432](https://github.com/mapbox/mapbox-gl-native-ios/pull/432))

### 🔧 Dependencies

* Core library updated to `5.0.0`. ([#438](https://github.com/mapbox/mapbox-gl-native-ios/pull/438))
* `mapbox-events-ios` versioning updated to `~> 0.10.2`. Compiling 0.10.3 with Carthage and Xcode 11.1 will fail; this is a known [compilation issue](https://github.com/mapbox/mapbox-events-ios/issues/236) with earlier versions of Xcode.
* Supported Xcode 12 by updating `mapbox-events-ios` to `~> 0.10.4`.([#458](https://github.com/mapbox/mapbox-gl-native-ios/pull/458))
* Core library updated to `4.0.0`. ([#458](https://github.com/mapbox/mapbox-gl-native-ios/pull/458))

## 6.1.0 - August 26, 2020

Expand Down
4 changes: 2 additions & 2 deletions platform/ios/Integration Test Harness/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>6.2.0</string>
<string>6.2.1</string>
<key>CFBundleVersion</key>
<string>15268</string>
<string>15271</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
Loading

0 comments on commit 8df87ee

Please sign in to comment.