I use Xcode to create a project for load a geodatabase but I cannot access a geodatabase which shares with arcmap.
It throws an exception when I try to get feature tables.
NSString *path = [[NSBundle mainBundle] pathForResource:@"newplan" ofType:@"geodatabase"];
NSFileManager *fileManager = [NSFileManager defaultManager];
NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *docPath = [documentsDirectory stringByAppendingPathComponent:@"newplan.geodatabase"];
if (![fileManager fileExistsAtPath:docPath])
{
[fileManager copyItemAtPath:path toPath:docPath error:&error];
}
if([fileManager fileExistsAtPath:docPath])
{
AGSGDBGeodatabase *gdb = [[AGSGDBGeodatabase alloc] initWithPath:docPath error:&error];
NSLog(@"%@",gdb.featureTables);
}