You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

220 lines
3.2 KiB

//
// MOBFDeviceUtils.h
// MOBFoundation
//
// Created by vimfung on 15-1-19.
// Copyright (c) 2015年 MOB. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
extern NSString *kMOBFReachabilityChangedNotification;
/**
*
*/
typedef NS_ENUM(NSUInteger, MOBFNetworkType)
{
/**
*
*/
MOBFNetworkTypeNone = 0,
/**
*
*/
MOBFNetworkTypeCellular = 2,
/**
* WIFI
*/
MOBFNetworkTypeWifi = 1,
/**
* 2G网络
*/
MOBFNetworkTypeCellular2G = 3,
/**
* 3G网络
*/
MOBFNetworkTypeCellular3G = 4,
/**
* 4G网络
*/
MOBFNetworkTypeCellular4G = 5,
};
/**
IP版本
- MOBFIPVersion4: IPv4
- MOBFIPVersion6: IPv6
*/
typedef NS_ENUM(NSUInteger, MOBFIPVersion)
{
MOBFIPVersion4 = 0,
MOBFIPVersion6 = 1,
};
/**
*
*/
@interface MOBFDevice : NSObject
/**
*
*
* @return
*/
+ (NSString *)macAddress;
/**
*
*
* @return
*/
+ (NSString *)deviceModel;
/**
*
*
* @return
*/
+ (MOBFNetworkType)currentNetworkType;
/**
*
*
* @return
*/
+ (NSString *)carrier;
/**
*
*
* @return
*/
+ (NSString *)carrierName;
/**
*
*
* @return
*/
+ (NSString *)mobileCountryCode;
/**
*
*
* @return
*/
+ (NSString *)mobileNetworkCode;
/**
*
*
* @param other
*
* @return < 0 = 0 > 0
*/
+ (NSInteger)versionCompare:(NSString *)other;
/**
*
*
* @return YES NO
*/
+ (BOOL)hasJailBroken;
/**
*
*
* @return
*/
+ (NSArray *)runningProcesses;
/**
* iPad
*
* @return YES NO
*/
+ (BOOL)isPad;
/**
*
*
* @return
*/
+ (NSString *)duid;
/**
*
*
* @return
*/
+ (CGSize)nativeScreenSize;
/**
* 线WIFI名称
*
* @return
*/
+ (NSString *)ssid;
/**
* MAC地址
*
* @return
*/
+ (NSString *)bssid;
/**
*
*
* @return
*/
+ (NSString *)currentLanguage;
/**
* IP地址
*
* @return IP地址
*/
+ (NSString *)ipAddress:(MOBFIPVersion)ver;
/**
* ID
*
* @return ID
*/
+ (NSString *)idfv;
/**
*
@return
*/
+ (double)physicalMemory;
/**
*
@return
*/
+ (long long)diskSpace;
/**
* cpu
*
* @return cpu
*/
+ (NSString *)cpuType;
/**
* 线
*
* @return 3: 2 1
*/
+ (int)wifiLevel;
@end