//
//  GCMDeviceInfo.h
//  GCMCocoaExtensions
//
//  Created by Jerry Hsu on 11/26/13.
//  Copyright (c) 2013 GameChanger. All rights reserved.
//

#import <Foundation/Foundation.h>

#define SYSTEM_VERSION_EQUAL_TO(v)                  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v)              ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v)                 ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v)     ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)

#define IOS7_OR_GREATER SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")
#define PRE_IOS7 SYSTEM_VERSION_LESS_THAN(@"7.0")

@interface GCMDeviceInfo : NSObject

+ (BOOL)isRetinaDisplay;
+ (BOOL)iPad;

@end

//
//  GCMDeviceInfo.h
//  GCMCocoaExtensions
//
//  Created by Jerry Hsu on 11/26/13.
//  Copyright (c) 2013 GameChanger. All rights reserved.
//

#import <Foundation/Foundation.h>

#define SYSTEM_VERSION_EQUAL_TO(v)                  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v)              ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v)                 ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v)     ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)

#define IOS7_OR_GREATER SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")
#define PRE_IOS7 SYSTEM_VERSION_LESS_THAN(@"7.0")

#define IOS8_OR_GREATER SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")
#define PRE_IOS8 SYSTEM_VERSION_LESS_THAN(@"8.0")

@interface GCMDeviceInfo : NSObject

+ (BOOL)isRetinaDisplay;
+ (BOOL)iPad;

@end

Add macros to check for iOS 8
Add macros to check for iOS 8
