Skip to content

Commit 804ab4f

Browse files
authored
Merge pull request #4 from JanC/carthage
Added Carthage support
2 parents 1a374ad + 94de489 commit 804ab4f

9 files changed

Lines changed: 350 additions & 2 deletions

File tree

Cartfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
2+
github "swisspol/GCDWebServer"
3+
github "ccgus/fmdb"

DebugDatabase/DatabaseUtil.m

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@
88

99
#import "DatabaseUtil.h"
1010
#import <sqlite3.h>
11+
12+
#ifdef COCOAPODS
1113
#import "FMDB.h"
14+
#else
15+
#import <FMDB/FMDB.h>
16+
#endif
17+
18+
1219

1320
@interface DatabaseUtil ()
1421

DebugDatabase/DebugDatabaseManager.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
//
88

99
#import <Foundation/Foundation.h>
10+
11+
#ifdef COCOAPODS
1012
#import <GCDWebServer/GCDWebServer.h>
13+
#else
14+
#import <GCDWebServers/GCDWebServers.h>
15+
#endif
1116

1217
@interface DebugDatabaseManager : GCDWebServer
1318

DebugDatabase/DebugDatabaseManager.m

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@
1010
#import "NSURL+scheme.h"
1111
#import "DatabaseUtil.h"
1212
#import "NSString+json.h"
13-
#import "GCDWebServerRequest.h"
14-
#import "GCDWebServerDataResponse.h"
13+
#ifdef COCOAPODS
14+
#import <GCDWebServer/GCDWebServerRequest.h>
15+
#import <GCDWebServer/GCDWebServerDataResponse.h>
16+
#else
17+
#import <GCDWebServers/GCDWebServerRequest.h>
18+
#import <GCDWebServers/GCDWebServerDataResponse.h>
19+
#endif
20+
1521

1622
@interface DebugDatabaseManager ()<GCDWebServerDelegate>
1723

DebugDatabase/Info.plist

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>FMWK</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleVersion</key>
20+
<string>$(CURRENT_PROJECT_VERSION)</string>
21+
<key>NSPrincipalClass</key>
22+
<string></string>
23+
</dict>
24+
</plist>

DebugDatabase/iOSDebugDatabase.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// iOSDebugDatabase.h
3+
// iOSDebugDatabase
4+
//
5+
// Created by Jan Chaloupecky on 16.12.17.
6+
// Copyright © 2017 wentian. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
//! Project version number for iOSDebugDatabase.
12+
FOUNDATION_EXPORT double iOSDebugDatabaseVersionNumber;
13+
14+
//! Project version string for iOSDebugDatabase.
15+
FOUNDATION_EXPORT const unsigned char iOSDebugDatabaseVersionString[];
16+
17+
// In this header, you should import all the public headers of your framework using statements like
18+
#import <iOSDebugDatabase/DebugDatabaseManager.h>
19+
20+

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@ use_frameworks!
3939
pod 'YYDebugDatabase'
4040
```
4141

42+
#### Carthage
43+
44+
- Cartfile
45+
46+
```
47+
github "y500/iOSDebugDatabase"
48+
```
49+
50+
- run `carthage update`
51+
52+
- Add all three `.frameworks` to your target "Embedd Frameworks" Build Phase:
53+
- `iOSDebugDatabase.framework`
54+
- `FMDB.framework`
55+
- `GCDWebServers.framework`
56+
57+
4258
#### Not build in Release
4359

4460
First, add configurations in Podfile.

0 commit comments

Comments
 (0)