Fairly self explanatory.
We can view the app's documents, library, tmp directories via Window > Devices (this has been the case forever).
But when app extensions came on the scene with iOS8, the App Group shared container came with them. How can I view its contents?
Edit: to clarify, I'm not asking how to interact with this directory in code. I'm asking about how to interact with this directory in the context of Finder.
Get App Group Path
#define APP_GROUP_PATH [[[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:@"yourGrpupId"] path]
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;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With