MVMCoreObject to swift
This commit is contained in:
parent
e5402bb6eb
commit
51597121bd
@ -72,6 +72,7 @@
|
||||
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 */; };
|
||||
AF26DDAE1FCE6A37004E8F65 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = AF26DDB01FCE6A37004E8F65 /* Localizable.strings */; };
|
||||
AF3A3F3F2ACC716A005094B2 /* HandlerSingleton.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF3A3F3E2ACC716A005094B2 /* HandlerSingleton.swift */; };
|
||||
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 */; };
|
||||
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, ); }; };
|
||||
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, ); }; };
|
||||
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 */; };
|
||||
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, ); }; };
|
||||
@ -225,6 +224,7 @@
|
||||
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>"; };
|
||||
AF26DDAF1FCE6A37004E8F65 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
AF3A3F3E2ACC716A005094B2 /* HandlerSingleton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HandlerSingleton.swift; 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>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
@ -666,8 +664,7 @@
|
||||
AFBB96DE1FBA48CE0008D868 /* Singletons */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
AF43A7041FC4D7A2008E9347 /* MVMCoreObject.h */,
|
||||
AF43A7051FC4D7A2008E9347 /* MVMCoreObject.m */,
|
||||
AF3A3F3E2ACC716A005094B2 /* HandlerSingleton.swift */,
|
||||
);
|
||||
path = Singletons;
|
||||
sourceTree = "<group>";
|
||||
@ -728,7 +725,6 @@
|
||||
AF43A5871FBB67D6008E9347 /* MVMCoreActionUtility.h in Headers */,
|
||||
AF43A6FD1FBE2F65008E9347 /* Reachability.h in Headers */,
|
||||
AFBB96601FBA3A570008D868 /* MVMCoreLoadObject.h in Headers */,
|
||||
AF43A7061FC4D7A2008E9347 /* MVMCoreObject.h in Headers */,
|
||||
AFED77A11FCCA29400BAE689 /* MVMCoreViewControllerNibMappingObject.h in Headers */,
|
||||
AF43A71B1FC5BEBB008E9347 /* MVMCoreViewControllerProtocol.h in Headers */,
|
||||
AFBB96381FBA39E70008D868 /* MVMCoreLoadDelegateProtocol.h in Headers */,
|
||||
@ -913,7 +909,6 @@
|
||||
8876D5F51FB50AB000EB2E3D /* UILabel+MFCustom.m in Sources */,
|
||||
AFBB96B31FBA3B590008D868 /* MVMCoreGetterUtility.m in Sources */,
|
||||
2723337B28BD534D004EAEE0 /* MVMCoreEvent.swift in Sources */,
|
||||
AF43A7071FC4D7A2008E9347 /* MVMCoreObject.m in Sources */,
|
||||
94C014D924212360005811A9 /* ActionSettingModel.swift in Sources */,
|
||||
D2DEDCB723C63F3B00C44CC4 /* Clamping.swift in Sources */,
|
||||
AF70699E2880D01400077CF6 /* ActionShareHandler.swift in Sources */,
|
||||
@ -926,6 +921,7 @@
|
||||
AFEA17A9209B6A1C00BC6740 /* MVMCoreBlockOperation.m in Sources */,
|
||||
AF43A70A1FC4F415008E9347 /* MVMCoreCache.m in Sources */,
|
||||
AF43A6FF1FBE3252008E9347 /* Reachability.m in Sources */,
|
||||
AF3A3F3F2ACC716A005094B2 /* HandlerSingleton.swift in Sources */,
|
||||
EA09CD62282ACDDB00A7835F /* Decoder+UserInfo.swift in Sources */,
|
||||
EA09CD99282BF83600A7835F /* DecodableDefault.swift in Sources */,
|
||||
01C851D123CF97FE0021F976 /* ActionBackModel.swift in Sources */,
|
||||
|
||||
@ -6,11 +6,12 @@
|
||||
// Copyright (c) 2014 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
@import UIKit;
|
||||
#import "MVMCoreLoadingOverlayHandler.h"
|
||||
#import "MVMCoreSessionObject.h"
|
||||
#import <MVMCore/MVMCoreDispatchUtility.h>
|
||||
#import "MVMCoreLoadingViewControllerProtocol.h"
|
||||
#import "MVMCoreObject.h"
|
||||
#import <MVMCore/MVMCore-Swift.h>
|
||||
@interface MVMCoreLoadingOverlayHandler ()
|
||||
|
||||
// The loading ui elements
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
#import "MVMCoreErrorObject.h"
|
||||
#import "MVMCoreErrorConstants.h"
|
||||
#import "MVMCoreHardcodedStringsConstants.h"
|
||||
#import "MVMCoreObject.h"
|
||||
#import "MVMCoreConstants.h"
|
||||
#import "MVMCoreActionUtility.h"
|
||||
#import <MVMCore/MVMCore-Swift.h>
|
||||
|
||||
@ -22,7 +22,6 @@
|
||||
#import "MVMCoreHardcodedStringsConstants.h"
|
||||
#import "MVMCoreErrorConstants.h"
|
||||
#import "MVMCoreActionUtility.h"
|
||||
#import "MVMCoreObject.h"
|
||||
#import "MVMCoreConstants.h"
|
||||
#import <MVMCore/MVMCore-Swift.h>
|
||||
|
||||
|
||||
@ -34,7 +34,6 @@ FOUNDATION_EXPORT const unsigned char MVMCoreVersionString[];
|
||||
#import <MVMCore/MVMCoreGetterUtility.h>
|
||||
#import <MVMCore/MVMCoreErrorObject.h>
|
||||
#import <MVMCore/MVMCoreOperation.h>
|
||||
#import <MVMCore/MVMCoreObject.h>
|
||||
#import <MVMCore/MVMCoreBlockOperation.h>
|
||||
#import <MVMCore/Reachability.h>
|
||||
|
||||
|
||||
@ -11,12 +11,12 @@
|
||||
#import "MVMCoreErrorObject.h"
|
||||
#import "MVMCoreLoggingHandler.h"
|
||||
#import "MVMCoreGetterUtility.h"
|
||||
#import "MVMCoreObject.h"
|
||||
#import "MVMCoreConstants.h"
|
||||
#import "MVMCoreActionUtility.h"
|
||||
#import "MVMCoreLoggingHandler.h"
|
||||
#import "MVMCoreDispatchUtility.h"
|
||||
#import "MVMCoreErrorConstants.h"
|
||||
#import <MVMCore/MVMCore-Swift.h>
|
||||
|
||||
@interface MVMCoreCache ()
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
//
|
||||
|
||||
#import "MVMCoreLoggingHandler.h"
|
||||
#import "MVMCoreObject.h"
|
||||
#import "MVMCoreActionUtility.h"
|
||||
#import <MVMCore/MVMCore-Swift.h>
|
||||
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
//
|
||||
|
||||
#import "MVMCoreSessionObject.h"
|
||||
#import "MVMCoreObject.h"
|
||||
#import "MVMCoreActionUtility.h"
|
||||
#import <MVMCore/MVMCore-Swift.h>
|
||||
|
||||
|
||||
43
MVMCore/MVMCore/Singletons/HandlerSingleton.swift
Normal file
43
MVMCore/MVMCore/Singletons/HandlerSingleton.swift
Normal file
@ -0,0 +1,43 @@
|
||||
//
|
||||
// HandlerSingleton.swift
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Scott Pfeil on 10/3/23.
|
||||
// Copyright © 2023 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public typealias HandlerSingleton = MVMCoreObject
|
||||
|
||||
@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()
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
@ -15,7 +15,6 @@
|
||||
#import "MVMCoreRequestParameters.h"
|
||||
#import "NSDictionary+MFConvenience.h"
|
||||
#import "MVMCoreJSONConstants.h"
|
||||
#import "MVMCoreObject.h"
|
||||
#import <MVMCore/MVMCore-Swift.h>
|
||||
|
||||
@implementation MVMCoreActionUtility
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
//
|
||||
|
||||
#import "MVMCoreErrorObject.h"
|
||||
#import "MVMCoreObject.h"
|
||||
#import "MVMCoreErrorConstants.h"
|
||||
#import "MVMCoreGetterUtility.h"
|
||||
#import "NSDictionary+MFConvenience.h"
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
#import "MVMCoreViewControllerProgrammaticMappingObject.h"
|
||||
#import "MVMCoreErrorConstants.h"
|
||||
#import "MVMCoreHardcodedStringsConstants.h"
|
||||
#import "MVMCoreObject.h"
|
||||
#import "MVMCoreActionUtility.h"
|
||||
#import <MVMCore/MVMCore-Swift.h>
|
||||
|
||||
@interface MVMCoreViewControllerMappingObject ()
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user