Merge branch 'develop' of https://gitlab.verizon.com/BPHV_MIPS/mvm_core into feature/LoadingOverlay-Text

This commit is contained in:
Sumanth Nadigadda 2023-10-13 14:03:00 +05:30
commit a8f3407ed8
19 changed files with 69 additions and 114 deletions

View File

@ -72,6 +72,7 @@
AF1201832108C9B400E2F592 /* MVMCoreViewManagerViewControllerProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = AF1201812108C9B400E2F592 /* MVMCoreViewManagerViewControllerProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; AF1201832108C9B400E2F592 /* MVMCoreViewManagerViewControllerProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = AF1201812108C9B400E2F592 /* MVMCoreViewManagerViewControllerProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
AF130B8E2788DF6E00C6C03C /* OpenURLOptionsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF130B8D2788DF6E00C6C03C /* OpenURLOptionsModel.swift */; }; AF130B8E2788DF6E00C6C03C /* OpenURLOptionsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF130B8D2788DF6E00C6C03C /* OpenURLOptionsModel.swift */; };
AF26DDAE1FCE6A37004E8F65 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = AF26DDB01FCE6A37004E8F65 /* Localizable.strings */; }; AF26DDAE1FCE6A37004E8F65 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = AF26DDB01FCE6A37004E8F65 /* Localizable.strings */; };
AF3A3F3F2ACC716A005094B2 /* MVMCoreObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF3A3F3E2ACC716A005094B2 /* MVMCoreObject.swift */; };
AF43A5771FBA5B7C008E9347 /* MVMCoreJSONConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = AF43A5751FBA5B7C008E9347 /* MVMCoreJSONConstants.h */; settings = {ATTRIBUTES = (Public, ); }; }; AF43A5771FBA5B7C008E9347 /* MVMCoreJSONConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = AF43A5751FBA5B7C008E9347 /* MVMCoreJSONConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
AF43A5781FBA5B7C008E9347 /* MVMCoreJSONConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = AF43A5761FBA5B7C008E9347 /* MVMCoreJSONConstants.m */; }; AF43A5781FBA5B7C008E9347 /* MVMCoreJSONConstants.m in Sources */ = {isa = PBXBuildFile; fileRef = AF43A5761FBA5B7C008E9347 /* MVMCoreJSONConstants.m */; };
AF43A57B1FBA5E6A008E9347 /* MVMCoreHardcodedStringsConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = AF43A5791FBA5E6A008E9347 /* MVMCoreHardcodedStringsConstants.h */; settings = {ATTRIBUTES = (Public, ); }; }; AF43A57B1FBA5E6A008E9347 /* MVMCoreHardcodedStringsConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = AF43A5791FBA5E6A008E9347 /* MVMCoreHardcodedStringsConstants.h */; settings = {ATTRIBUTES = (Public, ); }; };
@ -84,8 +85,6 @@
AF43A6FD1FBE2F65008E9347 /* Reachability.h in Headers */ = {isa = PBXBuildFile; fileRef = AF43A6FA1FBE2F2A008E9347 /* Reachability.h */; settings = {ATTRIBUTES = (Public, ); }; }; AF43A6FD1FBE2F65008E9347 /* Reachability.h in Headers */ = {isa = PBXBuildFile; fileRef = AF43A6FA1FBE2F2A008E9347 /* Reachability.h */; settings = {ATTRIBUTES = (Public, ); }; };
AF43A6FF1FBE3252008E9347 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = AF43A6FB1FBE2F2A008E9347 /* Reachability.m */; }; AF43A6FF1FBE3252008E9347 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = AF43A6FB1FBE2F2A008E9347 /* Reachability.m */; };
AF43A7011FC4B227008E9347 /* MVMCoreGlobalLoadProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = AF43A7001FC4B227008E9347 /* MVMCoreGlobalLoadProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; AF43A7011FC4B227008E9347 /* MVMCoreGlobalLoadProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = AF43A7001FC4B227008E9347 /* MVMCoreGlobalLoadProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
AF43A7061FC4D7A2008E9347 /* MVMCoreObject.h in Headers */ = {isa = PBXBuildFile; fileRef = AF43A7041FC4D7A2008E9347 /* MVMCoreObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
AF43A7071FC4D7A2008E9347 /* MVMCoreObject.m in Sources */ = {isa = PBXBuildFile; fileRef = AF43A7051FC4D7A2008E9347 /* MVMCoreObject.m */; };
AF43A70A1FC4F415008E9347 /* MVMCoreCache.m in Sources */ = {isa = PBXBuildFile; fileRef = AF43A7081FC4F415008E9347 /* MVMCoreCache.m */; }; AF43A70A1FC4F415008E9347 /* MVMCoreCache.m in Sources */ = {isa = PBXBuildFile; fileRef = AF43A7081FC4F415008E9347 /* MVMCoreCache.m */; };
AF43A70B1FC4F415008E9347 /* MVMCoreCache.h in Headers */ = {isa = PBXBuildFile; fileRef = AF43A7091FC4F415008E9347 /* MVMCoreCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; AF43A70B1FC4F415008E9347 /* MVMCoreCache.h in Headers */ = {isa = PBXBuildFile; fileRef = AF43A7091FC4F415008E9347 /* MVMCoreCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
AF43A71B1FC5BEBB008E9347 /* MVMCoreViewControllerProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = AF43A71A1FC5BEBB008E9347 /* MVMCoreViewControllerProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; AF43A71B1FC5BEBB008E9347 /* MVMCoreViewControllerProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = AF43A71A1FC5BEBB008E9347 /* MVMCoreViewControllerProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
@ -225,6 +224,7 @@
AF1201812108C9B400E2F592 /* MVMCoreViewManagerViewControllerProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreViewManagerViewControllerProtocol.h; sourceTree = "<group>"; }; AF1201812108C9B400E2F592 /* MVMCoreViewManagerViewControllerProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreViewManagerViewControllerProtocol.h; sourceTree = "<group>"; };
AF130B8D2788DF6E00C6C03C /* OpenURLOptionsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenURLOptionsModel.swift; sourceTree = "<group>"; }; AF130B8D2788DF6E00C6C03C /* OpenURLOptionsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OpenURLOptionsModel.swift; sourceTree = "<group>"; };
AF26DDAF1FCE6A37004E8F65 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; }; AF26DDAF1FCE6A37004E8F65 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
AF3A3F3E2ACC716A005094B2 /* MVMCoreObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVMCoreObject.swift; sourceTree = "<group>"; };
AF43A5751FBA5B7C008E9347 /* MVMCoreJSONConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreJSONConstants.h; sourceTree = "<group>"; }; AF43A5751FBA5B7C008E9347 /* MVMCoreJSONConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreJSONConstants.h; sourceTree = "<group>"; };
AF43A5761FBA5B7C008E9347 /* MVMCoreJSONConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MVMCoreJSONConstants.m; sourceTree = "<group>"; }; AF43A5761FBA5B7C008E9347 /* MVMCoreJSONConstants.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MVMCoreJSONConstants.m; sourceTree = "<group>"; };
AF43A5791FBA5E6A008E9347 /* MVMCoreHardcodedStringsConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreHardcodedStringsConstants.h; sourceTree = "<group>"; }; AF43A5791FBA5E6A008E9347 /* MVMCoreHardcodedStringsConstants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreHardcodedStringsConstants.h; sourceTree = "<group>"; };
@ -240,8 +240,6 @@
AF43A6FB1FBE2F2A008E9347 /* Reachability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; }; AF43A6FB1FBE2F2A008E9347 /* Reachability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; };
AF43A6FE1FBE2FEE008E9347 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; AF43A6FE1FBE2FEE008E9347 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
AF43A7001FC4B227008E9347 /* MVMCoreGlobalLoadProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreGlobalLoadProtocol.h; sourceTree = "<group>"; }; AF43A7001FC4B227008E9347 /* MVMCoreGlobalLoadProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreGlobalLoadProtocol.h; sourceTree = "<group>"; };
AF43A7041FC4D7A2008E9347 /* MVMCoreObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreObject.h; sourceTree = "<group>"; };
AF43A7051FC4D7A2008E9347 /* MVMCoreObject.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MVMCoreObject.m; sourceTree = "<group>"; };
AF43A7081FC4F415008E9347 /* MVMCoreCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MVMCoreCache.m; sourceTree = "<group>"; }; AF43A7081FC4F415008E9347 /* MVMCoreCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MVMCoreCache.m; sourceTree = "<group>"; };
AF43A7091FC4F415008E9347 /* MVMCoreCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MVMCoreCache.h; sourceTree = "<group>"; }; AF43A7091FC4F415008E9347 /* MVMCoreCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MVMCoreCache.h; sourceTree = "<group>"; };
AF43A71A1FC5BEBB008E9347 /* MVMCoreViewControllerProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreViewControllerProtocol.h; sourceTree = "<group>"; }; AF43A71A1FC5BEBB008E9347 /* MVMCoreViewControllerProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreViewControllerProtocol.h; sourceTree = "<group>"; };
@ -666,8 +664,7 @@
AFBB96DE1FBA48CE0008D868 /* Singletons */ = { AFBB96DE1FBA48CE0008D868 /* Singletons */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
AF43A7041FC4D7A2008E9347 /* MVMCoreObject.h */, AF3A3F3E2ACC716A005094B2 /* MVMCoreObject.swift */,
AF43A7051FC4D7A2008E9347 /* MVMCoreObject.m */,
); );
path = Singletons; path = Singletons;
sourceTree = "<group>"; sourceTree = "<group>";
@ -728,7 +725,6 @@
AF43A5871FBB67D6008E9347 /* MVMCoreActionUtility.h in Headers */, AF43A5871FBB67D6008E9347 /* MVMCoreActionUtility.h in Headers */,
AF43A6FD1FBE2F65008E9347 /* Reachability.h in Headers */, AF43A6FD1FBE2F65008E9347 /* Reachability.h in Headers */,
AFBB96601FBA3A570008D868 /* MVMCoreLoadObject.h in Headers */, AFBB96601FBA3A570008D868 /* MVMCoreLoadObject.h in Headers */,
AF43A7061FC4D7A2008E9347 /* MVMCoreObject.h in Headers */,
AFED77A11FCCA29400BAE689 /* MVMCoreViewControllerNibMappingObject.h in Headers */, AFED77A11FCCA29400BAE689 /* MVMCoreViewControllerNibMappingObject.h in Headers */,
AF43A71B1FC5BEBB008E9347 /* MVMCoreViewControllerProtocol.h in Headers */, AF43A71B1FC5BEBB008E9347 /* MVMCoreViewControllerProtocol.h in Headers */,
AFBB96381FBA39E70008D868 /* MVMCoreLoadDelegateProtocol.h in Headers */, AFBB96381FBA39E70008D868 /* MVMCoreLoadDelegateProtocol.h in Headers */,
@ -913,7 +909,6 @@
8876D5F51FB50AB000EB2E3D /* UILabel+MFCustom.m in Sources */, 8876D5F51FB50AB000EB2E3D /* UILabel+MFCustom.m in Sources */,
AFBB96B31FBA3B590008D868 /* MVMCoreGetterUtility.m in Sources */, AFBB96B31FBA3B590008D868 /* MVMCoreGetterUtility.m in Sources */,
2723337B28BD534D004EAEE0 /* MVMCoreEvent.swift in Sources */, 2723337B28BD534D004EAEE0 /* MVMCoreEvent.swift in Sources */,
AF43A7071FC4D7A2008E9347 /* MVMCoreObject.m in Sources */,
94C014D924212360005811A9 /* ActionSettingModel.swift in Sources */, 94C014D924212360005811A9 /* ActionSettingModel.swift in Sources */,
D2DEDCB723C63F3B00C44CC4 /* Clamping.swift in Sources */, D2DEDCB723C63F3B00C44CC4 /* Clamping.swift in Sources */,
AF70699E2880D01400077CF6 /* ActionShareHandler.swift in Sources */, AF70699E2880D01400077CF6 /* ActionShareHandler.swift in Sources */,
@ -926,6 +921,7 @@
AFEA17A9209B6A1C00BC6740 /* MVMCoreBlockOperation.m in Sources */, AFEA17A9209B6A1C00BC6740 /* MVMCoreBlockOperation.m in Sources */,
AF43A70A1FC4F415008E9347 /* MVMCoreCache.m in Sources */, AF43A70A1FC4F415008E9347 /* MVMCoreCache.m in Sources */,
AF43A6FF1FBE3252008E9347 /* Reachability.m in Sources */, AF43A6FF1FBE3252008E9347 /* Reachability.m in Sources */,
AF3A3F3F2ACC716A005094B2 /* MVMCoreObject.swift in Sources */,
EA09CD62282ACDDB00A7835F /* Decoder+UserInfo.swift in Sources */, EA09CD62282ACDDB00A7835F /* Decoder+UserInfo.swift in Sources */,
EA09CD99282BF83600A7835F /* DecodableDefault.swift in Sources */, EA09CD99282BF83600A7835F /* DecodableDefault.swift in Sources */,
01C851D123CF97FE0021F976 /* ActionBackModel.swift in Sources */, 01C851D123CF97FE0021F976 /* ActionBackModel.swift in Sources */,

View File

@ -97,14 +97,14 @@ public protocol MVMCoreJSONActionHandlerProtocol: MVMCoreActionHandlerProtocol {
do { do {
let handlerType = try ModelRegistry.getHandler(model) as! MVMCoreActionHandlerProtocol.Type let handlerType = try ModelRegistry.getHandler(model) as! MVMCoreActionHandlerProtocol.Type
let handler = handlerType.init() let handler = handlerType.init()
MVMCoreLoggingHandler.shared()?.logCoreEvent(.actionInvoked(name: model.actionType, pageType: pageType(from: delegateObject), uuid: uuid)) MVMCoreLoggingHandler.shared()?.logCoreEvent(.actionInvoked(name: model.actionType, pageType: pageType(from: delegateObject), uuid: uuid, model: model))
if let handler = handler as? MVMCoreJSONActionHandlerProtocol { if let handler = handler as? MVMCoreJSONActionHandlerProtocol {
// Needed until we can remove legacy delegate functions. // Needed until we can remove legacy delegate functions.
try await handler.performAction(with: json, model: model, delegateObject: delegateObject, additionalData: additionalData) try await handler.performAction(with: json, model: model, delegateObject: delegateObject, additionalData: additionalData)
} else { } else {
try await handler.execute(with: model, delegateObject: delegateObject, additionalData: additionalData) try await handler.execute(with: model, delegateObject: delegateObject, additionalData: additionalData)
} }
MVMCoreLoggingHandler.shared()?.logCoreEvent(.actionComplete(name: model.actionType, pageType: pageType(from: delegateObject), uuid: uuid)) MVMCoreLoggingHandler.shared()?.logCoreEvent(.actionComplete(name: model.actionType, pageType: pageType(from: delegateObject), uuid: uuid, model: model))
} catch ModelRegistry.Error.handlerNotMapped { } catch ModelRegistry.Error.handlerNotMapped {
try Task.checkCancellation() try Task.checkCancellation()
// Allows custom handling if there no handler for the action. // Allows custom handling if there no handler for the action.
@ -114,7 +114,7 @@ public protocol MVMCoreJSONActionHandlerProtocol: MVMCoreActionHandlerProtocol {
throw ActionError.unknownAction(type: model.actionType) throw ActionError.unknownAction(type: model.actionType)
} }
} catch { } catch {
MVMCoreLoggingHandler.shared()?.logCoreEvent(.actionFailed(name: model.actionType, pageType: pageType(from: delegateObject), uuid: uuid, error: error)) MVMCoreLoggingHandler.shared()?.logCoreEvent(.actionFailed(name: model.actionType, pageType: pageType(from: delegateObject), uuid: uuid, model: model, error: error))
MVMCoreActionHandler.log(string: "Failed Action \(error)", additionalData: additionalData) MVMCoreActionHandler.log(string: "Failed Action \(error)", additionalData: additionalData)
throw error throw error
} }

View File

@ -34,7 +34,6 @@ extern NSString * const URLComponentKeepAlive;
#pragma mark - Notification Names #pragma mark - Notification Names
extern NSString * const NotificationResponseLoaded; extern NSString * const NotificationResponseLoaded;
extern NSString * const MVMCoreNotificationGoingToServer;
#pragma mark - Image Cache #pragma mark - Image Cache
extern NSTimeInterval const ImageTimeOut; extern NSTimeInterval const ImageTimeOut;

View File

@ -28,7 +28,6 @@ NSString * const URLComponentKeepAlive = @"isAlive.jsp";
#pragma mark - Notification Names #pragma mark - Notification Names
NSString * const NotificationResponseLoaded = @"responseLoaded"; NSString * const NotificationResponseLoaded = @"responseLoaded";
NSString * const MVMCoreNotificationGoingToServer = @"MVMCoreGoServer";
#pragma mark - Image Cache #pragma mark - Image Cache
NSTimeInterval const ImageTimeOut = 60; NSTimeInterval const ImageTimeOut = 60;

View File

@ -6,11 +6,12 @@
// Copyright (c) 2014 Verizon Wireless. All rights reserved. // Copyright (c) 2014 Verizon Wireless. All rights reserved.
// //
@import UIKit;
#import "MVMCoreLoadingOverlayHandler.h" #import "MVMCoreLoadingOverlayHandler.h"
#import "MVMCoreSessionObject.h" #import "MVMCoreSessionObject.h"
#import <MVMCore/MVMCoreDispatchUtility.h> #import <MVMCore/MVMCoreDispatchUtility.h>
#import "MVMCoreLoadingViewControllerProtocol.h" #import "MVMCoreLoadingViewControllerProtocol.h"
#import "MVMCoreObject.h" #import <MVMCore/MVMCore-Swift.h>
@interface MVMCoreLoadingOverlayHandler () @interface MVMCoreLoadingOverlayHandler ()
// The loading ui elements // The loading ui elements

View File

@ -18,7 +18,6 @@
#import "MVMCoreErrorObject.h" #import "MVMCoreErrorObject.h"
#import "MVMCoreErrorConstants.h" #import "MVMCoreErrorConstants.h"
#import "MVMCoreHardcodedStringsConstants.h" #import "MVMCoreHardcodedStringsConstants.h"
#import "MVMCoreObject.h"
#import "MVMCoreConstants.h" #import "MVMCoreConstants.h"
#import "MVMCoreActionUtility.h" #import "MVMCoreActionUtility.h"
#import <MVMCore/MVMCore-Swift.h> #import <MVMCore/MVMCore-Swift.h>
@ -312,7 +311,6 @@
MVMCoreLog(@"Cookie Name: %@, Cookie Value: %@, Domain: %@", obj.name, obj.value, obj.domain); MVMCoreLog(@"Cookie Name: %@, Cookie Value: %@, Domain: %@", obj.name, obj.value, obj.domain);
}]; }];
[[NSNotificationCenter defaultCenter] postNotificationName:MVMCoreNotificationGoingToServer object:nil];
NSTimeInterval startTime = [NSDate timeIntervalSinceReferenceDate]; NSTimeInterval startTime = [NSDate timeIntervalSinceReferenceDate];
NSURLSessionTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { NSURLSessionTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {

View File

@ -22,7 +22,6 @@
#import "MVMCoreHardcodedStringsConstants.h" #import "MVMCoreHardcodedStringsConstants.h"
#import "MVMCoreErrorConstants.h" #import "MVMCoreErrorConstants.h"
#import "MVMCoreActionUtility.h" #import "MVMCoreActionUtility.h"
#import "MVMCoreObject.h"
#import "MVMCoreConstants.h" #import "MVMCoreConstants.h"
#import <MVMCore/MVMCore-Swift.h> #import <MVMCore/MVMCore-Swift.h>
@ -297,10 +296,12 @@
} }
#if ENABLE_HARD_CODED_RESPONSE #if ENABLE_HARD_CODED_RESPONSE
if ([[MVMCoreObject sharedInstance].globalLoadDelegate respondsToSelector:@selector(getJSONForPageType:)]) { if ([[MVMCoreObject sharedInstance].globalLoadDelegate respondsToSelector:@selector(getJSONForRequestParameters:)]) {
NSDictionary *json = [[MVMCoreObject sharedInstance].globalLoadDelegate getJSONForPageType:requestParameters.pageType]; NSDictionary *json = [[MVMCoreObject sharedInstance].globalLoadDelegate getJSONForRequestParameters:requestParameters];
completionHandler(json); if (json) {
return; completionHandler(json);
return;
}
} }
#endif #endif

View File

@ -34,7 +34,6 @@ FOUNDATION_EXPORT const unsigned char MVMCoreVersionString[];
#import <MVMCore/MVMCoreGetterUtility.h> #import <MVMCore/MVMCoreGetterUtility.h>
#import <MVMCore/MVMCoreErrorObject.h> #import <MVMCore/MVMCoreErrorObject.h>
#import <MVMCore/MVMCoreOperation.h> #import <MVMCore/MVMCoreOperation.h>
#import <MVMCore/MVMCoreObject.h>
#import <MVMCore/MVMCoreBlockOperation.h> #import <MVMCore/MVMCoreBlockOperation.h>
#import <MVMCore/Reachability.h> #import <MVMCore/Reachability.h>

View File

@ -42,7 +42,7 @@
- (BOOL)hasContentToShow:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error; - (BOOL)hasContentToShow:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error;
#if ENABLE_HARD_CODED_RESPONSE #if ENABLE_HARD_CODED_RESPONSE
- (nonnull NSDictionary *)getJSONForPageType:(nonnull NSString *)pageType; - (nullable NSDictionary *)getJSONForRequestParameters:(nonnull MVMCoreRequestParameters *)requestParameters;
- (nonnull NSDictionary *)modifyJSON:(nonnull NSDictionary *)json; - (nonnull NSDictionary *)modifyJSON:(nonnull NSDictionary *)json;
#endif #endif

View File

@ -11,12 +11,12 @@
#import "MVMCoreErrorObject.h" #import "MVMCoreErrorObject.h"
#import "MVMCoreLoggingHandler.h" #import "MVMCoreLoggingHandler.h"
#import "MVMCoreGetterUtility.h" #import "MVMCoreGetterUtility.h"
#import "MVMCoreObject.h"
#import "MVMCoreConstants.h" #import "MVMCoreConstants.h"
#import "MVMCoreActionUtility.h" #import "MVMCoreActionUtility.h"
#import "MVMCoreLoggingHandler.h" #import "MVMCoreLoggingHandler.h"
#import "MVMCoreDispatchUtility.h" #import "MVMCoreDispatchUtility.h"
#import "MVMCoreErrorConstants.h" #import "MVMCoreErrorConstants.h"
#import <MVMCore/MVMCore-Swift.h>
@interface MVMCoreCache () @interface MVMCoreCache ()

View File

@ -23,32 +23,35 @@ public enum MVMCoreEvent {
error: Error? error: Error?
) )
/// Could not find the action specified.. /// Could not find the action specified.
case actionNotFound( case actionNotFound(
name: String, name: String,
pageType: String pageType: String
) )
/// The webview bridge action handler was invoked and is in progress. /// The core action handler was invoked and is in progress.
case actionInvoked( case actionInvoked(
name: String, name: String,
pageType: String, pageType: String,
uuid: String uuid: String,
model: ActionModelProtocol
) )
/// The action failed.. /// The core action handler failed to complete the action.
case actionFailed( case actionFailed(
name: String, name: String,
pageType: String, pageType: String,
uuid: String, uuid: String,
model: ActionModelProtocol,
error: Error? error: Error?
) )
/// The action is completed. /// The core action handler completed an action.
case actionComplete( case actionComplete(
name: String, name: String,
pageType: String, pageType: String,
uuid: String uuid: String,
model: ActionModelProtocol
) )
// ---------------------------- // ----------------------------
@ -61,7 +64,7 @@ public enum MVMCoreEvent {
actionId: String actionId: String
) )
/// The client perameter handler was invoked and is in progress. /// The client parameter handler was invoked and is in progress.
case clientParameterStartFetch( case clientParameterStartFetch(
name: String, name: String,
uuid: String, uuid: String,

View File

@ -7,7 +7,6 @@
// //
#import "MVMCoreLoggingHandler.h" #import "MVMCoreLoggingHandler.h"
#import "MVMCoreObject.h"
#import "MVMCoreActionUtility.h" #import "MVMCoreActionUtility.h"
#import <MVMCore/MVMCore-Swift.h> #import <MVMCore/MVMCore-Swift.h>

View File

@ -7,7 +7,6 @@
// //
#import "MVMCoreSessionObject.h" #import "MVMCoreSessionObject.h"
#import "MVMCoreObject.h"
#import "MVMCoreActionUtility.h" #import "MVMCoreActionUtility.h"
#import <MVMCore/MVMCore-Swift.h> #import <MVMCore/MVMCore-Swift.h>

View File

@ -1,44 +0,0 @@
//
// MVMCoreObject.h
// MVMCore
//
// Created by Pfeil, Scott Robert on 11/21/17.
// Copyright © 2017 myverizon. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MVMCore/MVMCoreSessionObject.h>
#import <MVMCore/MVMCoreCache.h>
#import <MVMCore/MVMCoreViewControllerMappingObject.h>
#import <MVMCore/MVMCoreGlobalLoadProtocol.h>
#import <MVMCore/MVMCoreLoadingOverlayDelegateProtocol.h>
#import <MVMCore/MVMCoreLoggingDelegateProtocol.h>
#import <MVMCore/MVMCoreLoggingHandler.h>
#import <MVMCore/MVMCoreLoadHandler.h>
@class MVMCoreActionHandler;
@class MVMCoreSessionTimeHandler;
@interface MVMCoreObject : NSObject
@property (nullable, strong, nonatomic) MVMCoreSessionObject *session;
@property (nullable, strong, nonatomic) MVMCoreCache *cache;
@property (nullable, strong, nonatomic) MVMCoreViewControllerMappingObject *viewControllerMapping;
@property (nullable, strong, nonatomic) MVMCoreActionHandler *actionHandler;
@property (nullable, strong, nonatomic) MVMCoreSessionTimeHandler *sessionHandler;
@property (nullable, strong, nonatomic) MVMCoreLoadHandler *loadHandler;
// The delegates
@property (nullable, strong, nonatomic) id <MVMCoreGlobalLoadProtocol> globalLoadDelegate;
@property (nullable, strong, nonatomic) id <MVMCoreLoadingOverlayDelegateProtocol> loadingProtocol;
@property (nullable, strong, nonatomic) NSObject <MVMCoreLoggingDelegateProtocol> *loggingDelegate;
// A reference to the calling application delegate that should be set. For a normal app, could be the UIApplicationDelegate. For watch, could be WKExtensionDelegate. For iMessage, could be MSMessagesAppViewController. etc, etc. Useful for the framework to call delegate specific functions.
@property (nullable, weak, nonatomic) id applicationDelegate;
// A singleton.
+ (nullable instancetype)sharedInstance;
// Sets up with a default session, cache, view controller mapping, action handler, session handler, and logging delegate.
- (void)defaultInitialSetup;
@end

View File

@ -1,34 +0,0 @@
//
// MVMCoreObject.m
// MVMCore
//
// Created by Pfeil, Scott Robert on 11/21/17.
// Copyright © 2017 myverizon. All rights reserved.
//
#import "MVMCoreObject.h"
#import <MVMCore/MVMCore-Swift.h>
@implementation MVMCoreObject
+ (nullable instancetype)sharedInstance {
static dispatch_once_t once;
static id sharedInstance;
dispatch_once(&once, ^{
sharedInstance = [[self alloc] init];
});
return sharedInstance;
}
- (void)defaultInitialSetup {
[ModelMapping registerObjects];
self.session = [[MVMCoreSessionObject alloc] init];
self.cache = [[MVMCoreCache alloc] init];
self.viewControllerMapping = [[MVMCoreViewControllerMappingObject alloc] init];
self.sessionHandler = [[MVMCoreSessionTimeHandler alloc] init];
self.actionHandler = [[MVMCoreActionHandler alloc] init];
self.loggingDelegate = [[MVMCoreLoggingHandler alloc] init];
self.loadHandler = [[MVMCoreLoadHandler alloc] init];
}
@end

View File

@ -0,0 +1,41 @@
//
// HandlerSingleton.swift
// MVMCore
//
// Created by Scott Pfeil on 10/3/23.
// Copyright © 2023 myverizon. All rights reserved.
//
import Foundation
@objcMembers
public class MVMCoreObject: NSObject {
private static var singleton = MVMCoreObject()
public static func sharedInstance() -> MVMCoreObject? { singleton }
private override init() {}
public var session: MVMCoreSessionObject?
public var cache: MVMCoreCache?
public var actionHandler: MVMCoreActionHandler?
public var viewControllerMapping: MVMCoreViewControllerMappingObject?
public var sessionHandler: MVMCoreSessionTimeHandler?
public var loadHandler: MVMCoreLoadHandler?
public var globalLoadDelegate: MVMCoreGlobalLoadProtocol?
public var loadingProtocol: MVMCoreLoadingOverlayDelegateProtocol?
public var loggingDelegate: MVMCoreLoggingDelegateProtocol?
/// A reference to the calling application delegate that should be set. For a normal app, could be the UIApplicationDelegate. For watch, could be WKExtensionDelegate. For iMessage, could be MSMessagesAppViewController. etc, etc. Useful for the framework to call delegate specific functions.
public weak var applicationDelegate: AnyObject?
/// Convenience function. Sets up with a default session, cache, view controller mapping, action handler, session handler, and logging delegate.
public func defaultInitialSetup() {
ModelMapping.registerObjects()
session = MVMCoreSessionObject()
cache = MVMCoreCache()
viewControllerMapping = MVMCoreViewControllerMappingObject()
sessionHandler = MVMCoreSessionTimeHandler()
actionHandler = MVMCoreActionHandler()
loggingDelegate = MVMCoreLoggingHandler()
loadHandler = MVMCoreLoadHandler()
}
}

View File

@ -15,7 +15,6 @@
#import "MVMCoreRequestParameters.h" #import "MVMCoreRequestParameters.h"
#import "NSDictionary+MFConvenience.h" #import "NSDictionary+MFConvenience.h"
#import "MVMCoreJSONConstants.h" #import "MVMCoreJSONConstants.h"
#import "MVMCoreObject.h"
#import <MVMCore/MVMCore-Swift.h> #import <MVMCore/MVMCore-Swift.h>
@implementation MVMCoreActionUtility @implementation MVMCoreActionUtility

View File

@ -7,7 +7,6 @@
// //
#import "MVMCoreErrorObject.h" #import "MVMCoreErrorObject.h"
#import "MVMCoreObject.h"
#import "MVMCoreErrorConstants.h" #import "MVMCoreErrorConstants.h"
#import "MVMCoreGetterUtility.h" #import "MVMCoreGetterUtility.h"
#import "NSDictionary+MFConvenience.h" #import "NSDictionary+MFConvenience.h"

View File

@ -17,8 +17,8 @@
#import "MVMCoreViewControllerProgrammaticMappingObject.h" #import "MVMCoreViewControllerProgrammaticMappingObject.h"
#import "MVMCoreErrorConstants.h" #import "MVMCoreErrorConstants.h"
#import "MVMCoreHardcodedStringsConstants.h" #import "MVMCoreHardcodedStringsConstants.h"
#import "MVMCoreObject.h"
#import "MVMCoreActionUtility.h" #import "MVMCoreActionUtility.h"
#import <MVMCore/MVMCore-Swift.h>
@interface MVMCoreViewControllerMappingObject () @interface MVMCoreViewControllerMappingObject ()