//
//  UIDevice+Reso.m
//  Simple UIDevice Category for handling different iOSs hardware resolutions
//
//  Created by Alejandro Luengo on 29/09/14.
//  (c) 2014 Intelygenz

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, UIDeviceResolution) {
   
    UnknowDevice       = 0,  //未知设备
    iPhone35Inches     = 1,  //3.5英寸、iphone4s
    iPhone40Inches     = 2,  //4英寸iphone5、iphone5c、iphone5s
    iPhone47Inches     = 3,  //4.7英寸iphone6、iphone7、iphone8
    iPhone55Inches     = 4,  //5.5英寸iphone6 plus、iphone7 plus、iphone8 plus
    iPhone58Inches     = 5,  //5.5英寸iphoneX
    iPhoneXRInches     = 6,  //iphone XR
    iPhoneXSMaxInches  = 7   //iphone XS Max
};

typedef NS_ENUM(NSInteger, GMDeviceType) {
    GMDeviceTypeUnknow          = 0,
    GMDeviceTypeSimulator,
    GMDeviceTypeIPad,
    GMDeviceTypeIPod,
    GMDeviceTypeIPhone4,
    GMDeviceTypeIPhone4S,
    GMDeviceTypeIPhone5,
    GMDeviceTypeIPhone5S,
    GMDeviceTypeIPhone5C,
    GMDeviceTypeIPhone6,
    GMDeviceTypeIPhone6P,
    GMDeviceTypeIPhone6S,
    GMDeviceTypeIPhone6SP,
    GMDeviceTypeIPhone7,
    GMDeviceTypeIPhone7P,
    GMDeviceTypeIPhone8,
    GMDeviceTypeIPhone8P,
    GMDeviceTypeIPhoneX,
    GMDeviceTypeIPhoneXR,
    GMDeviceTypeIPhoneXS,
    GMDeviceTypeIPhoneXSMax,
};

typedef NS_ENUM(NSUInteger, GMDeviceAspectRatioType) {
    GMDeviceAspectRatioTypeNarrow, //iPad、iphone4s、iphone5
    GMDeviceAspectRatioTypeNormal, // Normal
    GMDeviceAspectRatioTypeWide,   // Plus、Max
};

@interface UIDevice (Resolutions) 


/**
 *  @author licong, 16-12-29 17:12:54
 *
 *  判断设备的类型（eg:当前设备是5还是6s）
 *
 *  @return 返回设备类型
 *
 *  @since 5.8
 */
+ (UIDeviceResolution)resolutionType;

+ (GMDeviceAspectRatioType)aspectRatioType;

+ (NSString *)platform;

/**
 获取设备的deviceId，如果能去到idfa，就返回idfa，否则就返回idfv
 @author zhaiguojun 16-10-31 in (null)
 @return deviceId
 @since 6.5.0
 */
+ (NSString *)deviceId;

/**
 获取设备详细类型，目前只到6s，和6s plus
 @author zhaiguojun 16-09-18 in (null)
 @return model
 @since 6.3.0
 */
+ (NSString*)deviceVersion;
@end
