summaryrefslogtreecommitdiff
path: root/common/ios.mm
blob: 1076343e243946d7a336dd14c429e2cb462fc5f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#import <Foundation/Foundation.h>

#include <mbgl/platform/platform.hpp>

namespace mbgl {
namespace platform {

// Returns the path to the default cache database on this system.
std::string defaultCacheDatabase() {
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
    NSString *libraryDirectory = [paths objectAtIndex:0];
    return [[libraryDirectory stringByAppendingPathComponent:@"cache.db"] UTF8String];
}

}
}


// Returns the path to the default cache database on this system.