@@ -31,16 +31,12 @@ -(void)pluginInitialize {
3131 dbQueues = [NSMutableDictionary dictionaryWithCapacity: 0 ];
3232 NSString *dbDir = [self getDatabaseDir ];
3333
34- // create "NoCloud" if it doesn't exist
34+ // create storage directory if it doesn't exist
3535 [[NSFileManager defaultManager ] createDirectoryAtPath: dbDir
3636 withIntermediateDirectories: NO
3737 attributes: nil
3838 error: nil ];
39- // make it non-syncable to iCloud
40- NSURL *url = [ NSURL fileURLWithPath: dbDir];
41- [url setResourceValue: [NSNumber numberWithBool: YES ]
42- forKey: NSURLIsExcludedFromBackupKey
43- error: nil ];
39+
4440}
4541
4642- (dispatch_queue_t )getDatabaseQueue : (NSString *)dbName {
@@ -53,8 +49,10 @@ - (dispatch_queue_t)getDatabaseQueue:(NSString *)dbName {
5349}
5450
5551-(NSString *) getDatabaseDir {
56- NSString *libDir = [NSSearchPathForDirectoriesInDomains (NSLibraryDirectory, NSUserDomainMask, YES ) objectAtIndex: 0 ];
57- return [libDir stringByAppendingPathComponent: @" NoCloud" ];
52+ NSString *appSupportDir = nil ;
53+ appSupportDir = [NSSearchPathForDirectoriesInDomains (NSApplicationSupportDirectory, NSUserDomainMask, YES ) objectAtIndex: 0 ];
54+ NSString *appBundleID = [[NSBundle mainBundle ] bundleIdentifier ];
55+ return [NSString stringWithFormat: @" %@ /%@ " , appSupportDir, appBundleID];
5856}
5957
6058-(id ) getPathForDB : (NSString *)dbName {
0 commit comments