It’s a convenience macro to save you typing nonnull in your headers. From the Swift blog detailing how new safety features have been incorporated back in Objective-C:

To ease adoption of the new annotations, you can mark certain regions of your Objective-C header files as audited for nullability. Within these regions, any simple pointer type will be assumed to be nonnull.

See Nullability and Objective-C – https://developer.apple.com/swift/blog/?id=25




A class interface declares the methods and properties associated with that class. A protocol, by contrast, is used to declare methods and properties that are independent of any specific class.

By default, all methods declared in a protocol are required methods. This means that any class that conforms to the protocol must implement those methods.

It’s also possible to specify optional methods in a protocol. These are methods that a class can implement only if it needs to.