Skip to content
This repository has been archived by the owner on Jan 16, 2021. It is now read-only.

Add backward-compatible nullability annotations to all public classes. #56

Merged
8 commits merged into from
Mar 2, 2015

Conversation

ghost
Copy link

@ghost ghost commented Feb 16, 2015

Xcode 6.3 and Swift 1.2 along with LLVM 6.1 add support for Obj-C Nullability Annotations for parameters, return types, properties, variables, etc.
The nullability qualifiers affect the optionality of the Objective-C APIs when used in Swift as well as will show warnings when used in ObjC.
This adds backward-compatible (this code works on Xcode 6.0 and 6.1) support for this. When running on old Xcode - it simply is skipped and does not do anything.

More on the topic:
http://adcdownload.apple.com//Developer_Tools/Xcode_6.3_beta/Xcode_6.3_beta_Release_Notes.pdf
http://nshipster.com/swift-1.2/

cc @grantland @hramos @stanley-parse @hallucinogen

@ghost ghost force-pushed the nlutsenko.nullability_annotation branch from 00bdfe7 to 9ad108d Compare February 17, 2015 14:18
@ghost
Copy link
Author

ghost commented Feb 17, 2015

Just updated with slightly better approach:

  • nonnull is the default (marked via PFUI_ASSUME_NONNULL...)
  • slightly better macros (explicit PFUI_ ones instead of generic)
  • added PFUI_NULLABLE_PROPERTY specifically for properties

@grantland
Copy link
Contributor

LGTM

@ghost ghost force-pushed the nlutsenko.nullability_annotation branch from 9ad108d to f3c12a7 Compare March 2, 2015 12:08
ghost pushed a commit that referenced this pull request Mar 2, 2015
…ation

Add backward-compatible nullability annotations to all public classes.
@ghost ghost merged commit 441143e into master Mar 2, 2015
@ghost ghost deleted the nlutsenko.nullability_annotation branch March 2, 2015 13:54
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants