diff --git a/src/Util/MIMETypeUtil.h b/src/Util/MIMETypeUtil.h index 36b415d3b..82d463c9c 100644 --- a/src/Util/MIMETypeUtil.h +++ b/src/Util/MIMETypeUtil.h @@ -24,11 +24,6 @@ extern NSString *const OWSMimeTypeUnknownForTests; + (NSString *)getSupportedExtensionFromImageMIMEType:(NSString *)supportedMIMEType; + (NSString *)getSupportedExtensionFromAnimatedMIMEType:(NSString *)supportedMIMEType; -+ (NSString *)getSupportedMIMETypeFromVideoFile:(NSString *)supportedVideoFile; -+ (NSString *)getSupportedMIMETypeFromAudioFile:(NSString *)supportedAudioFile; -+ (NSString *)getSupportedMIMETypeFromImageFile:(NSString *)supportedImageFile; -+ (NSString *)getSupportedMIMETypeFromAnimatedFile:(NSString *)supportedImageFile; - + (BOOL)isAnimated:(NSString *)contentType; + (BOOL)isImage:(NSString *)contentType; + (BOOL)isVideo:(NSString *)contentType; @@ -42,11 +37,6 @@ extern NSString *const OWSMimeTypeUnknownForTests; + (NSURL *)simLinkCorrectExtensionOfFile:(NSURL *)mediaURL ofMIMEType:(NSString *)contentType; -#if TARGET_OS_IPHONE -+ (NSString *)getSupportedImageMIMETypeFromImage:(UIImage *)image; -+ (BOOL)getIsSupportedTypeFromImage:(UIImage *)image; -#endif - + (NSSet *)supportedVideoUTITypes; + (NSSet *)supportedAudioUTITypes; + (NSSet *)supportedImageUTITypes; diff --git a/src/Util/MIMETypeUtil.m b/src/Util/MIMETypeUtil.m index 5751c0075..d9c38c765 100644 --- a/src/Util/MIMETypeUtil.m +++ b/src/Util/MIMETypeUtil.m @@ -237,22 +237,6 @@ NSString *const OWSMimeTypeUnknownForTests = @"unknown/mimetype"; return [[self supportedBinaryDataMIMETypesToExtensionTypes] objectForKey:supportedMIMEType]; } -+ (NSString *)getSupportedMIMETypeFromVideoFile:(NSString *)supportedVideoFile { - return [[self supportedVideoExtensionTypesToMIMETypes] objectForKey:[supportedVideoFile pathExtension]]; -} - -+ (NSString *)getSupportedMIMETypeFromAudioFile:(NSString *)supportedAudioFile { - return [[self supportedAudioExtensionTypesToMIMETypes] objectForKey:[supportedAudioFile pathExtension]]; -} - -+ (NSString *)getSupportedMIMETypeFromImageFile:(NSString *)supportedImageFile { - return [[self supportedImageExtensionTypesToMIMETypes] objectForKey:[supportedImageFile pathExtension]]; -} - -+ (NSString *)getSupportedMIMETypeFromAnimatedFile:(NSString *)supportedAnimatedFile { - return [[self supportedAnimatedExtensionTypesToMIMETypes] objectForKey:[supportedAnimatedFile pathExtension]]; -} - #pragma mark full attachment utilities + (BOOL)isAnimated:(NSString *)contentType { return [MIMETypeUtil isSupportedAnimatedMIMEType:contentType]; @@ -364,18 +348,6 @@ NSString *const OWSMimeTypeUnknownForTests = @"unknown/mimetype"; return [[folder stringByAppendingFormat:@"/%@", uniqueId] stringByAppendingPathExtension:fileExtension]; } -#if TARGET_OS_IPHONE - -+ (NSString *)getSupportedImageMIMETypeFromImage:(UIImage *)image { - return [image contentType]; -} - -+ (BOOL)getIsSupportedTypeFromImage:(UIImage *)image { - return [image isSupportedImageType]; -} - -#endif - + (NSString *)utiTypeForMIMEType:(NSString *)mimeType { CFStringRef utiType