diff --git a/MP42/MP42Image.h b/MP42/MP42Image.h index 015bd91..bc64de3 100644 --- a/MP42/MP42Image.h +++ b/MP42/MP42Image.h @@ -8,6 +8,8 @@ #import +NS_ASSUME_NONNULL_BEGIN + @class NSImage; typedef enum MP42TagArtworkType_e { @@ -25,9 +27,11 @@ typedef enum MP42TagArtworkType_e { - (instancetype)initWithData:(NSData *)data type:(MP42TagArtworkType)type; - (instancetype)initWithBytes:(const void *)bytes length:(NSUInteger)length type:(MP42TagArtworkType)type; -@property(atomic, readonly) NSImage *image; -@property(atomic, readonly) NSURL *url; -@property(atomic, readonly) NSData *data; +@property(atomic, readonly, nullable) NSImage *image; +@property(atomic, readonly, nullable) NSURL *url; +@property(atomic, readonly, nullable) NSData *data; @property(atomic, readonly) MP42TagArtworkType type; @end + +NS_ASSUME_NONNULL_END diff --git a/MP42/MP42Image.m b/MP42/MP42Image.m index 08f0b24..5e6e982 100644 --- a/MP42/MP42Image.m +++ b/MP42/MP42Image.m @@ -77,7 +77,7 @@ return copy; } -- (NSImage *)imageFromData:(NSData *)data +- (nullable NSImage *)imageFromData:(NSData *)data { NSImage *image = nil; NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:data];