From a54cfd923cfd15b2103e2aed0862db7a3d3892f9 Mon Sep 17 00:00:00 2001 From: shnhrrsn Date: Sat, 14 Oct 2017 17:23:46 -0400 Subject: [PATCH] Fixed issues with macOS --- Sources/EGOCache.h | 6 +++++- Sources/EGOCache.m | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/EGOCache.h b/Sources/EGOCache.h index 85b2d2b..ab84607 100755 --- a/Sources/EGOCache.h +++ b/Sources/EGOCache.h @@ -27,7 +27,11 @@ #import #if TARGET_OS_IPHONE -#import + #import +#endif + +#if TARGET_OS_OSX + #import #endif //! Project version number for EGOCache. diff --git a/Sources/EGOCache.m b/Sources/EGOCache.m index 27b6093..de8abda 100755 --- a/Sources/EGOCache.m +++ b/Sources/EGOCache.m @@ -320,7 +320,7 @@ - (void)setImage:(NSImage*)anImage forKey:(NSString*)key { } - (void)setImage:(NSImage*)anImage forKey:(NSString*)key withTimeoutInterval:(NSTimeInterval)timeoutInterval { - [self setData:[[[anImage representations] objectAtIndex:0] representationUsingType:NSPNGFileType properties:nil] forKey:key withTimeoutInterval:timeoutInterval]; + [self setData:[[NSBitmapImageRep imageRepWithData:anImage.TIFFRepresentation] representationUsingType:NSPNGFileType properties:@{ }] forKey:key withTimeoutInterval:timeoutInterval]; } #endif