Skip to content

UIDevice extensions

Sebastian Owodziń edited this page May 31, 2015 · 2 revisions

UIDevice extensions:

###UIDevice (ExtendedInfo):

  • Device's exact model identifier, eg. @"i386", @"iPhone2,1", @"iPad3,1", etc.

    @property(nonatomic, readonly) NSString * modelIdentifier;
    
  • Human-readable version of modelIdentifier, eg. @"iOS Simulator", @"iPhone 3GS", @"iPad Air", etc.

    @property(nonatomic, readonly) NSString * modelName;
    
  • Check if a device is running iOS 6.x

    @property(nonatomic, readonly) BOOL runsIOS6;
    
  • Check if a device is running iOS 7.x

    @property(nonatomic, readonly) BOOL runsIOS7;
    
  • Check if a device is running iOS 8.x

    @property(nonatomic, readonly) BOOL runsIOS8;
    
  • Check if a device is connected to a debugger

    @property(nonatomic, readonly) BOOL isDebuggerConnected;
    
  • Check if a device is jailbroken (rooted)

    @property(nonatomic, readonly) BOOL isJailbroken;
    

Clone this wiki locally