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

Audit headers for nullability (Swift support) #1054

Closed
1ec5 opened this issue Mar 22, 2015 · 4 comments · Fixed by #1578
Closed

Audit headers for nullability (Swift support) #1054

1ec5 opened this issue Mar 22, 2015 · 4 comments · Fixed by #1578
Assignees
Labels
iOS Mapbox Maps SDK for iOS
Milestone

Comments

@1ec5
Copy link
Contributor

1ec5 commented Mar 22, 2015

Once we distribute a framework (#828), developers will be able to interface with MGLMapView and other classes in Swift. We’ll want to audit the headers for nullability so that developers don’t have to deal with a litany of implicitly unwrapped optionals like NSString!.

More information:

@1ec5 1ec5 added the iOS Mapbox Maps SDK for iOS label Mar 22, 2015
@1ec5 1ec5 added this to the iOS Beta 2 milestone Mar 22, 2015
@incanus
Copy link
Contributor

incanus commented Mar 22, 2015

👍

@1ec5
Copy link
Contributor Author

1ec5 commented Apr 8, 2015

After #975 is merged, this work will still be blocked by travis-ci/travis-ci#3216 because the nullability qualifiers will still go into the Objective-C code that Travis builds.

@1ec5
Copy link
Contributor Author

1ec5 commented Apr 10, 2015

Apparently this isn’t completely blocked: Automatic uses conditionally-compiled macros to declare nullability:

#if __has_feature(nullability)
#define mgl_nonnull nonnull
#define mgl_nullable nullable
//
#else
#define mgl_nonnull
#define mgl_nullable
//
#endif

@1ec5
Copy link
Contributor Author

1ec5 commented May 15, 2015

Or, come to think of it, even just:

#if !__has_feature(nullability)
#define nonnull
#define nullable
//
#endif

@1ec5 1ec5 self-assigned this May 17, 2015
@1ec5 1ec5 removed the ready label Jun 11, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
iOS Mapbox Maps SDK for iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants