UIDevice(SFHardware) Category Reference

Declared in UIDevice+SFHardware.h

Overview

Extension to UIDevice class to provide more hardware related information, including hardware model, capability and also most importantly current device’s orientation

– sfsdk_platform

Platform for the Device

- (nullable NSString *)sfsdk_platform

Declared In

UIDevice+SFHardware.h

– platform

- (nullable NSString *)platform

– hwmodel

Hardware model

- (nullable NSString *)hwmodel

Declared In

UIDevice+SFHardware.h

– sfsdk_platformType

Platform type See UIDevicePlatform

- (UIDevicePlatform)sfsdk_platformType

Declared In

UIDevice+SFHardware.h

– platformType

- (UIDevicePlatform)platformType

– sfsdk_systemVersionNumber

Returns the system-dependent version number.

- (double)sfsdk_systemVersionNumber

Return Value

The system version number.

Declared In

UIDevice+SFHardware.h

– systemVersionNumber

- (double)systemVersionNumber

– sfsdk_platformString

Platform string

- (NSString *)sfsdk_platformString

Discussion

Valid values are defined above in the IPHONE_XX_NAMESTRING and IPAD_XXX_NAMESTRING

Declared In

UIDevice+SFHardware.h

– platformString

- (NSString *)platformString

– cpuFrequency

CPU Frequency

- (NSUInteger)cpuFrequency

Declared In

UIDevice+SFHardware.h

– busFrequency

Bus frequency

- (NSUInteger)busFrequency

Declared In

UIDevice+SFHardware.h

– cpuCount

CPU Count

- (NSUInteger)cpuCount

Declared In

UIDevice+SFHardware.h

– totalCPU

Total CUP

- (float)totalCPU

Declared In

UIDevice+SFHardware.h

– sfsdk_totalMemory

Total memory

- (NSUInteger)sfsdk_totalMemory

Declared In

UIDevice+SFHardware.h

– totalMemory

- (NSUInteger)totalMemory

– sfsdk_userMemory

User Memory

- (NSUInteger)sfsdk_userMemory

Declared In

UIDevice+SFHardware.h

– userMemory

- (NSUInteger)userMemory

– sfsdk_applicationMemory

Memory used by application (in bytes)

- (NSUInteger)sfsdk_applicationMemory

Declared In

UIDevice+SFHardware.h

– applicationMemory

- (NSUInteger)applicationMemory

– sfsdk_freeMemory

Free VM page space available to application (in bytes)

- (NSUInteger)sfsdk_freeMemory

Declared In

UIDevice+SFHardware.h

– freeMemory

- (NSUInteger)freeMemory

– sfsdk_totalDiskSpace

Total disk space

- (NSNumber *)sfsdk_totalDiskSpace

Declared In

UIDevice+SFHardware.h

– totalDiskSpace

- (NSNumber *)totalDiskSpace

– sfsdk_freeDiskSpace

Total free space

- (NSNumber *)sfsdk_freeDiskSpace

Declared In

UIDevice+SFHardware.h

– freeDiskSpace

- (NSNumber *)freeDiskSpace

– macaddress

Mac address

- (nullable NSString *)macaddress

Declared In

UIDevice+SFHardware.h

– hasRetinaDisplay

Returns whether the device has a retina display

- (BOOL)hasRetinaDisplay

Declared In

UIDevice+SFHardware.h

– sfsdk_hasNeuralEngine

Returns whether the device’s SOC has a neural engine for core ML tasks

- (BOOL)sfsdk_hasNeuralEngine

Declared In

UIDevice+SFHardware.h

– hasNeuralEngine

- (BOOL)hasNeuralEngine

– sfsdk_deviceFamily

Device Family

- (UIDeviceFamily)sfsdk_deviceFamily

Declared In

UIDevice+SFHardware.h

– deviceFamily

- (UIDeviceFamily)deviceFamily

– sfsdk_interfaceOrientation

Device’s current orientation This method will first try to retrieve orientation using UIDevice currentOrientation, if return value is an invalid orientation, it will try to use the orientation of the first window scene

- (UIInterfaceOrientation)sfsdk_interfaceOrientation

Declared In

UIDevice+SFHardware.h

– interfaceOrientation

- (UIInterfaceOrientation)interfaceOrientation

– sfsdk_isSimulator

Determine if current device is simulator or not

- (BOOL)sfsdk_isSimulator

Return Value

Return YES if current device is simulator, NO otherwise.

Declared In

UIDevice+SFHardware.h

– isSimulator

- (BOOL)isSimulator

– canDevicePlaceAPhoneCall

Determines whether the current device can place phone calls.

- (BOOL)canDevicePlaceAPhoneCall

Return Value

Returns YES if the current device can make a phone call, NO otherwise.

Declared In

UIDevice+SFHardware.h

– hasIphone6ScreenSize

Determine if the current device has the screen size of an iPhone 6.

- (BOOL)hasIphone6ScreenSize

Return Value

Returns YES if so, NO otherwise.

Declared In

UIDevice+SFHardware.h

– hasIphone6PlusScreenSize

Determine if the current device has the screen size of an iPhone 6 plus.

- (BOOL)hasIphone6PlusScreenSize

Return Value

Returns YES if so, NO otherwise.

Declared In

UIDevice+SFHardware.h

– hasIphoneXScreenSize

Determine if the current device has the screen size of an iPhone X.

- (BOOL)hasIphoneXScreenSize

Return Value

Returns YES if so, NO otherwise.

Declared In

UIDevice+SFHardware.h

+ sfsdk_currentDeviceIsIPad

Return YES if device is iPad

+ (BOOL)sfsdk_currentDeviceIsIPad

Declared In

UIDevice+SFHardware.h

+ currentDeviceIsIPad

+ (BOOL)currentDeviceIsIPad

+ sfsdk_currentDeviceIsIPhone

Return YES if device is iPhone

+ (BOOL)sfsdk_currentDeviceIsIPhone

Declared In

UIDevice+SFHardware.h

+ currentDeviceIsIPhone

+ (BOOL)currentDeviceIsIPhone