FWDeviceClassWrapper

@interface FWDeviceClassWrapper : FWClassWrapper

Undocumented

FWAdaptive

  • 是否是模拟器

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isSimulator;
  • 是否是iPhone

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isIphone;
  • 是否是iPad

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isIpad;
  • 是否是Mac

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isMac;
  • 界面是否横屏

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isLandscape;
  • 设备是否横屏,无论支不支持横屏

    Declaration

    Objective-C

    @property (nonatomic, readonly) BOOL isDeviceLandscape;
  • 设置界面方向,支持旋转方向时生效

    Declaration

    Objective-C

    - (BOOL)setDeviceOrientation:(UIDeviceOrientation)orientation;
  • iOS系统版本

    Declaration

    Objective-C

    @property (nonatomic, readonly) double iosVersion;
  • 是否是指定iOS主版本

    Declaration

    Objective-C

    - (BOOL)isIos:(NSInteger)version;
  • 是否是大于等于指定iOS主版本

    Declaration

    Objective-C

    - (BOOL)isIosLater:(NSInteger)version;
  • 设备尺寸,跟横竖屏无关

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGSize deviceSize;
  • 设备宽度,跟横竖屏无关

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat deviceWidth;
  • 设备高度,跟横竖屏无关

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGFloat deviceHeight;
  • 设备分辨率,跟横竖屏无关

    Declaration

    Objective-C

    @property (nonatomic, readonly) CGSize deviceResolution;

FWUIKit

  • 设置设备token原始Data,格式化并保存

    Declaration

    Objective-C

    - (void)setDeviceTokenData:(nullable NSData *)tokenData;
  • 获取设备Token格式化后的字符串

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *deviceToken;
  • 获取设备模型,格式:"iPhone6,1"

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *deviceModel;
  • 获取设备IDFV(内部使用),同账号应用全删除后会改变,可通过keychain持久化

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *deviceIDFV;