moved files
This commit is contained in:
parent
60c1e0c467
commit
e92466c7cf
@ -56,9 +56,6 @@ extern NSString * _Nonnull const KeyActionTypeOpen;
|
|||||||
// Shows popup alert from the alert object in the action map. The actionType of the action is 'alert'
|
// Shows popup alert from the alert object in the action map. The actionType of the action is 'alert'
|
||||||
- (void)showAlert:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
- (void)showAlert:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||||
|
|
||||||
// Shows a top alert
|
|
||||||
- (void)topAlertAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
|
||||||
|
|
||||||
// Redirects to another experience
|
// Redirects to another experience
|
||||||
- (void)redirectAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
- (void)redirectAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||||
|
|
||||||
@ -68,9 +65,6 @@ extern NSString * _Nonnull const KeyActionTypeOpen;
|
|||||||
// Goes to settings app
|
// Goes to settings app
|
||||||
- (void)settingsAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
- (void)settingsAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||||
|
|
||||||
// Collapses the current top notification
|
|
||||||
- (void)collapseNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
|
||||||
|
|
||||||
// Subclass this to handle other custom actions. Return YES if handled, and NO if not.
|
// Subclass this to handle other custom actions. Return YES if handled, and NO if not.
|
||||||
- (BOOL)handleOtherActions:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
- (BOOL)handleOtherActions:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject;
|
||||||
|
|
||||||
|
|||||||
@ -290,13 +290,6 @@ NSString * const KeyActionTypeOpen = @"openPage";
|
|||||||
[MVMCoreActionUtility linkAway:UIApplicationOpenSettingsURLString appURLString:nil];
|
[MVMCoreActionUtility linkAway:UIApplicationOpenSettingsURLString appURLString:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)collapseNotificationAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject {
|
|
||||||
// Collapse the current notification.
|
|
||||||
if ([[MVMCoreObject sharedInstance].globalTopAlertDelegate respondsToSelector:@selector(getTopAlertView)]) {
|
|
||||||
[[[MVMCoreObject sharedInstance].globalTopAlertDelegate getTopAlertView] collapseNotification];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)showAlert:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject {
|
- (void)showAlert:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegateObject:(nullable DelegateObject *)delegateObject {
|
||||||
|
|
||||||
MVMCoreErrorObject *error = nil;
|
MVMCoreErrorObject *error = nil;
|
||||||
@ -469,16 +462,12 @@ NSString * const KeyActionTypeOpen = @"openPage";
|
|||||||
[self previousSubmitAction:actionInformation additionalData:additionalData delegate:delegate];
|
[self previousSubmitAction:actionInformation additionalData:additionalData delegate:delegate];
|
||||||
} else if ([actionType isEqualToString:KeyActionTypePopup]) {
|
} else if ([actionType isEqualToString:KeyActionTypePopup]) {
|
||||||
[self popupAction:actionInformation additionalData:additionalData delegate:delegate];
|
[self popupAction:actionInformation additionalData:additionalData delegate:delegate];
|
||||||
} else if ([actionType isEqualToString:KeyActionTypeTopAlert]) {
|
|
||||||
[self topAlertAction:actionInformation additionalData:additionalData delegate:delegate];
|
|
||||||
} else if ([actionType isEqualToString:KeyActionTypeRedirect]) {
|
} else if ([actionType isEqualToString:KeyActionTypeRedirect]) {
|
||||||
[self redirectAction:actionInformation additionalData:additionalData delegate:delegate];
|
[self redirectAction:actionInformation additionalData:additionalData delegate:delegate];
|
||||||
} else if ([actionType isEqualToString:KeyActionTypeCancel]) {
|
} else if ([actionType isEqualToString:KeyActionTypeCancel]) {
|
||||||
[self cancelAction:actionInformation additionalData:additionalData delegate:delegate];
|
[self cancelAction:actionInformation additionalData:additionalData delegate:delegate];
|
||||||
} else if ([actionType isEqualToString:KeyActionTypeSettings]) {
|
} else if ([actionType isEqualToString:KeyActionTypeSettings]) {
|
||||||
[self settingsAction:actionInformation additionalData:additionalData delegate:delegate];
|
[self settingsAction:actionInformation additionalData:additionalData delegate:delegate];
|
||||||
} else if ([actionType isEqualToString:KeyActionTypeCollapseNotification]) {
|
|
||||||
[self collapseNotificationAction:actionInformation additionalData:additionalData delegate:delegate];
|
|
||||||
} else if (![self handleOtherActions:actionType actionInformation:actionInformation additionalData:additionalData delegate:delegate]) {
|
} else if (![self handleOtherActions:actionType actionInformation:actionInformation additionalData:additionalData delegate:delegate]) {
|
||||||
// not a known action type.
|
// not a known action type.
|
||||||
[self unknownAction:actionType actionInformation:actionInformation additionalData:additionalData delegate:delegate];
|
[self unknownAction:actionType actionInformation:actionInformation additionalData:additionalData delegate:delegate];
|
||||||
@ -591,22 +580,6 @@ NSString * const KeyActionTypeOpen = @"openPage";
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)topAlertAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate {
|
|
||||||
// Perform a top alert.
|
|
||||||
NSString *pageTypeForTopAlert = [actionInformation stringForKey:KeyPageType];
|
|
||||||
[[MVMCoreCache sharedCache] fetchJSONForPageType:pageTypeForTopAlert queue:nil waitUntilFinished:YES completionHandler:^(NSDictionary * _Nullable jsonDictionary) {
|
|
||||||
|
|
||||||
NSDictionary *responseInfo = [jsonDictionary dict:KeyResponseInfo];
|
|
||||||
if (responseInfo) {
|
|
||||||
MVMCoreAlertObject *alertObject = [MVMCoreAlertObject alertObjectForPageType:pageTypeForTopAlert responseInfo:responseInfo additionalData:additionalData actionDelegate:delegate];
|
|
||||||
if ([delegate respondsToSelector:@selector(willShowTopAlertWithAlertObject:alertJson:)]) {
|
|
||||||
alertObject = [delegate willShowTopAlertWithAlertObject:alertObject alertJson:jsonDictionary];
|
|
||||||
}
|
|
||||||
[alertObject showAlert];
|
|
||||||
}
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)redirectAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate {
|
- (void)redirectAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData delegate:(nullable NSObject <MVMCoreLoadDelegateProtocol, MVMCorePresentationDelegateProtocol,MVMCoreActionDelegateProtocol>*)delegate {
|
||||||
// Have delegate redirect.
|
// Have delegate redirect.
|
||||||
[[MVMCoreSessionObject sharedGlobal] redirectWithInfo:actionInformation];
|
[[MVMCoreSessionObject sharedGlobal] redirectWithInfo:actionInformation];
|
||||||
|
|||||||
@ -38,9 +38,7 @@ extern NSString * const KeyActionTypePreviousSubmit;
|
|||||||
extern NSString * const KeyActionTypePopup;
|
extern NSString * const KeyActionTypePopup;
|
||||||
extern NSString * const KeyActionTypeCancel;
|
extern NSString * const KeyActionTypeCancel;
|
||||||
extern NSString * const KeyActionTypeRedirect;
|
extern NSString * const KeyActionTypeRedirect;
|
||||||
extern NSString * const KeyActionTypeTopAlert;
|
|
||||||
extern NSString * const KeyActionTypeSettings;
|
extern NSString * const KeyActionTypeSettings;
|
||||||
extern NSString * const KeyActionTypeCollapseNotification;
|
|
||||||
extern NSString * const KeyActionTypeAlert;
|
extern NSString * const KeyActionTypeAlert;
|
||||||
extern NSString * const KeyActionTypeNoop;
|
extern NSString * const KeyActionTypeNoop;
|
||||||
extern NSString * const KeyActionInformation;
|
extern NSString * const KeyActionInformation;
|
||||||
|
|||||||
@ -38,9 +38,7 @@ NSString * const KeyActionTypePreviousSubmit = @"previousSubmit";
|
|||||||
NSString * const KeyActionTypePopup = @"popup";
|
NSString * const KeyActionTypePopup = @"popup";
|
||||||
NSString * const KeyActionTypeCancel = @"cancel";
|
NSString * const KeyActionTypeCancel = @"cancel";
|
||||||
NSString * const KeyActionTypeRedirect = @"switchApp";
|
NSString * const KeyActionTypeRedirect = @"switchApp";
|
||||||
NSString * const KeyActionTypeTopAlert = @"topAlert";
|
|
||||||
NSString * const KeyActionTypeSettings = @"openSettings";
|
NSString * const KeyActionTypeSettings = @"openSettings";
|
||||||
NSString * const KeyActionTypeCollapseNotification = @"collapseNotification";
|
|
||||||
NSString * const KeyActionTypeAlert = @"alert";
|
NSString * const KeyActionTypeAlert = @"alert";
|
||||||
NSString * const KeyActionTypeNoop = @"noop";
|
NSString * const KeyActionTypeNoop = @"noop";
|
||||||
NSString * const KeyActionInformation = @"actionInformation";
|
NSString * const KeyActionInformation = @"actionInformation";
|
||||||
|
|||||||
@ -56,13 +56,8 @@ FOUNDATION_EXPORT const unsigned char MVMCoreVersionString[];
|
|||||||
// Alert Handling
|
// Alert Handling
|
||||||
#import <MVMCore/MVMCoreAlertController.h>
|
#import <MVMCore/MVMCoreAlertController.h>
|
||||||
#import <MVMCore/MVMCoreAlertObject.h>
|
#import <MVMCore/MVMCoreAlertObject.h>
|
||||||
#import <MVMCore/MVMCoreTopAlertObject.h>
|
|
||||||
#import <MVMCore/MVMCoreAlertoperation.h>
|
#import <MVMCore/MVMCoreAlertoperation.h>
|
||||||
#import <MVMCore/MVMCoreAlertHandler.h>
|
#import <MVMCore/MVMCoreAlertHandler.h>
|
||||||
#import <MVMCore/MVMCoreTopAlertAnimationDelegateProtocol.h>
|
|
||||||
#import <MVMCore/MVMCoreTopAlertDelegateProtocol.h>
|
|
||||||
#import <MVMCore/MVMCoreGlobalTopAlertDelegateProtocol.h>
|
|
||||||
#import <MVMCore/MVMCoreTopAlertViewProtocol.h>
|
|
||||||
#import <MVMCore/MVMCoreAlertDelegateProtocol.h>
|
#import <MVMCore/MVMCoreAlertDelegateProtocol.h>
|
||||||
|
|
||||||
// Presentation Handling
|
// Presentation Handling
|
||||||
|
|||||||
@ -13,7 +13,6 @@ import UIKit
|
|||||||
public weak var actionDelegate: (MVMCoreActionDelegateProtocol & NSObjectProtocol)?
|
public weak var actionDelegate: (MVMCoreActionDelegateProtocol & NSObjectProtocol)?
|
||||||
public weak var loadDelegate: (MVMCoreLoadDelegateProtocol & NSObjectProtocol)?
|
public weak var loadDelegate: (MVMCoreLoadDelegateProtocol & NSObjectProtocol)?
|
||||||
public weak var alertDelegate: (MVMCoreAlertDelegateProtocol & NSObjectProtocol)?
|
public weak var alertDelegate: (MVMCoreAlertDelegateProtocol & NSObjectProtocol)?
|
||||||
public weak var topAlertDelegate: (MVMCoreTopAlertDelegateProtocol & NSObjectProtocol)?
|
|
||||||
public weak var presentationDelegate: (MVMCorePresentationDelegateProtocol & NSObjectProtocol)?
|
public weak var presentationDelegate: (MVMCorePresentationDelegateProtocol & NSObjectProtocol)?
|
||||||
|
|
||||||
required override public init() {
|
required override public init() {
|
||||||
@ -24,7 +23,6 @@ import UIKit
|
|||||||
actionDelegate = delegate as? (MVMCoreActionDelegateProtocol & NSObjectProtocol)
|
actionDelegate = delegate as? (MVMCoreActionDelegateProtocol & NSObjectProtocol)
|
||||||
loadDelegate = delegate as? (MVMCoreLoadDelegateProtocol & NSObjectProtocol)
|
loadDelegate = delegate as? (MVMCoreLoadDelegateProtocol & NSObjectProtocol)
|
||||||
alertDelegate = delegate as? (MVMCoreAlertDelegateProtocol & NSObjectProtocol)
|
alertDelegate = delegate as? (MVMCoreAlertDelegateProtocol & NSObjectProtocol)
|
||||||
topAlertDelegate = delegate as? (MVMCoreTopAlertDelegateProtocol & NSObjectProtocol)
|
|
||||||
presentationDelegate = delegate as? (MVMCorePresentationDelegateProtocol & NSObjectProtocol)
|
presentationDelegate = delegate as? (MVMCorePresentationDelegateProtocol & NSObjectProtocol)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,7 +15,6 @@
|
|||||||
#import <MVMCore/MVMCoreGlobalLoadProtocol.h>
|
#import <MVMCore/MVMCoreGlobalLoadProtocol.h>
|
||||||
#import <MVMCore/MVMCoreLoadingOverlayDelegateProtocol.h>
|
#import <MVMCore/MVMCoreLoadingOverlayDelegateProtocol.h>
|
||||||
#import <MVMCore/MVMCoreLoggingDelegateProtocol.h>
|
#import <MVMCore/MVMCoreLoggingDelegateProtocol.h>
|
||||||
#import <MVMCore/MVMCoreGlobalTopAlertDelegateProtocol.h>
|
|
||||||
#import <MVMCore/MVMCoreLoggingHandler.h>
|
#import <MVMCore/MVMCoreLoggingHandler.h>
|
||||||
#import <MVMCore/MVMCoreLoadHandler.h>
|
#import <MVMCore/MVMCoreLoadHandler.h>
|
||||||
|
|
||||||
@ -32,7 +31,6 @@
|
|||||||
@property (nullable, strong, nonatomic) id <MVMCoreGlobalLoadProtocol> globalLoadDelegate;
|
@property (nullable, strong, nonatomic) id <MVMCoreGlobalLoadProtocol> globalLoadDelegate;
|
||||||
@property (nullable, strong, nonatomic) id <MVMCoreLoadingOverlayDelegateProtocol> loadingProtocol;
|
@property (nullable, strong, nonatomic) id <MVMCoreLoadingOverlayDelegateProtocol> loadingProtocol;
|
||||||
@property (nullable, strong, nonatomic) NSObject <MVMCoreLoggingDelegateProtocol> *loggingDelegate;
|
@property (nullable, strong, nonatomic) NSObject <MVMCoreLoggingDelegateProtocol> *loggingDelegate;
|
||||||
@property (nullable, strong, nonatomic) id <MVMCoreGlobalTopAlertDelegateProtocol> globalTopAlertDelegate;
|
|
||||||
|
|
||||||
// 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.
|
// 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;
|
@property (nullable, weak, nonatomic) id applicationDelegate;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user