Add capability to exclude initial parameters.

This commit is contained in:
Hedden, Kyle Matthew 2018-08-06 15:31:59 -04:00
parent 3cec2459b0
commit c938d03cc6
7 changed files with 13 additions and 2 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -959,6 +959,7 @@
"$(PROJECT_DIR)/MVMCore/EmbeddedLibaries/AdobeMobileLibrary",
"$(PROJECT_DIR)/MVMCore/EmbeddedLibraries/VZAnalytics",
);
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.vzw.MVMCore;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;

View File

@ -165,7 +165,7 @@
// Sets up the Initial parameters.
if (requestParameters.addInitialRequestParameters) {
NSDictionary *initialParameters = [[MVMCoreSessionObject sharedGlobal] getInitialParameters];
NSDictionary *initialParameters = [[MVMCoreSessionObject sharedGlobal] getInitialParametersExcludingSections:requestParameters.excludedInitialParameters];
if (initialParameters) {
[parameters setObject:initialParameters forKey:@"InitialParams"];
}

View File

@ -63,6 +63,9 @@ typedef NS_ENUM(NSInteger, MFLoadStyle) {
// A flag for if we should be adding the initial request parameters.
@property (assign, nonatomic) BOOL addInitialRequestParameters;
// A list of initial parameter sections to blacklist / skip.
@property (nullable, strong, nonatomic) NSArray *excludedInitialParameters;
// A flag for if we should always show alerts, even during a background load.
@property (assign) BOOL allowAlertsIfBackgroundRequest;
@ -88,7 +91,7 @@ typedef NS_ENUM(NSInteger, MFLoadStyle) {
@property (nonatomic) BOOL openSupportPanel;
// A list of page types that this operation should NOT be loaded in parallel with.
@property (nonatomic) NSArray<NSString *>* _Nullable successivePageTypes;
@property (nullable, strong, nonatomic) NSArray<NSString *> * successivePageTypes;
// Creates an object with the given page type and extra parameters. Adds the extra parameters to the standard request parameters. Will add any modules needed by the page type by default.
- (nullable instancetype)initWithPageType:(nonnull NSString *)pageType extraParameters:(nullable NSDictionary *)extraParameters;

View File

@ -125,6 +125,7 @@
copyObject.shouldNotGoToServerOnCacheFail = self.shouldNotGoToServerOnCacheFail;
copyObject.neverLoadFromCache = self.neverLoadFromCache;
copyObject.addInitialRequestParameters = self.addInitialRequestParameters;
copyObject.excludedInitialParameters = self.excludedInitialParameters;
copyObject.tabWasPressed = self.tabWasPressed;
copyObject.navigationController = self.navigationController;
copyObject.allowAlertsIfBackgroundRequest = self.allowAlertsIfBackgroundRequest;

View File

@ -28,6 +28,8 @@
// Gets inital parameters for request parameters.
- (nullable NSDictionary *)getInitialParameters;
// Gets inital parameters for request parameters excluding any items given a list of key names.
- (nullable NSDictionary *)getInitialParametersExcludingSections:(nullable NSArray<NSString *> *)excludeSections;
// Restarts the application session state. Can clear variables and pass a page type if needed.
- (void)restartSessionWithPageType:(nullable NSString *)pageType parameters:(nullable NSDictionary *)parameters clearAllVariables:(BOOL)clearAllVariables;

View File

@ -16,6 +16,10 @@
}
- (nullable NSDictionary *)getInitialParameters {
return [self getInitialParametersExcludingSections:nil];
}
- (nullable NSDictionary *)getInitialParametersExcludingSections:(nullable NSArray<NSString *> *)excludeSections {
return nil;
}