diff --git a/MVMCore/MVMCore/ActionHandling/ActionHandler+ClientParameters.swift b/MVMCore/MVMCore/ActionHandling/ActionHandler+ClientParameters.swift index a2c3841..abeec70 100644 --- a/MVMCore/MVMCore/ActionHandling/ActionHandler+ClientParameters.swift +++ b/MVMCore/MVMCore/ActionHandling/ActionHandler+ClientParameters.swift @@ -13,7 +13,7 @@ public extension MVMCoreActionHandler { /// Iterates through the clientParameters list. Gets values from the individual handlers and attaches the parameters to extraParameters. @objc func setClientParameter(with actionMap: [String: Any]?, completionHandler: @escaping ([String : Any]?) -> ()) { - guard let actionMapWithClientParameters = actionMap, let clientParameters = actionMapWithClientParameters.optionalDictionaryForKey("clientParameters") else { + guard let actionMapWithClientParameters = actionMap, let clientParameters = actionMapWithClientParameters.optionalDictionaryForKey(KeyClientParameters) else { completionHandler(actionMap) return } diff --git a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m index 5095fc8..125e1d5 100644 --- a/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m +++ b/MVMCore/MVMCore/ActionHandling/MVMCoreActionHandler.m @@ -129,7 +129,7 @@ NSString * const KeyActionTypeOpen = @"openPage"; }; // BAU dictionary comparsion breaks if client paramters sets the dictionarr. For now we will set client paramters only when its sent in the action map - if ([actionInformation dict:@"clientParameters"]) { + if ([actionInformation dict:KeyClientParameters]) { [self setClientParameterWith:actionInformation completionHandler:performAction]; } else { performAction(actionInformation); @@ -299,7 +299,7 @@ NSString * const KeyActionTypeOpen = @"openPage"; }; // BAU dictionary comparsion breaks if client paramters sets the dictionarr. For now we will set client paramters only when its sent in the action map - if ([actionInformation dict:@"clientParameters"]) { + if ([actionInformation dict:KeyClientParameters]) { [self setClientParameterWith:actionInformation completionHandler:performAction]; } else { performAction(actionInformation); @@ -454,7 +454,7 @@ NSString * const KeyActionTypeOpen = @"openPage"; }; // BAU dictionary comparsion breaks if client paramters sets the dictionarr. For now we will set client paramters only when its sent in the action map - if ([actionInformation dict:@"clientParameters"]) { + if ([actionInformation dict:KeyClientParameters]) { [self setClientParameterWith:actionInformation completionHandler:performAction]; } else { performAction(actionInformation); @@ -578,7 +578,7 @@ NSString * const KeyActionTypeOpen = @"openPage"; }; // BAU dictionary comparsion breaks if client paramters sets the dictionarr. For now we will set client paramters only when its sent in the action map - if ([actionInformation dict:@"clientParameters"]) { + if ([actionInformation dict:KeyClientParameters]) { [self setClientParameterWith:actionInformation completionHandler:performAction]; } else { performAction(actionInformation); diff --git a/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h b/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h index f3d84ac..220b180 100644 --- a/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h +++ b/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h @@ -51,6 +51,8 @@ extern NSString * const KeyContextRoot; extern NSString * const KeyType; extern NSString * const KeyMVMRC; +extern NSString * const KeyClientParameters; + #pragma mark - JSON Values // Server driven response type diff --git a/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m b/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m index 71cccac..2127e2e 100644 --- a/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m +++ b/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m @@ -51,6 +51,8 @@ NSString * const KeyContextRoot = @"appContext"; NSString * const KeyType = @"type"; NSString * const KeyMVMRC = @"LaunchMVMRC"; +NSString * const KeyClientParameters = @"clientParameters"; + #pragma mark - JSON Values // Server driven response type