AddedOpenWifiSettingsHandler
This commit is contained in:
parent
fba2e80b8a
commit
41426339e6
@ -62,6 +62,8 @@
|
||||
8876D5F31FB50AB000EB2E3D /* UIFont+MFSpacing.m in Sources */ = {isa = PBXBuildFile; fileRef = 8876D5E51FB50AB000EB2E3D /* UIFont+MFSpacing.m */; };
|
||||
8876D5F41FB50AB000EB2E3D /* UILabel+MFCustom.h in Headers */ = {isa = PBXBuildFile; fileRef = 8876D5E61FB50AB000EB2E3D /* UILabel+MFCustom.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
8876D5F51FB50AB000EB2E3D /* UILabel+MFCustom.m in Sources */ = {isa = PBXBuildFile; fileRef = 8876D5E71FB50AB000EB2E3D /* UILabel+MFCustom.m */; };
|
||||
8BD2426D2C4FB35B00DE8927 /* ActionOpenWifiSettingsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BD2426B2C4FB35A00DE8927 /* ActionOpenWifiSettingsModel.swift */; };
|
||||
8BD2426E2C4FB35B00DE8927 /* ActionOpenWifiSettingsHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8BD2426C2C4FB35B00DE8927 /* ActionOpenWifiSettingsHandler.swift */; };
|
||||
946EE1A3237B59C30036751F /* ModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 946EE1A2237B59C30036751F /* ModelProtocol.swift */; };
|
||||
946EE1A7237B5B1C0036751F /* ModelRegistry.swift in Sources */ = {isa = PBXBuildFile; fileRef = 946EE1A6237B5B1C0036751F /* ModelRegistry.swift */; };
|
||||
946EE1AB237B5C940036751F /* Decoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 946EE1AA237B5C940036751F /* Decoder.swift */; };
|
||||
@ -217,6 +219,8 @@
|
||||
8876D5E51FB50AB000EB2E3D /* UIFont+MFSpacing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIFont+MFSpacing.m"; sourceTree = "<group>"; };
|
||||
8876D5E61FB50AB000EB2E3D /* UILabel+MFCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UILabel+MFCustom.h"; sourceTree = "<group>"; };
|
||||
8876D5E71FB50AB000EB2E3D /* UILabel+MFCustom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UILabel+MFCustom.m"; sourceTree = "<group>"; };
|
||||
8BD2426B2C4FB35A00DE8927 /* ActionOpenWifiSettingsModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActionOpenWifiSettingsModel.swift; sourceTree = "<group>"; };
|
||||
8BD2426C2C4FB35B00DE8927 /* ActionOpenWifiSettingsHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActionOpenWifiSettingsHandler.swift; sourceTree = "<group>"; };
|
||||
946EE1A2237B59C30036751F /* ModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelProtocol.swift; sourceTree = "<group>"; };
|
||||
946EE1A6237B5B1C0036751F /* ModelRegistry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelRegistry.swift; sourceTree = "<group>"; };
|
||||
946EE1AA237B5C940036751F /* Decoder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Decoder.swift; sourceTree = "<group>"; };
|
||||
@ -632,6 +636,8 @@
|
||||
AF69D4F2286E9DCE00BC6862 /* ActionActionsHandler.swift */,
|
||||
94C014D824212360005811A9 /* ActionSettingModel.swift */,
|
||||
AF69D4F4286E9F5900BC6862 /* ActionSettingHandler.swift */,
|
||||
8BD2426C2C4FB35B00DE8927 /* ActionOpenWifiSettingsHandler.swift */,
|
||||
8BD2426B2C4FB35A00DE8927 /* ActionOpenWifiSettingsModel.swift */,
|
||||
94C014D2242119E6005811A9 /* ActionPreviousSubmitModel.swift */,
|
||||
AF69D4F6286EA0B800BC6862 /* ActionPreviousSubmitHandler.swift */,
|
||||
0ACC81A12613C73800A9C886 /* ActionContactModel.swift */,
|
||||
@ -881,6 +887,7 @@
|
||||
5878F0B22BDAA63E00ADE23D /* ReadableDecodingErrors.swift in Sources */,
|
||||
2723337D28BD53C2004EAEE0 /* Date+Extension.swift in Sources */,
|
||||
AF70699A287DD02400077CF6 /* ActionContactHandler.swift in Sources */,
|
||||
8BD2426E2C4FB35B00DE8927 /* ActionOpenWifiSettingsHandler.swift in Sources */,
|
||||
AF69D4F3286E9DCE00BC6862 /* ActionActionsHandler.swift in Sources */,
|
||||
946EE1BC237B691A0036751F /* ActionOpenPageModel.swift in Sources */,
|
||||
0A42538F23F3414800554656 /* Codable+Helpers.swift in Sources */,
|
||||
@ -893,6 +900,7 @@
|
||||
6079EDCE2AD97AA5004B7A85 /* MVMCoreLoggingDelegateProtocol.swift in Sources */,
|
||||
AF60A7F2289212CA00919EEB /* MVMError.swift in Sources */,
|
||||
8876D5E91FB50AB000EB2E3D /* NSArray+MFConvenience.m in Sources */,
|
||||
8BD2426D2C4FB35B00DE8927 /* ActionOpenWifiSettingsModel.swift in Sources */,
|
||||
D27073B725BB45C4001C7246 /* ActionActionsModel.swift in Sources */,
|
||||
946EE1B2237B5F260036751F /* JSONValue.swift in Sources */,
|
||||
0ACC81A22613C73800A9C886 /* ActionContactModel.swift in Sources */,
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
//
|
||||
// ActionOpenWifiSettingsHandler.swift
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Naresh Cherukuri on 03/06/24.
|
||||
// Copyright © 2024 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
open class ActionOpenWifiSettingsHandler: MVMCoreActionHandlerProtocol {
|
||||
required public init() {}
|
||||
|
||||
open func execute(with model: ActionModelProtocol, delegateObject: DelegateObject?, additionalData: [AnyHashable : Any]?) async throws {
|
||||
try await ActionOpenUrlHandler.openURL(with: await "App-Prefs:root=WIFI")
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
//
|
||||
// ActionOpenWifiSettings.swift
|
||||
// MVMCore
|
||||
//
|
||||
// Created by Naresh Cherukuri on 03/06/24.
|
||||
// Copyright © 2024 myverizon. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
public struct ActionOpenWifiSettingsModel: ActionModelProtocol {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
public static var identifier: String = "openWifiSettings"
|
||||
public var actionType: String = ActionOpenWifiSettingsModel.identifier
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Initializer
|
||||
//--------------------------------------------------
|
||||
|
||||
public init(_ extraParameters: JSONValueDictionary? = nil, _ analyticsData: JSONValueDictionary? = nil) {
|
||||
self.extraParameters = extraParameters
|
||||
self.analyticsData = analyticsData
|
||||
}
|
||||
|
||||
public func isEqual(to model: any ModelComparisonProtocol) -> Bool {
|
||||
guard let model = model as? Self else { return false }
|
||||
return extraParameters == model.extraParameters
|
||||
&& analyticsData == model.analyticsData
|
||||
}
|
||||
}
|
||||
@ -49,6 +49,7 @@ extern NSString * const KeyActionTypePreviousSubmit;
|
||||
extern NSString * const KeyActionTypeCancel;
|
||||
extern NSString * const KeyActionTypeRedirect;
|
||||
extern NSString * const KeyActionTypeSettings;
|
||||
extern NSString * const KeyActionTypeWifiSettings;
|
||||
extern NSString * const KeyActionTypeNoop;
|
||||
extern NSString * const KeyActionTypeActions;
|
||||
extern NSString * const KeyActionInformation;
|
||||
|
||||
@ -49,6 +49,7 @@ NSString * const KeyActionTypePreviousSubmit = @"previousSubmit";
|
||||
NSString * const KeyActionTypeCancel = @"cancel";
|
||||
NSString * const KeyActionTypeRedirect = @"switchApp";
|
||||
NSString * const KeyActionTypeSettings = @"openSettings";
|
||||
NSString * const KeyActionTypeWifiSettings = @"openWifiSettings";
|
||||
NSString * const KeyActionTypeNoop = @"noop";
|
||||
NSString * const KeyActionTypeActions = @"actions";
|
||||
NSString * const KeyActionInformation = @"actionInformation";
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
ModelRegistry.register(handler: ActionPreviousSubmitHandler.self, for: ActionPreviousSubmitModel.self)
|
||||
ModelRegistry.register(handler: ActionCancelHandler.self, for: ActionCancelModel.self)
|
||||
ModelRegistry.register(handler: ActionSettingHandler.self, for: ActionSettingModel.self)
|
||||
ModelRegistry.register(handler: ActionOpenWifiSettingsHandler.self, for: ActionOpenWifiSettingsModel.self)
|
||||
ModelRegistry.register(handler: ActionNoopHandler.self, for: ActionNoopModel.self)
|
||||
ModelRegistry.register(handler: ActionActionsHandler.self, for: ActionActionsModel.self)
|
||||
ModelRegistry.register(handler: ActionOpenSMSHandler.self, for: ActionOpenSMSModel.self)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user