Merge branch 'feature/swift_controllers' into 'develop'
Feature/swift controllers See merge request BPHV_MIPS/mvm_core!73
This commit is contained in:
commit
072db2920f
@ -300,15 +300,7 @@ NSString * const KeyActionTypeOpen = @"openPage";
|
||||
}
|
||||
|
||||
- (void)settingsAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject {
|
||||
// Opens the settings.
|
||||
NSString *type = [actionInformation string:KeyPageType];
|
||||
if ([@"location" isEqualToString:type] || [@"push" isEqualToString:type]) {
|
||||
[MVMCoreActionUtility linkAway:UIApplicationOpenSettingsURLString appURLString:nil];
|
||||
} else {
|
||||
// No known settings type
|
||||
MVMCoreErrorObject *error = [[MVMCoreErrorObject alloc] initWithTitle:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorTitle] message:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorUnableToProcess] code:ErrorCodeInvalidSettingType domain:ErrorDomainNative location:[NSString stringWithFormat:@"%@_%@",NSStringFromClass([delegateObject.actionDelegate class]),KeyActionTypeSettings]];
|
||||
[self handleActionError:error actionInformation:actionInformation additionalData:additionalData delegateObject:delegateObject];
|
||||
}
|
||||
[MVMCoreActionUtility linkAway:UIApplicationOpenSettingsURLString appURLString:nil];
|
||||
}
|
||||
|
||||
- (void)collapseNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject {
|
||||
|
||||
@ -17,10 +17,10 @@
|
||||
@property (nullable, weak, nonatomic) UIViewController <MVMCoreViewManagerProtocol>*manager;
|
||||
|
||||
// Notifies the view controller that it can be ready (usually means that it's committed to the screen).
|
||||
- (void)viewControllerReadyInManager:(nonnull NSObject <MVMCoreViewManagerProtocol>*)manager;
|
||||
- (void)viewControllerReadyInManager:(nonnull UIViewController <MVMCoreViewManagerProtocol>*)manager;
|
||||
|
||||
// Notifies the current showing view controller that the manager is disappearing.
|
||||
- (void)managerWillDisappear:(nonnull NSObject <MVMCoreViewManagerProtocol>*)manager;
|
||||
- (void)managerWillDisappear:(nonnull UIViewController <MVMCoreViewManagerProtocol>*)manager;
|
||||
|
||||
// Manager can check if the view controller does not want to be cached. You should be following proper caching techniques (caching, updating when needed, deleting when needed), so this should be a last resort.
|
||||
- (BOOL)shouldCacheInManager;
|
||||
|
||||
@ -10,7 +10,7 @@ import Foundation
|
||||
|
||||
@objcMembers public class ActionBackModel: ActionModelProtocol {
|
||||
public static var identifier: String = "back"
|
||||
public var actionType: String?
|
||||
public var actionType: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
// Temporary fix till server changes
|
||||
|
||||
@ -10,7 +10,7 @@ import Foundation
|
||||
|
||||
@objcMembers public class ActionCallModel: ActionModelProtocol {
|
||||
public static var identifier: String = "call"
|
||||
public var actionType: String?
|
||||
public var actionType: String = ActionCallModel.identifier
|
||||
// TODO: decode into phone number once action handler is re-written
|
||||
public var callNumber: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
|
||||
@ -10,7 +10,7 @@ import UIKit
|
||||
|
||||
@objcMembers public class ActionCancelModel: ActionModelProtocol {
|
||||
public static var identifier: String = "cancel"
|
||||
public var actionType: String?
|
||||
public var actionType: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public var title: String?
|
||||
|
||||
@ -10,7 +10,7 @@ import Foundation
|
||||
|
||||
public protocol ActionModelProtocol: ModelProtocol {
|
||||
|
||||
var actionType: String? { get }
|
||||
var actionType: String { get }
|
||||
var extraParameters: JSONValueDictionary? { get set }
|
||||
var analyticsData: JSONValueDictionary? { get set }
|
||||
|
||||
@ -20,7 +20,7 @@ public protocol ActionModelProtocol: ModelProtocol {
|
||||
|
||||
public extension ActionModelProtocol {
|
||||
|
||||
var actionType: String? {
|
||||
var actionType: String {
|
||||
get { return Self.identifier }
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ import Foundation
|
||||
|
||||
@objcMembers public class ActionOpenAppModel: ActionModelProtocol {
|
||||
public static var identifier: String = "openApp"
|
||||
public var actionType: String?
|
||||
public var actionType: String = ActionOpenAppModel.identifier
|
||||
// TODO: decode into url once action handler is re-written
|
||||
public var appURL: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
|
||||
@ -10,7 +10,7 @@ import Foundation
|
||||
|
||||
@objcMembers public class ActionOpenPageModel: ActionModelProtocol {
|
||||
public static var identifier: String = "openPage"
|
||||
public var actionType: String?
|
||||
public var actionType: String = ActionOpenPageModel.identifier
|
||||
public var pageType: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
|
||||
@ -10,7 +10,7 @@ import Foundation
|
||||
|
||||
@objcMembers public class ActionOpenUrlModel: ActionModelProtocol {
|
||||
public static var identifier: String = "openURL"
|
||||
public var actionType: String?
|
||||
public var actionType: String = ActionOpenUrlModel.identifier
|
||||
// TODO: decode into url once action handler is re-written
|
||||
public var browserUrl: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
|
||||
@ -10,7 +10,7 @@ import Foundation
|
||||
|
||||
@objcMembers public class ActionPopupModel: ActionModelProtocol {
|
||||
public static var identifier: String = "popup"
|
||||
public var actionType: String?
|
||||
public var actionType: String = ActionPopupModel.identifier
|
||||
public var title: String?
|
||||
public var pageType: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
|
||||
@ -10,7 +10,7 @@ import UIKit
|
||||
|
||||
@objcMembers public class ActionPreviousSubmitModel: ActionModelProtocol {
|
||||
public static var identifier: String = "previousSubmit"
|
||||
public var actionType: String?
|
||||
public var actionType: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public var title: String?
|
||||
|
||||
@ -10,7 +10,7 @@ import UIKit
|
||||
|
||||
@objcMembers public class ActionRestartModel: ActionModelProtocol {
|
||||
public static var identifier: String = "restart"
|
||||
public var actionType: String?
|
||||
public var actionType: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public var title: String?
|
||||
|
||||
@ -10,7 +10,7 @@ import UIKit
|
||||
|
||||
@objcMembers public class ActionSettingModel: ActionModelProtocol {
|
||||
public static var identifier: String = "openSettings"
|
||||
public var actionType: String?
|
||||
public var actionType: String
|
||||
public var extraParameters: JSONValueDictionary?
|
||||
public var analyticsData: JSONValueDictionary?
|
||||
public var title: String?
|
||||
|
||||
@ -15,7 +15,7 @@ import UIKit
|
||||
|
||||
public static var identifier: String = "share"
|
||||
|
||||
public var actionType: String?
|
||||
public var actionType: String = ActionShareModel.identifier
|
||||
public var title: String?
|
||||
public var sharedType: String
|
||||
public var sharedText: String
|
||||
|
||||
@ -72,7 +72,7 @@ public enum JSONValue: Codable, Equatable {
|
||||
|
||||
public func ==(lhs: JSONValue, rhs: JSONValue) -> Bool {
|
||||
let ld = try? lhs.encode()
|
||||
let rd = try? lhs.encode()
|
||||
let rd = try? rhs.encode()
|
||||
return ld == rd
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user