Skip to content

MdxConfigManager

Superclass: NSObject

Declared In: MdxConfigManager.h

Introduction

This is the class is the main configuration class for your application. It contains methods for storing and retrieving custom configurations.

Methods

application:openURL:options:

Your application MUST implement application:openURL:options: and call this method.

+(BOOL) application:(UIApplication *) app openURL:(NSURL *) url
        options:(NSDictionary<UIapplicationopenurloptionsKey,id> *) options;

Parameters

  • app: The instance of the UIApplication object for you application.
  • url: The URL used to open the application.
  • options:The options used in the URL

Return Value

YES if initialization was successful, otherwise NO.

getConfigurationAsBoolForKey:defaultValue:outError:

getConfigurationAsBoolForKey is a convenience function which retrieves the data associated with the specified configuration name and returns as a (BOOL) type.

-(BOOL) getConfigurationAsBoolForKey: (NSString *) config
        defaultValue: (BOOL) defaultValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • defaultValue: The value to be returned in case the specified configuration can not be found in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

The (BOOL) representation of the object found in the secure storage if found, otherwise the value passed to the defaultValue parameter is returned.

getConfigurationAsDataForKey:defaultValue:outError:

getConfigurationAsDataForKey is a convenience function which retrieves the data associated with the specified configuration name and returns as a (NSData *) type.

-(NSData *) getConfigurationAsDataForKey: (NSString *) config 
        defaultValue: (NSData *) defaultValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • defaultValue: The value to be returned in case the specified configuration can not be found in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

The (NSData *) representation of the object found in the secure storage if found, otherwise the value passed to the defaultValue parameter is returned.

getConfigurationAsDictionaryForKey:defaultValue:outError:

getConfigurationAsDictionaryForKey is a convenience function which retrieves the data associated with the specified configuration name and returns as a (NSDictionary *) type.

-(NSDictionary *) getConfigurationAsDictionaryForKey: (NSString *) config 
        defaultValue: (NSDictionary *) defaultValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • defaultValue: The value to be returned in case the specified configuration can not be found in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

The (NSDictionary *) representation of the object found in the secure storage if found, otherwise the value passed to the defaultValue parameter is returned.

getConfigurationAsDoubleForKey:defaultValue:outError:

getConfigurationAsDoubleForKey is a convenience function which retrieves the data associated with the specified configuration name and returns as a (double) type.

-(double) getConfigurationAsDoubleForKey: (NSString *) config 
        defaultValue: (double) defaultValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • defaultValue: The value to be returned in case the specified configuration can not be found in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

The (double) representation of the object found in the secure storage if found, otherwise the value passed to the defaultValue parameter is returned.

getConfigurationAsIntegerForKey:defaultValue:outError:

getConfigurationAsIntegerForKey is a convenience function which retrieves the data associated with the specified configuration name and returns as a (NSInteger) type.

-(NSInteger) getConfigurationAsIntegerForKey: (NSString *) config 
        defaultValue: (NSInteger) defaultValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • defaultValue: The value to be returned in case the specified configuration can not be found in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

The (NSInteger) representation of the object found in the secure storage if found, otherwise the value passed to the defaultValue parameter is returned.

getConfigurationAsNumberForKey:defaultValue:outError:

getConfigurationAsNumberForKey is a convenience function which retrieves the data associated with the specified configuration name and returns as a (NSNumber *) type.

-(NSNumber *) getConfigurationAsNumberForKey: (NSString *) config 
        defaultValue: (NSNumber *) defaultValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • defaultValue: The value to be returned in case the specified configuration can not be found in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

The (NSNumber *) representation of the object found in the secure storage if found, otherwise the value passed to the defaultValue parameter is returned.

getConfigurationAsObjectForKey:defaultValue:outError:

getConfigurationAsObjectForKey function retrieves the data associated with the specified configuration name.

-(id) getConfigurationAsObjectForKey: (NSString *) config 
        defaultValue: (id) defaultValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • defaultValue: The value to be returned in case the specified configuration can not be found in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

The id of the object found in the secure storage if found, otherwise the value passed to the defaultValue parameter is returned.

getConfigurationAsStringForKey:defaultValue:outError:

getConfigurationAsStringForKey is a convenience function which retrieves the data associated with the specified configuration name and returns as a (NSString *) type.

-(NSString *) getConfigurationAsStringForKey: (NSString *) config 
        defaultValue: (NSString *) defaultValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • defaultValue: The value to be returned in case the specified configuration can not be found in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

The (NSString *) representation of the object found in the secure storage if found, otherwise the value passed to the defaultValue parameter is returned.

removeConfigurationForKey:outError:

removeConfigurationForKey function removes the data associated with the specified configuration name from the secure storage.

-(id) removeConfigurationForKey: (NSString *) config 
        outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

YES if removing the data was successful, otherwise NO.

setConfigurationForKey:boolValue:outError:

setConfigurationForKey is a convenience function which saves the data associated with the specified configuration name.

-(BOOL) setConfigurationForKey: (NSString *) config 
        boolValue: (BOOL) boolValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • boolValue: The value to be saved in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

YES if saving the object was successful, otherwise NO.

Discussion

If a configuration name which already exists in the secure storage is passed then the stored value is overwritten by the new value passed.

setConfigurationForKey:dataValue:outError:

setConfigurationForKey is a convenience function which saves the data associated with the specified configuration name.

-(BOOL) setConfigurationForKey: (NSString *) config 
        dataValue: (NSData *) dataValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • dataValue: The value to be saved in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

YES if saving the object was successful, otherwise NO.

Discussion

If a configuration name which already exists in the secure storage is passed then the stored value is overwritten by the new value passed.

setConfigurationForKey:dictValue:outError:

setConfigurationForKey is a convenience function which saves the data associated with the specified configuration name.

-(BOOL) setConfigurationForKey: (NSString *) config 
        dictValue: (NSDictionary *) dictValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • dictValue: The value to be saved in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

YES if saving the object was successful, otherwise NO.

Discussion

If a configuration name which already exists in the secure storage is passed then the stored value is overwritten by the new value passed.

setConfigurationForKey:doubleValue:outError:

setConfigurationForKey is a convenience function which saves the data associated with the specified configuration name.

-(BOOL) setConfigurationForKey: (NSString *) config 
        doubleValue: (double) doubleValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • doubleValue: The value to be saved in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

YES if saving the object was successful, otherwise NO.

Discussion

If a configuration name which already exists in the secure storage is passed then the stored value is overwritten by the new value passed.

setConfigurationForKey:intValue:outError:

setConfigurationForKey is a convenience function which saves the data associated with the specified configuration name.

-(BOOL) setConfigurationForKey: (NSString *) config intValue: (NSInteger) intValue 
        outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • intValue: The value to be saved in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

YES if saving the object was successful, otherwise NO.

Discussion

If a configuration name which already exists in the secure storage is passed then the stored value is overwritten by the new value passed.

setConfigurationForKey:numberValue:outError:

setConfigurationForKey is a convenience function which saves the data associated with the specified configuration name.

-(BOOL) setConfigurationForKey: (NSString *) config 
        numberValue: (NSNumber *) numberValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • numberValue: The value to be saved in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

YES if saving the object was successful, otherwise NO.

Discussion

If a configuration name which already exists in the secure storage is passed then the stored value is overwritten by the new value passed.

setConfigurationForKey:objectValue:outError:

setConfigurationForKey function saves the data associated with the specified configuration name.

-(BOOL) setConfigurationForKey: (NSString *) config 
        objectValue: (id) objectValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • objectValue: The value to be saved in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

YES if saving the object was successful, otherwise NO.

Discussion

If a configuration name which already exists in the secure storage is passed then the stored value is overwritten by the new value passed.

setConfigurationForKey:stringValue:outError:

setConfigurationForKey is a convenience function which saves the data associated with the specified configuration name.

-(BOOL) setConfigurationForKey: (NSString *) config 
        stringValue: (NSString *) stringValue outError: (NSError **) error;

Parameters

  • config: A string object which describes the saved data.
  • stringValue: The value to be saved in the secure storage.
  • error: An out parameter where an error will be saved in case one occurs.

Return Value

YES if saving the object was successful, otherwise NO.

Discussion

If a configuration name which already exists in the secure storage is passed then the stored value is overwritten by the new value passed.