diff --git a/platform/darwin/src/MGLAccountManager.h b/platform/darwin/src/MGLAccountManager.h index 63440046f72..2a11b2869e0 100644 --- a/platform/darwin/src/MGLAccountManager.h +++ b/platform/darwin/src/MGLAccountManager.h @@ -6,7 +6,7 @@ NS_ASSUME_NONNULL_BEGIN /** The MGLAccountManager object provides a global way to set a Mapbox API access - token, as well as other settings used framework-wide. + token. */ @interface MGLAccountManager : NSObject diff --git a/platform/darwin/src/MGLTypes.h b/platform/darwin/src/MGLTypes.h index 746cb686c02..2579451f2d4 100644 --- a/platform/darwin/src/MGLTypes.h +++ b/platform/darwin/src/MGLTypes.h @@ -29,7 +29,10 @@ typedef NS_ENUM(NSInteger, MGLErrorCode) { MGLErrorCodeConnectionFailed = 3, }; -/** The mode used to track the user location on the map. */ +/** + The mode used to track the user location on the map. Used with + `MGLMapView.userTrackingMode`. + */ typedef NS_ENUM(NSUInteger, MGLUserTrackingMode) { /** The map does not follow the user location. */ MGLUserTrackingModeNone = 0, diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index db5265e64f6..b198eec45a6 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -37,7 +37,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CON - The user dot now moves smoothly between user location updates while user location tracking is disabled. ([#1582](https://github.com/mapbox/mapbox-gl-native/pull/1582)) - Fixed an issue preventing KVO change notifications from being generated on MGLMapView’s `userTrackingMode` key path when `-setUserTrackingMode:animated:` is called. ([#4724](https://github.com/mapbox/mapbox-gl-native/pull/4724)) -- Fixed a crash setting MGLMapView’s `userLocationVerticalAlignment` property before a user location update has occurred. ([#5274](https://github.com/mapbox/mapbox-gl-native/issues/5274)) +- Fixed a crash setting MGLMapView’s `userLocationVerticalAlignment` property before a user location update has occurred. ([#5278](https://github.com/mapbox/mapbox-gl-native/pull/5278)) - Mapbox Telemetry is automatically disabled while the host application is running in the iOS Simulator. ([#4726](https://github.com/mapbox/mapbox-gl-native/pull/4726)) ### Offline maps diff --git a/platform/ios/Mapbox-iOS-SDK-static-part.podspec b/platform/ios/Mapbox-iOS-SDK-static-part.podspec new file mode 100644 index 00000000000..86d2a7b936d --- /dev/null +++ b/platform/ios/Mapbox-iOS-SDK-static-part.podspec @@ -0,0 +1,11 @@ + m.ios.deployment_target = '7.0' + + m.requires_arc = true + + m.preserve_paths = '**' + m.source_files = 'Headers/*.h', 'MGLDummy.m' + m.resource_bundle = { 'Mapbox' => 'Mapbox.bundle/*' } + m.vendored_frameworks = 'Mapbox.framework' + m.module_name = 'Mapbox' + +end diff --git a/platform/ios/Mapbox-iOS-SDK-symbols.podspec b/platform/ios/Mapbox-iOS-SDK-symbols.podspec index 73a505a256c..85a42ef2b39 100644 --- a/platform/ios/Mapbox-iOS-SDK-symbols.podspec +++ b/platform/ios/Mapbox-iOS-SDK-symbols.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |m| m.name = 'Mapbox-iOS-SDK' - m.version = '3.3.0-rc.1-symbols' + m.version = '3.3.0-symbols' m.summary = 'Open source vector map solution for iOS with full styling capabilities.' m.description = 'Open source, OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa Touch APIs.' diff --git a/platform/ios/Mapbox-iOS-SDK.podspec b/platform/ios/Mapbox-iOS-SDK.podspec index 391a3a073b9..a461b7e779d 100644 --- a/platform/ios/Mapbox-iOS-SDK.podspec +++ b/platform/ios/Mapbox-iOS-SDK.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |m| m.name = 'Mapbox-iOS-SDK' - m.version = '3.3.0-rc.1' + m.version = '3.3.0' m.summary = 'Open source vector map solution for iOS with full styling capabilities.' m.description = 'Open source, OpenGL-based vector map solution for iOS with full styling capabilities and Cocoa Touch APIs.' diff --git a/platform/ios/jazzy.yml b/platform/ios/jazzy.yml index aec0d5fe9f5..ce09b8b39dc 100644 --- a/platform/ios/jazzy.yml +++ b/platform/ios/jazzy.yml @@ -19,22 +19,15 @@ custom_categories: children: - MGLAccountManager - MGLMapCamera - - MGLMapDebugMaskOptions - MGLMapView - - MGLMapViewDecelerationRateFast - - MGLMapViewDecelerationRateImmediate - - MGLMapViewDecelerationRateNormal - MGLMapViewDelegate - MGLStyle - - MGLStyleDefaultVersion - MGLUserTrackingMode - name: Annotations children: - MGLAnnotation - MGLAnnotationImage - - MGLAnnotationVerticalAlignment - MGLAnnotationView - - MGLAnnotationViewDragState - MGLCalloutView - MGLCalloutViewDelegate - MGLMultiPoint @@ -62,17 +55,8 @@ custom_categories: - MGLOfflineRegion - MGLOfflineStorage - MGLOfflinePack - - MGLOfflinePackAdditionCompletionHandler - - MGLOfflinePackErrorNotification - - MGLOfflinePackErrorUserInfoKey - - MGLOfflinePackMaximumCountUserInfoKey - - MGLOfflinePackMaximumMapboxTilesReachedNotification - MGLOfflinePackProgress - - MGLOfflinePackProgressChangedNotification - - MGLOfflinePackProgressUserInfoKey - - MGLOfflinePackRemovalCompletionHandler - MGLOfflinePackState - - MGLOfflinePackStateUserInfoKey - MGLTilePyramidOfflineRegion - name: Geometry children: diff --git a/platform/ios/scripts/package.sh b/platform/ios/scripts/package.sh index 5650dc144bc..3e97a7a3990 100755 --- a/platform/ios/scripts/package.sh +++ b/platform/ios/scripts/package.sh @@ -178,24 +178,32 @@ if [[ "${GCC_GENERATE_DEBUGGING_SYMBOLS}" == false ]]; then fi fi -function create_local_podspec { - step "Creating local podspec" +function create_podspec { + step "Creating local podspec (${1})" + [[ $SYMBOLS = YES ]] && POD_SUFFIX="-symbols" || POD_SUFFIX="" POD_SOURCE_PATH=' :path => ".",' POD_FRAMEWORKS=" m.vendored_frameworks = '"${NAME}".framework'" - [[ $SYMBOLS = YES ]] && POD_SUFFIX="-symbols" || POD_SUFFIX="" - POD_LOCALSPEC=${OUTPUT}/$1/${NAME}-iOS-SDK${POD_SUFFIX}.podspec - sed "s/.*:http.*/${POD_SOURCE_PATH}/" platform/ios/${NAME}-iOS-SDK${POD_SUFFIX}.podspec > ${POD_LOCALSPEC} - sed -i.bak "s/.*vendored_frameworks.*/${POD_FRAMEWORKS}/" ${POD_LOCALSPEC} - rm -rf ${POD_LOCALSPEC}.bak - cp -pv LICENSE.md ${OUTPUT}/$1/ + INPUT_PODSPEC=platform/ios/${NAME}-iOS-SDK${POD_SUFFIX}.podspec + OUTPUT_PODSPEC=${OUTPUT}/${1}/${NAME}-iOS-SDK${POD_SUFFIX}.podspec + if [[ ${1} == "dynamic" ]]; then + sed "s/.*:http.*/${POD_SOURCE_PATH}/" ${INPUT_PODSPEC} > ${OUTPUT_PODSPEC} + sed -i '' "s/.*vendored_frameworks.*/${POD_FRAMEWORKS}/" ${OUTPUT_PODSPEC} + fi + if [[ ${1} == "static" ]]; then + awk '/Pod::Spec.new/,/m.platform/' ${INPUT_PODSPEC} > ${OUTPUT_PODSPEC} + cat platform/ios/${NAME}-iOS-SDK-static-part.podspec >> ${OUTPUT_PODSPEC} + sed -i '' "s/.*:http.*/${POD_SOURCE_PATH}/" ${OUTPUT_PODSPEC} + fi + cp -pv LICENSE.md ${OUTPUT}/${1}/ } if [[ ${BUILD_STATIC} == true ]]; then stat "${OUTPUT}/static/${NAME}.framework" + create_podspec "static" fi if [[ ${BUILD_DYNAMIC} == true ]]; then stat "${OUTPUT}/dynamic/${NAME}.framework" - create_local_podspec "dynamic" + create_podspec "dynamic" fi if [[ ${BUILD_STATIC} == true ]]; then diff --git a/platform/ios/src/MGLAnnotationView.h b/platform/ios/src/MGLAnnotationView.h index 622c31c7b3e..5469841036d 100644 --- a/platform/ios/src/MGLAnnotationView.h +++ b/platform/ios/src/MGLAnnotationView.h @@ -6,7 +6,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol MGLAnnotation; -/** These constants indicate the current drag state of an annotation view. **/ +/** These constants indicate the current drag state of an annotation view. */ typedef NS_ENUM(NSUInteger, MGLAnnotationViewDragState) { /** The view is not involved in a drag operation. @@ -64,7 +64,7 @@ typedef NS_ENUM(NSUInteger, MGLAnnotationViewDragState) { leaves the viewport, the map view moves its associated view to a reuse queue. When a new annotation becomes visible, you can request a view for that annotation by passing the appropriate reuse identifier string to the - `-[MGLMapView dequeueReusableAnnotationViewWithIdentifier:` method. + `-[MGLMapView dequeueReusableAnnotationViewWithIdentifier:]` method. @param reuseIdentifier A unique string identifier for this view that allows you to reuse this view with multiple similar annotations. You can set this diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h index 4cd4a58131e..cfa6d828fe6 100644 --- a/platform/ios/src/MGLMapView.h +++ b/platform/ios/src/MGLMapView.h @@ -30,7 +30,10 @@ extern const CGFloat MGLMapViewDecelerationRateFast; /** Disables decleration in a map view. */ extern const CGFloat MGLMapViewDecelerationRateImmediate; -/** The vertical alignment of an annotation within a map view. */ +/** + The vertical alignment of an annotation within a map view. Used with + `MGLMapView.userLocationVerticalAlignment`. + */ typedef NS_ENUM(NSUInteger, MGLAnnotationVerticalAlignment) { /** Aligns the annotation vertically in the center of the map view. */ MGLAnnotationVerticalAlignmentCenter = 0, diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 28b030b7dd1..0238ef22be8 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -3463,8 +3463,8 @@ - (void)selectAnnotation:(id )annotation animated:(BOOL)animated positioningRect = annotationView.frame; [annotationView.superview bringSubviewToFront:annotationView]; - - annotationView.selected = YES; + + [annotationView setSelected:YES animated:animated]; } } @@ -4586,8 +4586,8 @@ - (void)updateAnnotationViews [self.glView addSubview:annotationView]; } - annotationView.center = [self convertCoordinate:annotationContext.annotation.coordinate toPointToView:self]; annotationView.mapView = self; + annotationView.center = [self convertCoordinate:annotationContext.annotation.coordinate toPointToView:self]; annotationContext.annotationView = annotationView; } } diff --git a/platform/macos/jazzy.yml b/platform/macos/jazzy.yml index 9e160d050fa..af50bb22df2 100644 --- a/platform/macos/jazzy.yml +++ b/platform/macos/jazzy.yml @@ -18,11 +18,9 @@ custom_categories: children: - MGLAccountManager - MGLMapCamera - - MGLMapDebugMaskOptions - MGLMapView - MGLMapViewDelegate - MGLStyle - - MGLStyleDefaultVersion - MGLUserTrackingMode - name: Annotations children: @@ -52,17 +50,8 @@ custom_categories: - MGLOfflineRegion - MGLOfflineStorage - MGLOfflinePack - - MGLOfflinePackAdditionCompletionHandler - - MGLOfflinePackErrorNotification - - MGLOfflinePackErrorUserInfoKey - - MGLOfflinePackMaximumCountUserInfoKey - - MGLOfflinePackMaximumMapboxTilesReachedNotification - MGLOfflinePackProgress - - MGLOfflinePackProgressChangedNotification - - MGLOfflinePackProgressUserInfoKey - - MGLOfflinePackRemovalCompletionHandler - MGLOfflinePackState - - MGLOfflinePackStateUserInfoKey - MGLTilePyramidOfflineRegion - name: Geometry children: @@ -75,6 +64,7 @@ custom_categories: - MGLCoordinateBoundsMake - MGLCoordinateBoundsOffset - MGLCoordinateFormatter + - MGLCoordinateInCoordinateBounds - MGLCoordinateSpan - MGLCoordinateSpanEqualToCoordinateSpan - MGLCoordinateSpanMake