Skip to content

Commit af9eb5a

Browse files
committed
Preliminary podspec.
Doesn't work properly because the module for sqlite3 cannot be built. Needs further investigation.
1 parent eee33ef commit af9eb5a

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ xcuserdata/
55

66
# System
77
.DS_Store
8+
9+
# CocoaPods
10+
module.map

SQLite Common/SQLite-Bridging.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
// THE SOFTWARE.
2222
//
2323

24+
#if COCOAPODS
25+
@import sqlite3
26+
#else
2427
#include <sqlite3.h>
28+
#endif
2529

2630
typedef int (^SQLiteBusyHandlerCallback)(int times);
2731
void SQLiteBusyHandler(sqlite3 * handle, SQLiteBusyHandlerCallback callback);

SQLite.swift.podspec

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Pod::Spec.new do |s|
2+
s.name = 'SQLite.swift'
3+
s.module_name = 'SQLite'
4+
s.version = '0.1.0'
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' => '[email protected]' }
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.prepare_command = <<-CMD
26+
cat > "module.map" << MAP
27+
module sqlite3 [system] {
28+
header "$SDKROOT/usr/include/sqlite3.h"
29+
link "sqlite3"
30+
export *
31+
}
32+
MAP
33+
CMD
34+
35+
s.ios.deployment_target = '8.0'
36+
s.osx.deployment_target = '10.9'
37+
38+
s.source_files = 'SQLite Common/**/*.{swift,c,h,m}'
39+
s.exclude_files = '**/SQLite-Bridging-Header.h'
40+
s.preserve_path = 'module.map'
41+
42+
s.xcconfig = {
43+
'SWIFT_INCLUDE_PATHS' => '${PODS_ROOT}/SQLite.swift ' + Dir.pwd
44+
}
45+
end

0 commit comments

Comments
 (0)