Merge branch 'develop' of https://gitlab.verizon.com/BPHV_MIPS/mvm_core into bugfix/optional_modules
This commit is contained in:
commit
ab8558371a
@ -946,6 +946,7 @@
|
|||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
ENABLE_TESTABILITY = YES;
|
ENABLE_TESTABILITY = YES;
|
||||||
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GCC_DYNAMIC_NO_PIC = NO;
|
GCC_DYNAMIC_NO_PIC = NO;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
@ -1007,6 +1008,7 @@
|
|||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||||
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||||
GCC_NO_COMMON_BLOCKS = YES;
|
GCC_NO_COMMON_BLOCKS = YES;
|
||||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||||
|
|||||||
@ -395,7 +395,7 @@ NSString * const KeyActionTypeOpen = @"openPage";
|
|||||||
} else {
|
} else {
|
||||||
[MVMCoreDispatchUtility performBlockInBackground:^{
|
[MVMCoreDispatchUtility performBlockInBackground:^{
|
||||||
// Cannot linkaway, show error.
|
// Cannot linkaway, show error.
|
||||||
MVMCoreErrorObject *error = error = [[MVMCoreErrorObject alloc] initWithTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorTitle] message:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorUnableToProcess] code:ErrorCodeLinkawayFailed domain:ErrorDomainNative location:[NSString stringWithFormat:@"%@_%@",NSStringFromClass([delegateObject.actionDelegate class]),KeyActionTypeLinkAway]];
|
MVMCoreErrorObject *error = [[MVMCoreErrorObject alloc] initWithTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorTitle] message:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorUnableToProcess] code:ErrorCodeLinkawayFailed domain:ErrorDomainNative location:[NSString stringWithFormat:@"%@_%@",NSStringFromClass([delegateObject.actionDelegate class]),KeyActionTypeLinkAway]];
|
||||||
[self handleActionError:error actionInformation:actionInformation additionalData:additionalData delegateObject:delegateObject];
|
[self handleActionError:error actionInformation:actionInformation additionalData:additionalData delegateObject:delegateObject];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -68,11 +68,11 @@
|
|||||||
self.contextRoot = [actionMap string:KeyContextRoot];
|
self.contextRoot = [actionMap string:KeyContextRoot];
|
||||||
NSString *alternateBase = [actionMap string:@"baseURL"];
|
NSString *alternateBase = [actionMap string:@"baseURL"];
|
||||||
if (alternateBase) {
|
if (alternateBase) {
|
||||||
self.alternateBaseURL = [NSURL URLWithString:[alternateBase stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLHostAllowedCharacterSet]];
|
self.alternateBaseURL = [NSURL URLWithString:alternateBase];
|
||||||
}
|
}
|
||||||
NSString *url = [actionMap string:@"URL"];
|
NSString *url = [actionMap string:@"URL"];
|
||||||
if (url) {
|
if (url) {
|
||||||
self.URL = [NSURL URLWithString:[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
|
self.URL = [NSURL URLWithString:url];
|
||||||
}
|
}
|
||||||
self.actionMap = actionMap;
|
self.actionMap = actionMap;
|
||||||
self.customTimeoutTime = [actionMap optionalNumberForKey:@"customTimeoutTime"];
|
self.customTimeoutTime = [actionMap optionalNumberForKey:@"customTimeoutTime"];
|
||||||
|
|||||||
@ -12,12 +12,18 @@ public protocol ActionModelProtocol: ModelProtocol {
|
|||||||
var actionType: String { get }
|
var actionType: String { get }
|
||||||
var extraParameters: JSONValueDictionary? { get set }
|
var extraParameters: JSONValueDictionary? { get set }
|
||||||
var analyticsData: JSONValueDictionary? { get set }
|
var analyticsData: JSONValueDictionary? { get set }
|
||||||
|
var accessibilityIdentifier: String? { get set }
|
||||||
}
|
}
|
||||||
|
|
||||||
public extension ActionModelProtocol {
|
public extension ActionModelProtocol {
|
||||||
|
|
||||||
var actionType: String {
|
var actionType: String {
|
||||||
get { return Self.identifier }
|
get { Self.identifier }
|
||||||
|
}
|
||||||
|
|
||||||
|
var accessibilityIdentifier: String? {
|
||||||
|
get { nil }
|
||||||
|
set { }
|
||||||
}
|
}
|
||||||
|
|
||||||
static var categoryCodingKey: String {
|
static var categoryCodingKey: String {
|
||||||
|
|||||||
@ -69,16 +69,16 @@
|
|||||||
- (NSDictionary *) getHardCodedResponseForRequest:(MVMCoreRequestParameters *)request {
|
- (NSDictionary *) getHardCodedResponseForRequest:(MVMCoreRequestParameters *)request {
|
||||||
NSDictionary *cannedResponse = nil;
|
NSDictionary *cannedResponse = nil;
|
||||||
|
|
||||||
if(_jsonDictionary) {
|
if (_jsonDictionary) {
|
||||||
BOOL matchesQuery = NO;
|
BOOL matchesQuery = NO;
|
||||||
for(NSString *urlKey in _sortedKeys) {
|
for (NSString *urlKey in _sortedKeys) {
|
||||||
NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithString:urlKey];
|
NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithString:urlKey];
|
||||||
if([urlComponents.path isEqualToString:request.pageType]) {
|
if ([urlComponents.path isEqualToString:request.pageType]) {
|
||||||
matchesQuery = YES;
|
matchesQuery = YES;
|
||||||
if(urlComponents.query) {
|
if (urlComponents.query) {
|
||||||
for(NSURLQueryItem *item in urlComponents.queryItems) {
|
for (NSURLQueryItem *item in urlComponents.queryItems) {
|
||||||
NSString *requestVal = [request.parameters stringForKey:item.name];
|
NSString *requestVal = [request.parameters stringForKey:item.name];
|
||||||
if(!requestVal || ![requestVal isEqualToString:item.value]) {
|
if (!requestVal || ![requestVal isEqualToString:item.value]) {
|
||||||
matchesQuery = NO;
|
matchesQuery = NO;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -88,7 +88,7 @@
|
|||||||
cannedResponse = _jsonDictionary[urlKey];
|
cannedResponse = _jsonDictionary[urlKey];
|
||||||
// keep searching to see if there is a more exact match on parameters
|
// keep searching to see if there is a more exact match on parameters
|
||||||
}
|
}
|
||||||
if(matchesQuery) {
|
if (matchesQuery) {
|
||||||
cannedResponse = _jsonDictionary[urlKey];
|
cannedResponse = _jsonDictionary[urlKey];
|
||||||
// found a request parameters match, accept as the best result and break out
|
// found a request parameters match, accept as the best result and break out
|
||||||
break;
|
break;
|
||||||
@ -101,7 +101,6 @@
|
|||||||
cannedResponse = [self getHardCodedResponseForPageType:request.pageType];
|
cannedResponse = [self getHardCodedResponseForPageType:request.pageType];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return cannedResponse;
|
return cannedResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user