//
//  IPTool.h
//  Open
//
//  Created by 雷俊博 on 2019/10/23.
//  Copyright © 2019 黄江涛 . All rights reserved.
//

#import <Foundation/Foundation.h>
#import <ifaddrs.h>
#import <resolv.h>
#import <arpa/inet.h>
#import <net/if.h>
#import <netdb.h>
#import <netinet/ip.h>
#import <net/ethernet.h>
#import <net/if_dl.h>
#import <AdSupport/AdSupport.h>
#import <CoreTelephony/CTTelephonyNetworkInfo.h>
#import <CoreTelephony/CTCarrier.h>
#define MDNS_PORT       5353
#define QUERY_NAME      "_apple-mobdev2._tcp.local"
#define DUMMY_MAC_ADDR  @"02:00:00:00:00:00"
#define IOS_CELLULAR    @"pdp_ip0"
#define IOS_WIFI        @"en0"
#define IOS_VPN         @"utun0"
#define IP_ADDR_IPv4    @"ipv4"
#define IP_ADDR_IPv6    @"ipv6"

NS_ASSUME_NONNULL_BEGIN

@interface IPTool : NSObject
//获取设备唯一标示符
+ (NSString *)getIdentifier;
+ (NSString *)getIPAddress:(BOOL)preferIPv4;
+ (NSDictionary *)getIPAddresses;
+ (NSString *)DSMC_getDeviceType;
+ (NSString *)getIDFA;
+ (NSString *)getIDFV;
+ (NSString *)getSystemVersion;
// 获取MAC地址
+ (nullable NSString *)getMacAddress;
//获取包名
+ (NSString *)getBundleId;

//获取app名称
+ (NSString *)getAppName;

//获取运营商
+ (NSNumber *)getOperator;

//获取客户端ip
+ (NSString *)getIPAddress2;

//获取手机型号
+ (NSString *)getCurrentDeviceModel;

//获取设备类型
+ (NSString *)getCurrentDeviceType;

//获取当前屏幕的分辨率
+(CGFloat)getCurrentWidthResolution;
+(CGFloat)getCurrentHeightResolution;

@end

NS_ASSUME_NONNULL_END
