diff --git a/YoutubeParser/Classes/HCYoutubeParser.h b/YoutubeParser/Classes/HCYoutubeParser.h index de84413..3be8b17 100644 --- a/YoutubeParser/Classes/HCYoutubeParser.h +++ b/YoutubeParser/Classes/HCYoutubeParser.h @@ -53,7 +53,7 @@ typedef enum { @param youtubeURL the the complete youtube video url, either youtu.be or youtube.com @return string with desired youtube id */ -+ (NSString *)youtubeIDFromYoutubeURL:(NSURL *)youtubeURL; ++ (nullable NSString *)youtubeIDFromYoutubeURL:(nullable NSURL *)youtubeURL; /** Method for retreiving a iOS supported video link @@ -62,7 +62,7 @@ typedef enum { @return dictionary with the available formats for the selected video */ -+ (NSDictionary *)h264videosWithYoutubeURL:(NSURL *)youtubeURL; ++ (nullable NSDictionary *)h264videosWithYoutubeURL:(nullable NSURL *)youtubeURL; /** Method for retreiving an iOS supported video link @@ -71,7 +71,7 @@ typedef enum { @return dictionary with the available formats for the selected video */ -+ (NSDictionary *)h264videosWithYoutubeID:(NSString *)youtubeID; ++ (nullable NSDictionary *)h264videosWithYoutubeID:(nullable NSString *)youtubeID; /** Block based method for retreiving a iOS supported video link @@ -80,8 +80,8 @@ typedef enum { @param completeBlock the block which is called on completion */ -+ (void)h264videosWithYoutubeURL:(NSURL *)youtubeURL - completeBlock:(void(^)(NSDictionary *videoDictionary, NSError *error))completeBlock; ++ (void)h264videosWithYoutubeURL:(nullable NSURL *)youtubeURL + completeBlock:(nonnull void(^)( NSDictionary * _Nullable videoDictionary, NSError * _Nullable error))completeBlock; /** Method for retreiving a thumbnail url for wanted youtube id @@ -89,7 +89,7 @@ typedef enum { @param youtubeURL the complete youtube video id @param thumbnailSize the wanted size of the thumbnail */ -+ (NSURL *)thumbnailUrlForYoutubeURL:(NSURL *)youtubeURL ++ (nullable NSURL *)thumbnailUrlForYoutubeURL:(nullable NSURL *)youtubeURL thumbnailSize:(YouTubeThumbnail)thumbnailSize; /** @@ -99,9 +99,9 @@ typedef enum { @param thumbnailSize the wanted size of the thumbnail @param completeBlock the block which is called on completion */ -+ (void)thumbnailForYoutubeURL:(NSURL *)youtubeURL ++ (void)thumbnailForYoutubeURL:(nullable NSURL *)youtubeURL thumbnailSize:(YouTubeThumbnail)thumbnailSize - completeBlock:(void(^)(HCImage *image, NSError *error))completeBlock; + completeBlock:(nonnull void(^)(HCImage * _Nullable image, NSError * _Nullable error))completeBlock; /** Method for retreiving a thumbnail for wanted youtube id @@ -110,9 +110,9 @@ typedef enum { @param thumbnailSize the wanted size of the thumbnail @param completeBlock the block which is called on completion */ -+ (void)thumbnailForYoutubeID:(NSString *)youtubeID ++ (void)thumbnailForYoutubeID:(nullable NSString *)youtubeID thumbnailSize:(YouTubeThumbnail)thumbnailSize - completeBlock:(void(^)(HCImage *image, NSError *error))completeBlock; + completeBlock:(nonnull void(^)(HCImage * _Nullable image, NSError * _Nullable error))completeBlock; /** @@ -122,6 +122,6 @@ typedef enum { @param completeBlock the block which is called on completion */ -+ (void)detailsForYouTubeURL:(NSURL *)youtubeURL - completeBlock:(void(^)(NSDictionary *details, NSError *error))completeBlock; ++ (void)detailsForYouTubeURL:(nullable NSURL *)youtubeURL + completeBlock:(nonnull void(^)(NSDictionary * _Nullable details, NSError * _Nullable error))completeBlock; @end diff --git a/YoutubeParser/Classes/HCYoutubeParser.m b/YoutubeParser/Classes/HCYoutubeParser.m index 079e05b..c1e8bdb 100644 --- a/YoutubeParser/Classes/HCYoutubeParser.m +++ b/YoutubeParser/Classes/HCYoutubeParser.m @@ -198,7 +198,7 @@ + (NSDictionary *)h264videosWithYoutubeURL:(NSURL *)youtubeURL { } + (void)h264videosWithYoutubeURL:(NSURL *)youtubeURL - completeBlock:(void(^)(NSDictionary *videoDictionary, NSError *error))completeBlock { + completeBlock:(void(^)(NSDictionary * _Nullable videoDictionary, NSError * _Nullable error))completeBlock { NSString *youtubeID = [self youtubeIDFromYoutubeURL:youtubeURL]; if (youtubeID) { dispatch_queue_t queue = dispatch_queue_create("me.hiddencode.yt.backgroundqueue", 0);