-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Require Xcode 7.3 due to NS_SWIFT_NAME #5472
Comments
Defining At this point, MGLTypes.h is so chock full of workarounds for Xcode 6.x that we should just require Xcode 7.3; it isn’t much trouble to upgrade 7.0 to 7.3 anyhow. If @mapbox/gl agrees, the next steps are:
|
I'm fine with requiring Xcode 7.3. Do we have statistics on what versions are still in use out there? Given that Xcode typically auto-updates, I imagine there aren't many older versions out there? |
I’m unaware of any publicly available statistics on Xcode version usage. Typically Mac and iOS developers either stay up-to-date or stick to the previous major version. The latter case sometimes happens in large companies that have cumbersome upgrade processes. If a developer codes against the iOS 9 SDK in Xcode 7, it’s easy and entirely normal to deploy backwards to iOS 7 or 8. The only other argument I can think of for supporting Xcode 6 would be that a developer has written so much Swift 1 code that migrating to Swift 2 would require significant effort – in which case we’d be doing them a favor by acting as their forcing function. |
Xcode 7.3 is evidently already a requirement — trying to use Xcode 7.0-7.2 will throw |
Per chat with @1ec5, we still need to have different |
Theoretically something like this could work: // Versions of Xcode lower than 7.3 do not fully support NS_SWIFT_NAME.
#if defined(__apple_build_version__) && __apple_build_version__ < 703029
#undef NS_SWIFT_NAME
#define NS_SWIFT_NAME(_)
#endif ... but we’ve already broken backwards Xcode support in other ways, so I’m going to forge ahead with requiring Xcode 7.3.1. |
We’re using the
NS_SWIFT_NAME
macro in a few places in MGLMapView.h, breaking compilation in versions of Xcode before 7.3. MGLTypes.h should#define NS_SWIFT_NAME
to nothing if that macro is undefined.Alternatively, we could require Xcode 7.3 and simultaneously inline all our uses of
NS_ARRAY_OF
and company, which are intended to keep Xcode 6.x happy./cc @friedbunny
The text was updated successfully, but these errors were encountered: