MCEApiUtil Class Reference

Inherits from NSObject
Declared in MCEApiUtil.h
MCEApiUtil.m

Overview

The MCEApiUtil class contains some helper methods for interacting with APIs

+ formFactor

The formFactor of the device being used

+ (NSString *)formFactor

Discussion

The formFactor of the device being used

Declared In

MCEApiUtil.h

+ pushEnabled:

The pushEnabled method returns if the user has enabled or disabled push.

+ (void)pushEnabled:(void ( ^ ) ( BOOL enabled ))callback

Discussion

The pushEnabled method returns if the user has enabled or disabled push.

Declared In

MCEApiUtil.h

+ offset

The offset method returns timezone offset in microseconds.

+ (NSString *)offset

Discussion

The offset method returns timezone offset in microseconds.

Declared In

MCEApiUtil.h

+ osVersion

The osVersion method returns the version of the OS that is running.

+ (NSString *)osVersion

Discussion

The osVersion method returns the version of the OS that is running.

Declared In

MCEApiUtil.h

+ deviceModel

The deviceModel method returns the model of the device being used.

+ (NSString *)deviceModel

Discussion

The deviceModel method returns the model of the device being used.

Declared In

MCEApiUtil.h

+ carrierName

The carrierName method returns the name of the carrier that the device is connected to.

+ (NSString *)carrierName

Discussion

The carrierName method returns the name of the carrier that the device is connected to.

Declared In

MCEApiUtil.h

+ currentDateInISO8601Format

The currentDateInISO8601Format returns the current timestamp in ISO8601 format.

+ (NSString *)currentDateInISO8601Format

Discussion

The currentDateInISO8601Format returns the current timestamp in ISO8601 format.

Declared In

MCEApiUtil.h

+ dateToIso8601Format:

The dateToIso8601Format method converts an NSDate to a string formatted for ISO8601.

+ (NSString *)dateToIso8601Format:(NSDate *)date

Discussion

The dateToIso8601Format method converts an NSDate to a string formatted for ISO8601.

Declared In

MCEApiUtil.h

+ deviceToken:

The deviceToken method converts from an NSData, provided by APNS to an NSString.

+ (NSString *)deviceToken:(NSData *)deviceToken

Discussion

The deviceToken method converts from an NSData, provided by APNS to an NSString.

Declared In

MCEApiUtil.h

+ cachedDataForUrl:downloadIfRequired:

Returns cached data for specified URL.

+ (NSData *)cachedDataForUrl:(NSURL *)url downloadIfRequired:(BOOL)download

Parameters

url

Resource location

download

TRUE if the resource should be downloaded if it’s not cached, FALSE otherwise

Return Value

Cached NSData object.

Discussion

Returns cached data for specified URL.

Declared In

MCEApiUtil.h

+ iso8601ToDate:

The iso8601ToDate method converts an NSString in ISO8601 format to an NSDate object.

+ (NSDate *)iso8601ToDate:(NSString *)iso8601Date

Discussion

The iso8601ToDate method converts an NSString in ISO8601 format to an NSDate object.

Declared In

MCEApiUtil.h