Solved! Go to Solution.
[AGSLocalTiledLayer localTiledLayerWithName:fileName]
[AGSLocalTiledLayer localTiledLayerWithPath:filePath]
-(AGSLocalTiledLayer *)retrieveOfflineBasemap{ NSString *rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSArray *files = [[NSFileManager defaultManager]contentsOfDirectoryAtPath:rootPath error:nil]; AGSLocalTiledLayer *localBasemap; for (NSString *file in files){ if ([file hasSuffix:@"basemap.tpk"]){ NSString *bmpPath = [rootPath stringByAppendingPathComponent:file]; localBasemap = [AGSLocalTiledLayer localTiledLayerWithPath:bmpPath]; break; } } return localBasemap; }
[AGSLocalTiledLayer localTiledLayerWithName:fileName]
[AGSLocalTiledLayer localTiledLayerWithPath:filePath]
-(AGSLocalTiledLayer *)retrieveOfflineBasemap{ NSString *rootPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSArray *files = [[NSFileManager defaultManager]contentsOfDirectoryAtPath:rootPath error:nil]; AGSLocalTiledLayer *localBasemap; for (NSString *file in files){ if ([file hasSuffix:@"basemap.tpk"]){ NSString *bmpPath = [rootPath stringByAppendingPathComponent:file]; localBasemap = [AGSLocalTiledLayer localTiledLayerWithPath:bmpPath]; break; } } return localBasemap; }