Merge pull request #8 in BPHVB/mvm_core from release/6_0 to develop
* commit '8165ce821c70add8a592c9d6a402a688b83220f7': Session timeout improvement. Navigation error logging
This commit is contained in:
commit
88a98facf5
@ -31,4 +31,8 @@
|
|||||||
[self didChangeValueForKey:@"isVisible"];
|
[self didChangeValueForKey:@"isVisible"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSString *)description {
|
||||||
|
return [NSString stringWithFormat:@"%@|title=%@|message=%@", [super description],self.title,self.message];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -37,5 +37,6 @@ typedef NS_ENUM(NSInteger, ErrorCode) {
|
|||||||
ErrorCodeNoModule,
|
ErrorCodeNoModule,
|
||||||
ErrorCodeInvalidSettingType,
|
ErrorCodeInvalidSettingType,
|
||||||
ErrorCodeServerFailSendFaceIDHash,
|
ErrorCodeServerFailSendFaceIDHash,
|
||||||
ErrorCodeSSL
|
ErrorCodeSSL,
|
||||||
|
ErrorCodeNoViewControllerToPresentOn
|
||||||
};
|
};
|
||||||
|
|||||||
@ -14,6 +14,8 @@
|
|||||||
#import "MVMCoreLoadObject.h"
|
#import "MVMCoreLoadObject.h"
|
||||||
#import "MVMCoreObject.h"
|
#import "MVMCoreObject.h"
|
||||||
#import "MVMCoreRequestParameters.h"
|
#import "MVMCoreRequestParameters.h"
|
||||||
|
#import "MVMCoreErrorConstants.h"
|
||||||
|
#import "MVMCoreLoggingHandler.h"
|
||||||
|
|
||||||
@interface MVMCoreNavigationHandler ()
|
@interface MVMCoreNavigationHandler ()
|
||||||
|
|
||||||
@ -265,8 +267,9 @@
|
|||||||
- (void)presentViewController:(nonnull UIViewController *)viewController animated:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock {
|
- (void)presentViewController:(nonnull UIViewController *)viewController animated:(BOOL)animated delegate:(nullable NSObject<MVMCorePresentationDelegateProtocol>*)delegate completionHandler:(nullable void (^)(void))completionBlock {
|
||||||
|
|
||||||
if (!self.viewControllerToPresentOn) {
|
if (!self.viewControllerToPresentOn) {
|
||||||
NSException *exception = [NSException exceptionWithName:@"NoViewControllerToPresentOnException" reason:@"The viewControllerToPresent on property is nil and an attempt was made to present." userInfo:nil];
|
// Log if we are attempting to add an alert to nothing.
|
||||||
@throw exception;
|
MVMCoreErrorObject *error = [[MVMCoreErrorObject alloc] initWithTitle:nil message:@"The viewControllerToPresent on property is nil and an attempt was made to present." code:ErrorCodeNoViewControllerToPresentOn domain:ErrorDomainNative location:[NSString stringWithFormat:@"ViewController:%@|Delegate:%@",viewController.description,delegate]];
|
||||||
|
[MVMCoreLoggingHandler addErrorToLog:error];
|
||||||
} else {
|
} else {
|
||||||
MVMCorePresentViewControllerOperation *operation = [[MVMCorePresentViewControllerOperation alloc] initWithPresentingViewController:self.viewControllerToPresentOn presentedViewController:viewController animated:animated];
|
MVMCorePresentViewControllerOperation *operation = [[MVMCorePresentViewControllerOperation alloc] initWithPresentingViewController:self.viewControllerToPresentOn presentedViewController:viewController animated:animated];
|
||||||
operation.delegate = delegate;
|
operation.delegate = delegate;
|
||||||
|
|||||||
@ -107,10 +107,13 @@
|
|||||||
self.timeTimerStarted = [NSDate timeIntervalSinceReferenceDate];
|
self.timeTimerStarted = [NSDate timeIntervalSinceReferenceDate];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!fequal(0, self.secondsUntilWarning)) {
|
// Only start physical timer if active, otherwise will begin once entering foreground.
|
||||||
self.sessionTimer = [NSTimer scheduledTimerWithTimeInterval:self.secondsUntilWarning target:self selector:@selector(sessionTimeoutWarning) userInfo:nil repeats:NO];
|
if ([UIApplication sharedApplication].applicationState == UIApplicationStateActive) {
|
||||||
} else if (!fequal(0, self.secondsUntilTimeout)) {
|
if (!fequal(0, self.secondsUntilWarning)) {
|
||||||
self.sessionTimer = [NSTimer scheduledTimerWithTimeInterval:self.secondsUntilTimeout target:self selector:@selector(sessionTimeout:) userInfo:nil repeats:NO];
|
self.sessionTimer = [NSTimer scheduledTimerWithTimeInterval:self.secondsUntilWarning target:self selector:@selector(sessionTimeoutWarning) userInfo:nil repeats:NO];
|
||||||
|
} else if (!fequal(0, self.secondsUntilTimeout)) {
|
||||||
|
self.sessionTimer = [NSTimer scheduledTimerWithTimeInterval:self.secondsUntilTimeout target:self selector:@selector(sessionTimeout:) userInfo:nil repeats:NO];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user