Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

github "swisspol/GCDWebServer"
github "ccgus/fmdb"
7 changes: 7 additions & 0 deletions DebugDatabase/DatabaseUtil.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@

#import "DatabaseUtil.h"
#import <sqlite3.h>

#ifdef COCOAPODS
#import "FMDB.h"
#else
#import <FMDB/FMDB.h>
#endif



@interface DatabaseUtil ()

Expand Down
5 changes: 5 additions & 0 deletions DebugDatabase/DebugDatabaseManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
//

#import <Foundation/Foundation.h>

#ifdef COCOAPODS
#import <GCDWebServer/GCDWebServer.h>
#else
#import <GCDWebServers/GCDWebServers.h>
#endif

@interface DebugDatabaseManager : GCDWebServer

Expand Down
10 changes: 8 additions & 2 deletions DebugDatabase/DebugDatabaseManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@
#import "NSURL+scheme.h"
#import "DatabaseUtil.h"
#import "NSString+json.h"
#import "GCDWebServerRequest.h"
#import "GCDWebServerDataResponse.h"
#ifdef COCOAPODS
#import <GCDWebServer/GCDWebServerRequest.h>
#import <GCDWebServer/GCDWebServerDataResponse.h>
#else
#import <GCDWebServers/GCDWebServerRequest.h>
#import <GCDWebServers/GCDWebServerDataResponse.h>
#endif


@interface DebugDatabaseManager ()<GCDWebServerDelegate>

Expand Down
24 changes: 24 additions & 0 deletions DebugDatabase/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
20 changes: 20 additions & 0 deletions DebugDatabase/iOSDebugDatabase.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// iOSDebugDatabase.h
// iOSDebugDatabase
//
// Created by Jan Chaloupecky on 16.12.17.
// Copyright © 2017 wentian. All rights reserved.
//

#import <UIKit/UIKit.h>

//! Project version number for iOSDebugDatabase.
FOUNDATION_EXPORT double iOSDebugDatabaseVersionNumber;

//! Project version string for iOSDebugDatabase.
FOUNDATION_EXPORT const unsigned char iOSDebugDatabaseVersionString[];

// In this header, you should import all the public headers of your framework using statements like
#import <iOSDebugDatabase/DebugDatabaseManager.h>


16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,22 @@ use_frameworks!
pod 'YYDebugDatabase'
```

#### Carthage

- Cartfile

```
github "y500/iOSDebugDatabase"
```

- run `carthage update`

- Add all three `.frameworks` to your target "Embedd Frameworks" Build Phase:
- `iOSDebugDatabase.framework`
- `FMDB.framework`
- `GCDWebServers.framework`


#### Not build in Release

First, add configurations in Podfile.
Expand Down
Loading