From 256689a33d465e8909e9bc5883ee3340551c7dca Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Wed, 17 Aug 2016 15:30:39 -0400 Subject: [PATCH] [ios, macos] Make Xcode 7.3 the minimum required version - Removes nullability shims for Xcode 6. - Removes MGLTypes.h from files where it was only being used for nullability support. - Accepts that `NS_SWIFT_NAME` is not fully supported by Xcode 7.2 and lower. - Adds documentation about Xcode 7.3 requirement. --- platform/darwin/src/MGLAccountManager.h | 2 -- platform/darwin/src/MGLAnnotation.h | 2 -- platform/darwin/src/MGLBackgroundStyleLayer.h | 1 - platform/darwin/src/MGLCircleStyleLayer.h | 1 - platform/darwin/src/MGLClockDirectionFormatter.h | 2 -- platform/darwin/src/MGLCompassDirectionFormatter.h | 2 -- platform/darwin/src/MGLCoordinateFormatter.h | 2 -- platform/darwin/src/MGLFeature.h | 2 -- platform/darwin/src/MGLFillStyleLayer.h | 1 - platform/darwin/src/MGLGeometry.h | 2 -- platform/darwin/src/MGLLineStyleLayer.h | 1 - platform/darwin/src/MGLMapCamera.h | 2 -- platform/darwin/src/MGLMultiPoint.h | 2 -- platform/darwin/src/MGLMultiPoint_Private.h | 1 - platform/darwin/src/MGLOfflineRegion.h | 2 -- platform/darwin/src/MGLOverlay.h | 2 -- platform/darwin/src/MGLPointAnnotation.h | 2 -- platform/darwin/src/MGLRasterStyleLayer.h | 1 - platform/darwin/src/MGLShape.h | 2 -- platform/darwin/src/MGLStyle.h | 4 ++-- platform/darwin/src/MGLStyleAttribute.mm | 2 ++ platform/darwin/src/MGLStyleAttributeValue.h | 2 -- platform/darwin/src/MGLStyleAttributeValue_Private.h | 1 - platform/darwin/src/MGLStyleLayer.h.ejs | 1 - platform/darwin/src/MGLStyleLayer.mm | 1 - platform/darwin/src/MGLSymbolStyleLayer.h | 1 - platform/darwin/src/MGLTypes.h | 10 ---------- platform/darwin/src/NSData+MGLAdditions.h | 2 -- platform/darwin/src/NSString+MGLAdditions.h | 2 -- platform/darwin/src/NSURL+MGLAdditions.h | 2 -- platform/ios/CHANGELOG.md | 1 + platform/ios/DEVELOPING.md | 3 +++ platform/ios/INSTALL.md | 4 +++- platform/ios/docs/pod-README.md | 2 ++ platform/ios/src/MGLAPIClient.h | 8 ++++++-- platform/ios/src/MGLAnnotationImage.h | 2 -- platform/ios/src/MGLAnnotationView.h | 2 -- platform/ios/src/MGLCalloutView.h | 2 -- platform/ios/src/MGLMapView+IBAdditions.h | 2 -- platform/ios/src/MGLUserLocation.h | 2 -- platform/ios/src/MGLUserLocationAnnotationView.h | 2 -- platform/macos/DEVELOPING.md | 5 ++++- platform/macos/INSTALL.md | 2 +- platform/macos/src/MGLAnnotationImage.h | 2 -- platform/macos/src/MGLMapView.h | 1 + platform/macos/src/MGLMapViewDelegate.h | 2 -- platform/macos/src/MGLOpenGLLayer.h | 2 -- 47 files changed, 25 insertions(+), 79 deletions(-) diff --git a/platform/darwin/src/MGLAccountManager.h b/platform/darwin/src/MGLAccountManager.h index 2a11b2869e0..fe602aa2109 100644 --- a/platform/darwin/src/MGLAccountManager.h +++ b/platform/darwin/src/MGLAccountManager.h @@ -1,7 +1,5 @@ #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/darwin/src/MGLAnnotation.h b/platform/darwin/src/MGLAnnotation.h index 7293aeec4ff..4c8f600240b 100644 --- a/platform/darwin/src/MGLAnnotation.h +++ b/platform/darwin/src/MGLAnnotation.h @@ -2,8 +2,6 @@ #import #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/darwin/src/MGLBackgroundStyleLayer.h b/platform/darwin/src/MGLBackgroundStyleLayer.h index 4b0fddeceb4..8fa9abddec5 100644 --- a/platform/darwin/src/MGLBackgroundStyleLayer.h +++ b/platform/darwin/src/MGLBackgroundStyleLayer.h @@ -1,7 +1,6 @@ // This file is generated. // Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`. -#import "MGLTypes.h" #import "MGLStyleAttributeValue.h" #import "MGLBaseStyleLayer.h" diff --git a/platform/darwin/src/MGLCircleStyleLayer.h b/platform/darwin/src/MGLCircleStyleLayer.h index eaab3b843d4..c5a344d4195 100644 --- a/platform/darwin/src/MGLCircleStyleLayer.h +++ b/platform/darwin/src/MGLCircleStyleLayer.h @@ -1,7 +1,6 @@ // This file is generated. // Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`. -#import "MGLTypes.h" #import "MGLStyleAttributeValue.h" #import "MGLBaseStyleLayer.h" diff --git a/platform/darwin/src/MGLClockDirectionFormatter.h b/platform/darwin/src/MGLClockDirectionFormatter.h index e467b20e06c..ea427aa7b1b 100644 --- a/platform/darwin/src/MGLClockDirectionFormatter.h +++ b/platform/darwin/src/MGLClockDirectionFormatter.h @@ -1,8 +1,6 @@ #import #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/darwin/src/MGLCompassDirectionFormatter.h b/platform/darwin/src/MGLCompassDirectionFormatter.h index c2a6e000fab..fde26ba42ad 100644 --- a/platform/darwin/src/MGLCompassDirectionFormatter.h +++ b/platform/darwin/src/MGLCompassDirectionFormatter.h @@ -1,8 +1,6 @@ #import #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/darwin/src/MGLCoordinateFormatter.h b/platform/darwin/src/MGLCoordinateFormatter.h index 3759576d2a4..909c1e8935c 100644 --- a/platform/darwin/src/MGLCoordinateFormatter.h +++ b/platform/darwin/src/MGLCoordinateFormatter.h @@ -1,8 +1,6 @@ #import #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/darwin/src/MGLFeature.h b/platform/darwin/src/MGLFeature.h index 1ab587ede54..aec4223b128 100644 --- a/platform/darwin/src/MGLFeature.h +++ b/platform/darwin/src/MGLFeature.h @@ -5,8 +5,6 @@ #import "MGLPointAnnotation.h" #import "MGLShapeCollection.h" -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/darwin/src/MGLFillStyleLayer.h b/platform/darwin/src/MGLFillStyleLayer.h index 06a58b12bdf..de5369a3335 100644 --- a/platform/darwin/src/MGLFillStyleLayer.h +++ b/platform/darwin/src/MGLFillStyleLayer.h @@ -1,7 +1,6 @@ // This file is generated. // Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`. -#import "MGLTypes.h" #import "MGLStyleAttributeValue.h" #import "MGLBaseStyleLayer.h" diff --git a/platform/darwin/src/MGLGeometry.h b/platform/darwin/src/MGLGeometry.h index ca99eaf16f5..5fc927697be 100644 --- a/platform/darwin/src/MGLGeometry.h +++ b/platform/darwin/src/MGLGeometry.h @@ -2,8 +2,6 @@ #import #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** Defines the area spanned by an `MGLCoordinateBounds`. */ diff --git a/platform/darwin/src/MGLLineStyleLayer.h b/platform/darwin/src/MGLLineStyleLayer.h index 6f3472b0b31..812e759ebc8 100644 --- a/platform/darwin/src/MGLLineStyleLayer.h +++ b/platform/darwin/src/MGLLineStyleLayer.h @@ -1,7 +1,6 @@ // This file is generated. // Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`. -#import "MGLTypes.h" #import "MGLStyleAttributeValue.h" #import "MGLBaseStyleLayer.h" diff --git a/platform/darwin/src/MGLMapCamera.h b/platform/darwin/src/MGLMapCamera.h index 4b50c32b2f6..f6bff36280d 100644 --- a/platform/darwin/src/MGLMapCamera.h +++ b/platform/darwin/src/MGLMapCamera.h @@ -2,8 +2,6 @@ #import #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/darwin/src/MGLMultiPoint.h b/platform/darwin/src/MGLMultiPoint.h index 2d6b3270861..59d9cd94291 100644 --- a/platform/darwin/src/MGLMultiPoint.h +++ b/platform/darwin/src/MGLMultiPoint.h @@ -3,8 +3,6 @@ #import "MGLShape.h" -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/darwin/src/MGLMultiPoint_Private.h b/platform/darwin/src/MGLMultiPoint_Private.h index aa52a02fcb2..dc391727234 100644 --- a/platform/darwin/src/MGLMultiPoint_Private.h +++ b/platform/darwin/src/MGLMultiPoint_Private.h @@ -1,7 +1,6 @@ #import "MGLMultiPoint.h" #import "MGLGeometry.h" -#import "MGLTypes.h" #import #import diff --git a/platform/darwin/src/MGLOfflineRegion.h b/platform/darwin/src/MGLOfflineRegion.h index cf98e253bd3..fe0ab6cb7f3 100644 --- a/platform/darwin/src/MGLOfflineRegion.h +++ b/platform/darwin/src/MGLOfflineRegion.h @@ -1,7 +1,5 @@ #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/darwin/src/MGLOverlay.h b/platform/darwin/src/MGLOverlay.h index ba03b19737b..382305b4444 100644 --- a/platform/darwin/src/MGLOverlay.h +++ b/platform/darwin/src/MGLOverlay.h @@ -4,8 +4,6 @@ #import "MGLAnnotation.h" #import "MGLGeometry.h" -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/darwin/src/MGLPointAnnotation.h b/platform/darwin/src/MGLPointAnnotation.h index 13afcab717d..b552912f971 100644 --- a/platform/darwin/src/MGLPointAnnotation.h +++ b/platform/darwin/src/MGLPointAnnotation.h @@ -3,8 +3,6 @@ #import "MGLShape.h" -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/darwin/src/MGLRasterStyleLayer.h b/platform/darwin/src/MGLRasterStyleLayer.h index e6668623392..b9deed8ff40 100644 --- a/platform/darwin/src/MGLRasterStyleLayer.h +++ b/platform/darwin/src/MGLRasterStyleLayer.h @@ -1,7 +1,6 @@ // This file is generated. // Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`. -#import "MGLTypes.h" #import "MGLStyleAttributeValue.h" #import "MGLBaseStyleLayer.h" diff --git a/platform/darwin/src/MGLShape.h b/platform/darwin/src/MGLShape.h index 40c92fc32d9..ce9375c9109 100644 --- a/platform/darwin/src/MGLShape.h +++ b/platform/darwin/src/MGLShape.h @@ -2,8 +2,6 @@ #import "MGLAnnotation.h" -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/darwin/src/MGLStyle.h b/platform/darwin/src/MGLStyle.h index a8b36ab0cac..3354d27a43a 100644 --- a/platform/darwin/src/MGLStyle.h +++ b/platform/darwin/src/MGLStyle.h @@ -1,9 +1,9 @@ #import -#import "MGLTypes.h" - #import "MGLStyleLayer.h" +#import "MGLTypes.h" + @class MGLSource; NS_ASSUME_NONNULL_BEGIN diff --git a/platform/darwin/src/MGLStyleAttribute.mm b/platform/darwin/src/MGLStyleAttribute.mm index 38c212ddd43..8c51f807581 100644 --- a/platform/darwin/src/MGLStyleAttribute.mm +++ b/platform/darwin/src/MGLStyleAttribute.mm @@ -3,6 +3,8 @@ #import "MGLStyleAttributeValue_Private.h" #import "MGLStyleAttributeFunction_Private.h" +#import "MGLTypes.h" + @interface MGLStyleAttribute() @end diff --git a/platform/darwin/src/MGLStyleAttributeValue.h b/platform/darwin/src/MGLStyleAttributeValue.h index 31edccb14f5..cd339238891 100644 --- a/platform/darwin/src/MGLStyleAttributeValue.h +++ b/platform/darwin/src/MGLStyleAttributeValue.h @@ -1,7 +1,5 @@ #import -#import "MGLTypes.h" - @protocol MGLStyleAttributeValue @optional @end \ No newline at end of file diff --git a/platform/darwin/src/MGLStyleAttributeValue_Private.h b/platform/darwin/src/MGLStyleAttributeValue_Private.h index 5fd51d09cf3..3051f663d73 100644 --- a/platform/darwin/src/MGLStyleAttributeValue_Private.h +++ b/platform/darwin/src/MGLStyleAttributeValue_Private.h @@ -1,6 +1,5 @@ #import -#import "MGLTypes.h" #import "MGLStyleAttributeFunction_Private.h" #include diff --git a/platform/darwin/src/MGLStyleLayer.h.ejs b/platform/darwin/src/MGLStyleLayer.h.ejs index 629edba6c6a..4ef28469f1f 100644 --- a/platform/darwin/src/MGLStyleLayer.h.ejs +++ b/platform/darwin/src/MGLStyleLayer.h.ejs @@ -6,7 +6,6 @@ // This file is generated. // Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`. -#import "MGLTypes.h" #import "MGLStyleAttributeValue.h" #import "MGLBaseStyleLayer.h" diff --git a/platform/darwin/src/MGLStyleLayer.mm b/platform/darwin/src/MGLStyleLayer.mm index 6703226cbab..43d98d62dcb 100644 --- a/platform/darwin/src/MGLStyleLayer.mm +++ b/platform/darwin/src/MGLStyleLayer.mm @@ -1,5 +1,4 @@ #import "MGLStyleLayer.h" -#import "MGLTypes.h" #import "MGLStyleLayer_Private.h" #import "MGLMapView_Private.h" diff --git a/platform/darwin/src/MGLSymbolStyleLayer.h b/platform/darwin/src/MGLSymbolStyleLayer.h index 1f3568890b1..371107226fb 100644 --- a/platform/darwin/src/MGLSymbolStyleLayer.h +++ b/platform/darwin/src/MGLSymbolStyleLayer.h @@ -1,7 +1,6 @@ // This file is generated. // Edit platform/darwin/scripts/generate-style-code.js, then run `make style-code-darwin`. -#import "MGLTypes.h" #import "MGLStyleAttributeValue.h" #import "MGLBaseStyleLayer.h" diff --git a/platform/darwin/src/MGLTypes.h b/platform/darwin/src/MGLTypes.h index f63c602a534..bc1889c96c0 100644 --- a/platform/darwin/src/MGLTypes.h +++ b/platform/darwin/src/MGLTypes.h @@ -2,16 +2,6 @@ #pragma once -#if !__has_feature(nullability) - #define NS_ASSUME_NONNULL_BEGIN - #define NS_ASSUME_NONNULL_END - #define nullable - #define nonnull - #define null_resettable - #define _Nullable - #define _Nonnull -#endif - #if TARGET_OS_IPHONE @class UIColor; #define MGLColor UIColor diff --git a/platform/darwin/src/NSData+MGLAdditions.h b/platform/darwin/src/NSData+MGLAdditions.h index 0c68c81f45c..38af7961b60 100644 --- a/platform/darwin/src/NSData+MGLAdditions.h +++ b/platform/darwin/src/NSData+MGLAdditions.h @@ -1,7 +1,5 @@ #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN @interface NSData (MGLAdditions) diff --git a/platform/darwin/src/NSString+MGLAdditions.h b/platform/darwin/src/NSString+MGLAdditions.h index 3001624d320..5b549affd5f 100644 --- a/platform/darwin/src/NSString+MGLAdditions.h +++ b/platform/darwin/src/NSString+MGLAdditions.h @@ -1,7 +1,5 @@ #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN @interface NSString (MGLAdditions) diff --git a/platform/darwin/src/NSURL+MGLAdditions.h b/platform/darwin/src/NSURL+MGLAdditions.h index 70fd79f0642..9845a180dbb 100644 --- a/platform/darwin/src/NSURL+MGLAdditions.h +++ b/platform/darwin/src/NSURL+MGLAdditions.h @@ -1,7 +1,5 @@ #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN @interface NSURL (MGLAdditions) diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md index 49e6369b6ff..41afd5403d5 100644 --- a/platform/ios/CHANGELOG.md +++ b/platform/ios/CHANGELOG.md @@ -6,6 +6,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT * A new runtime styling API allows you to adjust the style and content of the base map dynamically. All the options available in [Mapbox Studio](https://www.mapbox.com/studio/) are now exposed via MGLStyle and subclasses of MGLStyleLayer and MGLSource. ([#5727](https://github.com/mapbox/mapbox-gl-native/pull/5727)) * The user location annotation is now customizable via the newly added `MGLUserLocationAnnotationView` class. ([#5882](https://github.com/mapbox/mapbox-gl-native/pull/5882)) +* Xcode 7.3 or higher is now required to use this SDK. ([#6059](https://github.com/mapbox/mapbox-gl-native/issues/6059)) * Simulator architecture slices are included in the included dSYM file, allowing you to symbolicate crashes that occur in the Simulator. ([#5740](https://github.com/mapbox/mapbox-gl-native/pull/5740)) * As the user zooms in, tiles from lower zoom levels are scaled up until tiles for higher zoom levels are loaded. ([#5143](https://github.com/mapbox/mapbox-gl-native/pull/5143)) * Fixed an issue causing the wrong annotation view to be selected when tapping an annotation view with a center offset applied. ([#5931](https://github.com/mapbox/mapbox-gl-native/pull/5931)) diff --git a/platform/ios/DEVELOPING.md b/platform/ios/DEVELOPING.md index 5ba68719591..704a357ce6c 100644 --- a/platform/ios/DEVELOPING.md +++ b/platform/ios/DEVELOPING.md @@ -6,6 +6,8 @@ This document explains how to build the Mapbox iOS SDK from source. It is intend The Mapbox iOS SDK and iosapp demo application build against the iOS 7.0 SDK. The SDK is intended to run on iOS 7.0 and above, while iosapp is intended to run on iOS 8.0 and above due to the use of a dynamic framework. Both require Xcode on a computer running macOS. +The Mapbox iOS SDK requires Xcode 7.3 or higher. + ## Building the SDK Make sure that you have the [core dependencies](../../INSTALL.md) installed. @@ -83,6 +85,7 @@ To add an Objective-C class, protocol, category, typedef, enumeration, or global To add an Objective-C header or implementation file to the iOS SDK: 1. Add the file to the Headers or Compile Sources build phase, as appropriate, of both the “dynamic” and “static” targets. You can either use the Build Phases tab of the project editor or the Target Membership section of the File inspector. +1. Audit new headers for nullability. Typically, you will wrap a header with `NS_ASSUME_NONNULL_BEGIN` and `NS_ASSUME_NONNULL_END`. 1. _(Optional.)_ If it’s a public header, change its visibility from Project to Public and import it in [the iOS SDK’s umbrella header](./src/Mapbox.h). 1. _(Optional.)_ If the file would also be used by the macOS SDK, make sure it’s in [platform/darwin/src/](../darwin/src/), then consult [the companion macOS document](../macos/DEVELOPING.md#adding-a-source-code-file) for further instructions. diff --git a/platform/ios/INSTALL.md b/platform/ios/INSTALL.md index bdda38946d2..1f0975f477c 100644 --- a/platform/ios/INSTALL.md +++ b/platform/ios/INSTALL.md @@ -4,12 +4,14 @@ This document explains how to build a development version of Mapbox iOS SDK for ### Requirements -The Mapbox iOS SDK application builds against the iOS 7.0 SDK. It is intended to run on iOS 7.0 and above on the following devices and their simulators: +The Mapbox iOS SDK builds against the iOS 7.0 SDK. It is intended to run on iOS 7.0 and above on the following devices and their simulators: * iPhone 4S and above (5, 5c, 5s, 6, 6 Plus) * iPad 2 and above (3, 4, Mini, Air, Mini 2, Air 2) * iPod touch 5th generation and above +The Mapbox iOS SDK requires Xcode 7.3 or higher. + ### Building the SDK 1. [Install core dependencies](../../INSTALL.md). diff --git a/platform/ios/docs/pod-README.md b/platform/ios/docs/pod-README.md index 93aa18bc659..2d6134e6e06 100644 --- a/platform/ios/docs/pod-README.md +++ b/platform/ios/docs/pod-README.md @@ -10,6 +10,8 @@ For more information, check out the [Mapbox iOS SDK homepage](https://www.mapbox The Mapbox iOS SDK may be installed as either a dynamic framework or a static framework. (To reduce the download size, the static framework is omitted from some distributions; you may need to download the full package from the [release page](https://github.com/mapbox/mapbox-gl-native/releases/).) +Integrating the Mapbox iOS SDK requires Xcode 7.3 or higher. + {{DYNAMIC}} ### Dynamic framework diff --git a/platform/ios/src/MGLAPIClient.h b/platform/ios/src/MGLAPIClient.h index ef64b021b78..0f8926d3608 100644 --- a/platform/ios/src/MGLAPIClient.h +++ b/platform/ios/src/MGLAPIClient.h @@ -3,10 +3,14 @@ #import "MGLMapboxEvents.h" #import "MGLTypes.h" +NS_ASSUME_NONNULL_BEGIN + @interface MGLAPIClient : NSObject -- (void)postEvents:(nonnull NS_ARRAY_OF(MGLMapboxEventAttributes *) *)events completionHandler:(nullable void (^)(NSError * _Nullable error))completionHandler; -- (void)postEvent:(nonnull MGLMapboxEventAttributes *)event completionHandler:(nullable void (^)(NSError * _Nullable error))completionHandler; +- (void)postEvents:(NS_ARRAY_OF(MGLMapboxEventAttributes *) *)events completionHandler:(nullable void (^)(NSError * _Nullable error))completionHandler; +- (void)postEvent:(MGLMapboxEventAttributes *)event completionHandler:(nullable void (^)(NSError * _Nullable error))completionHandler; - (void)cancelAll; @end + +NS_ASSUME_NONNULL_END diff --git a/platform/ios/src/MGLAnnotationImage.h b/platform/ios/src/MGLAnnotationImage.h index 5ded4016f71..a7003d7f911 100644 --- a/platform/ios/src/MGLAnnotationImage.h +++ b/platform/ios/src/MGLAnnotationImage.h @@ -1,7 +1,5 @@ #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/ios/src/MGLAnnotationView.h b/platform/ios/src/MGLAnnotationView.h index 5469841036d..634e9ad7234 100644 --- a/platform/ios/src/MGLAnnotationView.h +++ b/platform/ios/src/MGLAnnotationView.h @@ -1,7 +1,5 @@ #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN @protocol MGLAnnotation; diff --git a/platform/ios/src/MGLCalloutView.h b/platform/ios/src/MGLCalloutView.h index 27d173b2305..6918aad614d 100644 --- a/platform/ios/src/MGLCalloutView.h +++ b/platform/ios/src/MGLCalloutView.h @@ -1,7 +1,5 @@ #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN @protocol MGLCalloutViewDelegate; diff --git a/platform/ios/src/MGLMapView+IBAdditions.h b/platform/ios/src/MGLMapView+IBAdditions.h index f18df56e018..3766d044d86 100644 --- a/platform/ios/src/MGLMapView+IBAdditions.h +++ b/platform/ios/src/MGLMapView+IBAdditions.h @@ -1,7 +1,5 @@ #import -#import "MGLTypes.h" - @class MGLMapView; NS_ASSUME_NONNULL_BEGIN diff --git a/platform/ios/src/MGLUserLocation.h b/platform/ios/src/MGLUserLocation.h index 81f9557b166..f2243815cf2 100644 --- a/platform/ios/src/MGLUserLocation.h +++ b/platform/ios/src/MGLUserLocation.h @@ -3,8 +3,6 @@ #import "MGLAnnotation.h" -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/ios/src/MGLUserLocationAnnotationView.h b/platform/ios/src/MGLUserLocationAnnotationView.h index 5e0a805f3a1..15e37622d64 100644 --- a/platform/ios/src/MGLUserLocationAnnotationView.h +++ b/platform/ios/src/MGLUserLocationAnnotationView.h @@ -2,8 +2,6 @@ #import #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN @class MGLMapView; diff --git a/platform/macos/DEVELOPING.md b/platform/macos/DEVELOPING.md index 5f437f4172d..412a58a140d 100644 --- a/platform/macos/DEVELOPING.md +++ b/platform/macos/DEVELOPING.md @@ -4,7 +4,9 @@ This document explains how to build the Mapbox macOS SDK from source. It is inte ## Requirements -The Mapbox macOS SDK and the macosapp demo application run on macOS 10.10.0 and above. +The Mapbox macOS SDK and the macosapp demo application run on macOS 10.10.0 or above. + +The Mapbox macOS SDK requires Xcode 7.3 or above. ## Building the SDK @@ -34,6 +36,7 @@ To add an Objective-C class, protocol, category, typedef, enumeration, or global To add an Objective-C header or implementation file to the macOS SDK: 1. Add the file to the “dynamic” target’s Headers or Compile Sources build phase, as appropriate. You can either use the Build Phases tab of the project editor or the Target Membership section of the File inspector. +1. Audit new headers for nullability. Typically, you will wrap a header with `NS_ASSUME_NONNULL_BEGIN` and `NS_ASSUME_NONNULL_END`. 1. _(Optional.)_ If it’s a public header, change its visibility from Project to Public and import it in [the macOS SDK’s umbrella header](./src/Mapbox.h). 1. _(Optional.)_ If the file would also be used by the iOS SDK, make sure it’s in [platform/darwin/src/](../darwin/src/), then consult [the companion iOS document](../ios/DEVELOPING.md#adding-a-source-code-file) for further instructions. diff --git a/platform/macos/INSTALL.md b/platform/macos/INSTALL.md index 07aae88a2e3..665af128c5c 100644 --- a/platform/macos/INSTALL.md +++ b/platform/macos/INSTALL.md @@ -4,7 +4,7 @@ This document explains how to build the Mapbox macOS SDK and integrate it into y ### Requirements -The Mapbox macOS SDK requires the macOS 10.10.0 SDK or above. +The Mapbox macOS SDK requires the macOS 10.10.0 SDK (or above) and Xcode 7.3 (or above). ### Building the SDK diff --git a/platform/macos/src/MGLAnnotationImage.h b/platform/macos/src/MGLAnnotationImage.h index ad44993ee19..37d43d7277d 100644 --- a/platform/macos/src/MGLAnnotationImage.h +++ b/platform/macos/src/MGLAnnotationImage.h @@ -1,7 +1,5 @@ #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /** diff --git a/platform/macos/src/MGLMapView.h b/platform/macos/src/MGLMapView.h index 9d44632196e..fb2572ec08a 100644 --- a/platform/macos/src/MGLMapView.h +++ b/platform/macos/src/MGLMapView.h @@ -1,6 +1,7 @@ #import #import +#import "MGLTypes.h" #import "MGLGeometry.h" NS_ASSUME_NONNULL_BEGIN diff --git a/platform/macos/src/MGLMapViewDelegate.h b/platform/macos/src/MGLMapViewDelegate.h index 6ea69f845a3..c84ad42cf39 100644 --- a/platform/macos/src/MGLMapViewDelegate.h +++ b/platform/macos/src/MGLMapViewDelegate.h @@ -1,7 +1,5 @@ #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN @class MGLMapView; diff --git a/platform/macos/src/MGLOpenGLLayer.h b/platform/macos/src/MGLOpenGLLayer.h index 5c8ac43e9e8..832664f397d 100644 --- a/platform/macos/src/MGLOpenGLLayer.h +++ b/platform/macos/src/MGLOpenGLLayer.h @@ -1,7 +1,5 @@ #import -#import "MGLTypes.h" - NS_ASSUME_NONNULL_BEGIN /// A subclass of NSOpenGLLayer that creates the environment mbgl needs to