Declared in UIDevice+BFKit.h

Overview

This category adds some useful methods to UIDevice

SCREEN_WIDTH: Get the screen width

SCREEN_HEIGHT: Get the screen height

IOS_VERSION: Get the iOS version string

SYSTEM_VERSION_…: Macros to compare system versions

IS_IOSOR_LATER: Macros that returns if the iOS version is greater or equal to choosed one

Tasks

Class Methods

busFrequency

+ (NSUInteger)busFrequency
Discussion

Returns the current device BUS frequency

Return Value

Returns the current device BUS frequency

Declared In

UIDevice+BFKit.h

cpuFrequency

+ (NSUInteger)cpuFrequency
Discussion

Returns the current device CPU frequency

Return Value

Returns the current device CPU frequency

Declared In

UIDevice+BFKit.h

cpuNumber

+ (NSUInteger)cpuNumber
Discussion

Returns the current device CPU number

Return Value

Returns the current device CPU number

Declared In

UIDevice+BFKit.h

devicePlatform

+ (NSString *_Nonnull)devicePlatform
Discussion

Returns the device platform string Example: “iPhone7,2”

Return Value

Returns the device platform string

Declared In

UIDevice+BFKit.h

devicePlatformString

+ (NSString *_Nonnull)devicePlatformString
Discussion

Returns the user-friendly device platform string Example: “iPad Air (Cellular)”

Return Value

Returns the user-friendly device platform string

Declared In

UIDevice+BFKit.h

freeDiskSpace

+ (NSNumber *_Nonnull)freeDiskSpace
Discussion

Returns the current device free disk space

Return Value

Returns the current device free disk space

Declared In

UIDevice+BFKit.h

iOSVersion

+ (NSInteger)iOSVersion
Discussion

Returns the iOS version without the subversion Example: 7

Return Value

Returns the iOS version

Declared In

UIDevice+BFKit.h

isAppleTV

+ (BOOL)isAppleTV
Discussion

Check if the current device is an Apple TV

Return Value

Returns YES if it’s an Apple TV, NO if not

Declared In

UIDevice+BFKit.h

isAppleWatch

+ (BOOL)isAppleWatch
Discussion

Check if the current device is an Apple Watch

Return Value

Returns YES if it’s an Apple Watch, NO if not

Declared In

UIDevice+BFKit.h

isRetina

+ (BOOL)isRetina
Discussion

Check if the current device has a Retina display

Return Value

Returns YES if it has a Retina display, NO if not

Declared In

UIDevice+BFKit.h

isRetinaHD

+ (BOOL)isRetinaHD
Discussion

Check if the current device has a Retina HD display

Return Value

Returns YES if it has a Retina HD display, NO if not

Declared In

UIDevice+BFKit.h

isSimulator

+ (BOOL)isSimulator
Discussion

Check if the current device is the simulator

Return Value

Returns YES if it’s the simulator, NO if not

Declared In

UIDevice+BFKit.h

isiPad

+ (BOOL)isiPad
Discussion

Check if the current device is an iPad

Return Value

Returns YES if it’s an iPad, NO if not

Declared In

UIDevice+BFKit.h

isiPhone

+ (BOOL)isiPhone
Discussion

Check if the current device is an iPhone

Return Value

Returns YES if it’s an iPhone, NO if not

Declared In

UIDevice+BFKit.h

isiPod

+ (BOOL)isiPod
Discussion

Check if the current device is an iPod

Return Value

Returns YES if it’s an iPod, NO if not

Declared In

UIDevice+BFKit.h

macAddress

+ (NSString *_Nonnull)macAddress
Discussion

Returns the current device MAC address

Return Value

Returns the current device MAC address

Declared In

UIDevice+BFKit.h

ramSize

+ (NSUInteger)ramSize
Discussion

Returns the current device RAM size

Return Value

Returns the current device RAM size

Declared In

UIDevice+BFKit.h

totalDiskSpace

+ (NSNumber *_Nonnull)totalDiskSpace
Discussion

Returns the current device total disk space

Return Value

Returns the current device total disk space

Declared In

UIDevice+BFKit.h

totalMemory

+ (NSUInteger)totalMemory
Discussion

Returns the current device total memory

Return Value

Returns the current device total memory

Declared In

UIDevice+BFKit.h

uniqueIdentifier

+ (NSString *_Nonnull)uniqueIdentifier
Discussion

Generate an unique identifier and store it into standardUserDefaults

Return Value

Returns a unique identifier as a NSString

Declared In

UIDevice+BFKit.h

updateUniqueIdentifier:block:

+ (void)updateUniqueIdentifier:(NSObject *_Nonnull)uniqueIdentifier block:(void ( ^ _Nullable ) ( BOOL isValid , BOOL hasToUpdateUniqueIdentifier , NSString *_Nullable oldUUID ))block
Discussion

Save the unique identifier or update it if there is and it is changed. Is useful for push notification to know if the unique identifier has changed and needs to be send to server

Parameters

uniqueIdentifier

The unique identifier to save or update if needed. (Must be NSData or NSString)

block

The execution block that know if the unique identifier is valid and has to be updated. You have to handle the case if it is valid and the update is needed or not

Declared In

UIDevice+BFKit.h

userMemory

+ (NSUInteger)userMemory
Discussion

Returns the current device non-kernel memory

Return Value

Returns the current device non-kernel memory

Declared In

UIDevice+BFKit.h