Skip to content

Commit ef5cea6

Browse files
authored
Update README.md
1 parent 9a786e0 commit ef5cea6

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,22 @@ making one line code at `application:didFinishLaunchingWithOptions`:
5959
[[DebugDatabaseManager shared] startServerOnPort:9002];
6060
#end
6161
```
62+
# Advanced
63+
64+
It only shows the databasesin in Documents directory and Library/Cache directory by default, if you want show databases in other directories, you can use:
65+
66+
```
67+
- (void)startServerOnPort:(NSInteger)port directories:(NSArray*)directories
68+
```
69+
for example:
70+
71+
```
72+
NSString *resourceDirectory = [[NSBundle mainBundle] resourcePath];
73+
NSString *databaseDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/database"];
74+
NSString *documentDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documnets"];
75+
NSString *cacheDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Cache"];
76+
[[DebugDatabaseManager shared] startServerOnPort:9002 directories:@[resourceDirectory, databaseDirectory, documentDirectory, cacheDirectory]];
77+
```
6278

6379
That’s all, just start the application :
6480

0 commit comments

Comments
 (0)