Get the path to the application group
#define APP_GROUP_PATH [[[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:@"yourGrpupId"] path]
The following code to view shared container data
NSLog(@"Shared container data:%@",[self listFileAtPath:APP_GROUP_PATH]); -(NSArray *)listFileAtPath:(NSString *)path { int count; NSArray *directoryContent = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:path error:NULL]; for (count = 0; count < (int)[directoryContent count]; count++) { NSLog(@"File %d: %@", (count + 1), [directoryContent objectAtIndex:count]); } return directoryContent; }
source share