ameingast / cocoaimagehashing

Perceptual Image Hashing for macOS, iOS, tvOS and watchOS
Other
262 stars 66 forks source link

Fix nullability annotations in OSImageHashing #17

Closed daniel-beard closed 5 years ago

daniel-beard commented 5 years ago
 * Data is provided through the imageStreamHandler parameter. Returning nil inside imageStreamHandler
 * signals that the stream was closed and no more data is available.

However, since the entire class is marked as NS_ASSUME_NONNULL, it's not possible to return nil from swift in these stream based methods.

This PR fixes the annotations, allowing a nil return from the closure in swift.