Skip to content

Commit 7627523

Browse files
committed
CocoaPods support
With 0.37, we get custom module map support, and with that we can cobble together a working framework! Signed-off-by: Stephen Celis <stephen@stephencelis.com>
1 parent 8f64e35 commit 7627523

File tree

4 files changed

+80
-2
lines changed

4 files changed

+80
-2
lines changed

Documentation/Index.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# SQLite.swift Documentation
22

33
- [Installation](#installation)
4+
- [CocoaPods](#cocoapods)
5+
- [Manual](#manual)
46
- [SQLCipher](#sqlcipher)
57
- [Frameworkless Targets](#frameworkless-targets)
68
- [Getting Started](#getting-started)
@@ -65,6 +67,28 @@
6567

6668
> _Note:_ SQLite.swift requires Swift 1.2 (and [Xcode 6.3](https://developer.apple.com/xcode/downloads/)) or greater.
6769
70+
71+
### CocoaPods
72+
73+
[CocoaPods][] is a dependency manager for Cocoa projects. To install SQLite.swift with CocoaPods:
74+
75+
1. Make sure CocoaPods is [installed][CocoaPods Installation] (SQLite.swift requires version 0.37 or greater).
76+
77+
2. Update your Podfile to include the following:
78+
79+
``` ruby
80+
use_frameworks!
81+
pod 'SQLite.swift', git: 'https://github.com/stephencelis/SQLite.swift.git'
82+
```
83+
84+
3. Run `pod install`.
85+
86+
[CocoaPods]: https://cocoapods.org
87+
[CocoaPods Installation]: https://guides.cocoapods.org/using/getting-started.html#getting-started
88+
89+
90+
### Manual
91+
6892
To install SQLite.swift as an Xcode sub-project:
6993

7094
1. Drag the **SQLite.xcodeproj** file into your own project. ([Submodule](http://git-scm.com/book/en/Git-Tools-Submodules), clone, or [download](https://github.com/stephencelis/SQLite.swift/archive/master.zip) the project first.)

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,31 @@ interactively, from the Xcode project’s playground.
113113
> tool, please read the [Frameworkless Targets][] section of the
114114
> documentation.
115115
116-
To install SQLite.swift:
116+
117+
### CocoaPods
118+
119+
[CocoaPods][] is a dependency manager for Cocoa projects. To install
120+
SQLite.swift with CocoaPods:
121+
122+
1. Make sure CocoaPods is [installed][CocoaPods Installation] (SQLite.swift
123+
requires version 0.37 or greater).
124+
125+
2. Update your Podfile to include the following:
126+
127+
``` ruby
128+
use_frameworks!
129+
pod 'SQLite.swift', git: 'https://github.com/stephencelis/SQLite.swift.git'
130+
```
131+
132+
3. Run `pod install`.
133+
134+
[CocoaPods]: https://cocoapods.org
135+
[CocoaPods Installation]: https://guides.cocoapods.org/using/getting-started.html#getting-started
136+
137+
138+
### Manual
139+
140+
To install SQLite.swift as an Xcode sub-project:
117141

118142
1. Drag the **SQLite.xcodeproj** file into your own project.
119143
([Submodule][], clone, or [download][] the project first.)

SQLite.swift.podspec

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
Pod::Spec.new do |s|
2+
s.name = 'SQLite.swift'
3+
s.module_name = 'SQLite'
4+
s.version = '0.1.0.pre'
5+
s.summary = 'A type-safe, Swift-language layer over SQLite3.'
6+
7+
s.description = <<-DESC
8+
SQLite.swift provides compile-time confidence in SQL statement syntax and
9+
intent.
10+
DESC
11+
12+
s.homepage = 'https://github.com/stephencelis/SQLite.swift'
13+
s.license = { type: 'MIT', file: 'LICENSE.txt' }
14+
15+
s.author = { 'Stephen Celis' => 'stephen@stephencelis.com' }
16+
s.social_media_url = 'https://twitter.com/stephencelis'
17+
18+
s.library = 'sqlite3'
19+
20+
s.source = {
21+
git: 'https://github.com/stephencelis/SQLite.swift.git',
22+
tag: s.version
23+
}
24+
25+
s.source_files = 'SQLite/**/*.{swift,c,h,m}'
26+
s.private_header_files = 'SQLite/fts3_tokenizer.h'
27+
28+
s.module_map = 'SQLite/module.modulemap'
29+
end

SQLite/module.modulemap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
framework module SQLite {
22
umbrella header "SQLite.h"
33

4-
// Load the SDK header alongside SQLite.swift. Alternative headers:
4+
// Load the SDK header alongside SQLite.swift. Alternate headers:
5+
//
56
// header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sqlite3.h"
67
// header "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sqlite3.h"
78
header "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sqlite3.h"

0 commit comments

Comments
 (0)