Skip to content

Commit f12a6c1

Browse files
authoredSep 29, 2021
maybe this will combine correctly?
1 parent c32d5c3 commit f12a6c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎ios/RNSqlite2.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ -(void)pluginInitialize {
2828
logDebug(@"pluginInitialize()");
2929
cachedDatabases = [NSMutableDictionary dictionaryWithCapacity:0];
3030
dbQueues = [NSMutableDictionary dictionaryWithCapacity:0];
31-
NSURL *dbDir = [self getDatabaseDir];
31+
NSString *dbDir = [self getDatabaseDir];
3232

3333
// create storage directory if it doesn't exist
3434
[[NSFileManager defaultManager] createDirectoryAtPath: dbDir
@@ -46,11 +46,11 @@ - (dispatch_queue_t)getDatabaseQueue:(NSString *)dbName {
4646
return q;
4747
}
4848

49-
-(NSURL*) getDatabaseDir {
50-
NSURL *appSupportDir = nil;
49+
-(NSString*) getDatabaseDir {
50+
NSString *appSupportDir = nil;
5151
appSupportDir = [NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) objectAtIndex: 0];
5252
NSString *appBundleID = [[NSBundle mainBundle] bundleIdentifier];
53-
return [appSupportDir URLByAppendingPathComponent:appBundleID];
53+
return [NSString stringWithFormat:@"%@/%@", appSupportDir, appBundleID];
5454
}
5555

5656
-(id) getPathForDB:(NSString *)dbName {

0 commit comments

Comments
 (0)