Adding debug logs as it is not reproducing in local
This commit is contained in:
parent
4bf30550ef
commit
81510315e4
@ -49,19 +49,29 @@ public extension MVMCoreLoadRequestOperation {
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): A new controller should be made. pageType:\(String(describing: loadObject.pageType))")
|
||||
return nil
|
||||
}
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): we made it out of first guard:\(String(describing: loadObject.pageType))")
|
||||
|
||||
let template = loadObject.pageJSON?.optionalStringForKey("template")
|
||||
guard let controllerMappingObject = MVMCoreViewControllerMappingObject.shared()?.getViewControllerMapping(forTemplate: template, pageType: pageType) else {
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): Failed to create a new controller. template:\(String(describing: template)) page:\(pageType)")
|
||||
return nil
|
||||
}
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): we made it out of second guard:\(String(describing: template))")
|
||||
|
||||
var controllerType: AnyClass?
|
||||
if let programmaticMapping = controllerMappingObject as? MVMCoreViewControllerProgrammaticMappingObject {
|
||||
controllerType = programmaticMapping.viewControllerClass
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): we are in first if let:\(String(describing: programmaticMapping))")
|
||||
|
||||
} else if let newVC = MVMCoreViewControllerMappingObject.shared()?.createMFViewController(ofTemplate: loadObject.pageJSON?.optionalStringForKey("template"), pageType: pageType) {
|
||||
// Need to create the view controller to fetch the type.
|
||||
controllerType = type(of: newVC)
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): we are in second if let:\(String(describing: newVC))")
|
||||
|
||||
} else {
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): Failed to create a new controller. template:\(String(describing: template)) page:\(pageType)")
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): we are in else:\(String(describing: "newVC"))")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@ -69,6 +79,8 @@ public extension MVMCoreLoadRequestOperation {
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): No matching controller found in the hierarchy. Will need to create a new controller. pageType:\(pageType) controllerType:\(String(describing: controllerType)).")
|
||||
return nil
|
||||
}
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): we are controller guard :\(String(describing: viewController))")
|
||||
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "\(type(of: self)): Navigated to controller. pageType:\(pageType) controllerType:\(String(describing: controllerType))")
|
||||
stopLoadingAnimationIfNeeded()
|
||||
return viewController
|
||||
|
||||
Loading…
Reference in New Issue
Block a user