Mocking resp for Demo

This commit is contained in:
Keerthy 2024-10-03 18:00:43 +05:30
parent a570f3c0e6
commit f1ca0fc166
2 changed files with 3 additions and 2 deletions

View File

@ -60,7 +60,8 @@
- (NSDictionary *) getHardCodedResponseForPageType:(NSString *)pageType {
NSError *error;
NSString *filePath = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"JSON/%@", pageType] ofType:@"json"];
// NSString *filePath = [[NSBundle mainBundle] pathForResource: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];
}

View File

@ -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