Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/y500/YYDebugDatabase
Browse files Browse the repository at this point in the history
  • Loading branch information
yanqizhou committed Sep 11, 2017
2 parents 2ceadae + d4d2893 commit ace1bdc
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ $ pod install

import at AppDelegate.m:

```
```objc
#import YYDebugDatabaseManager.h
```

making one line code at `application:didFinishLaunchingWithOptions`:

```ruby
```objc
[[DebugDatabaseManager shared] startServerOnPort:9002];
```
#### Not run in Release
```
```objc
#ifdef DEBUG
[[DebugDatabaseManager shared] startServerOnPort:9002];
#end
Expand All @@ -63,12 +63,12 @@ making one line code at `application:didFinishLaunchingWithOptions`:

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:

```
```objc
- (void)startServerOnPort:(NSInteger)port directories:(NSArray*)directories
```
for example:

```
```objc
NSString *resourceDirectory = [[NSBundle mainBundle] resourcePath];
NSString *databaseDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/database"];
NSString *documentDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documnets"];
Expand All @@ -80,19 +80,19 @@ That’s all, just start the application :
Now open the provided link in your browser, and you will see like this:
![](http://noti.qiniudn.com/693916a699a78a1c01da2d93126c0ed7.png)
![](http://noti.qiniudn.com/693916a699a78a1c01da2d93126c0ed71.png)
query:
![](http://noti.qiniudn.com/21dd97948e85cf928751ef6d2b7d9266.png)
![](http://noti.qiniudn.com/21dd97948e85cf928751ef6d2b7d92662.png)
edit:
![](http://noti.qiniudn.com/b081fa0e1842a05c23321d08f7cec668.png)
![](http://noti.qiniudn.com/b081fa0e1842a05c23321d08f7cec6683.png)
delete:
![](http://noti.qiniudn.com/d0c7cb82ae6aadf790dc57da6c6e888f.png)
![](http://noti.qiniudn.com/d0c7cb82ae6aadf790dc57da6c6e888f4.png)
Important:
Expand Down

0 comments on commit ace1bdc

Please sign in to comment.