From ea8963be0b383d3dcd1173813903c256ff75bbfe Mon Sep 17 00:00:00 2001 From: teegsh2 Date: Fri, 24 May 2024 16:08:45 +0530 Subject: [PATCH] Enabled hard coded response --- .../HardCodedServerResponse/MFHardCodedServerResponse.m | 4 +++- MVMCore/MVMCore/mvmcore_dev.xcconfig | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/MVMCore/MVMCore/Utility/HardCodedServerResponse/MFHardCodedServerResponse.m b/MVMCore/MVMCore/Utility/HardCodedServerResponse/MFHardCodedServerResponse.m index 44b7b4d..7228c37 100644 --- a/MVMCore/MVMCore/Utility/HardCodedServerResponse/MFHardCodedServerResponse.m +++ b/MVMCore/MVMCore/Utility/HardCodedServerResponse/MFHardCodedServerResponse.m @@ -60,7 +60,9 @@ - (NSDictionary *) getHardCodedResponseForPageType:(NSString *)pageType { NSError *error; - NSString *filePath = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"JSON/%@", pageType] ofType:@"json"]; + // NSString *filePath = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"JSON/%@", pageType] ofType:@"json"]; + NSString *filePath = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"%@", pageType] ofType:@"json"]; + if (filePath) { return [NSJSONSerialization JSONObjectWithData:[NSData dataWithContentsOfFile:filePath] options:NSJSONReadingMutableContainers error:&error]; } diff --git a/MVMCore/MVMCore/mvmcore_dev.xcconfig b/MVMCore/MVMCore/mvmcore_dev.xcconfig index 470d90c..7149c3c 100644 --- a/MVMCore/MVMCore/mvmcore_dev.xcconfig +++ b/MVMCore/MVMCore/mvmcore_dev.xcconfig @@ -20,4 +20,4 @@ GCC_PREPROCESSOR_DEFINITIONS = $(inherited) LOGGING=1 #include? "../../../workspaceSettings.xcconfig" // For enabling hardcoded JSON payloads. -//GCC_PREPROCESSOR_DEFINITIONS = $(inherited) ENABLE_HARD_CODED_RESPONSE=1 +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) ENABLE_HARD_CODED_RESPONSE=1