Skip to content

Commit

Permalink
Merge pull request #314 from stephencelis/publicpod
Browse files Browse the repository at this point in the history
Prep for public release to CocoaPods
  • Loading branch information
stephencelis committed Jan 10, 2016
2 parents 5790441 + eabf217 commit c2c3d52
Show file tree
Hide file tree
Showing 67 changed files with 508 additions and 1,552 deletions.
25 changes: 19 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
# OS X
.DS_Store

# Xcode
build/
timeline.xctimeline
xcuserdata/

# System
.DS_Store
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# Carthage
Carthage/
Carthage
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "sqlcipher"]
path = Vendor/sqlcipher
url = https://github.com/sqlcipher/sqlcipher.git
21 changes: 0 additions & 21 deletions Documentation/Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
- [Carthage](#carthage)
- [CocoaPods](#cocoapods)
- [Manual](#manual)
- [SQLCipher](#sqlcipher)
- [Frameworkless Targets](#frameworkless-targets)
- [Getting Started](#getting-started)
- [Connecting to a Database](#connecting-to-a-database)
Expand Down Expand Up @@ -103,10 +102,6 @@ install SQLite.swift with Carthage:

pod 'SQLite.swift',
git: 'https://github.com/stephencelis/SQLite.swift.git'

# instead, for SQLCipher support
pod 'SQLiteCipher.swift',
git: 'https://github.com/stephencelis/SQLite.swift.git'
```

3. Run `pod install`.
Expand All @@ -132,22 +127,6 @@ To install SQLite.swift as an Xcode sub-project:
You should now be able to `import SQLite` from any of your target’s source files and begin using SQLite.swift.


#### SQLCipher

> _Note_: To install with CocoaPods, [see above](#cocoapods).

To install SQLite.swift with [SQLCipher](http://sqlcipher.net) support:

1. Make sure the **sqlcipher** working copy is checked out in Xcode. If **sqlcipher.xcodeproj** is unavailable (_i.e._, it appears red), go to the **Source Control** menu and select **Check Out sqlcipher…** from the **sqlcipher** menu item.

2. Follow [the instructions above](#manual) with the **SQLiteCipher** target, instead.

> _Note:_ By default, SQLCipher compiles [without support for full-text search](https://github.com/sqlcipher/sqlcipher/issues/102). If you intend to use [FTS4](#full-text-search), make sure you add the following to **Other C Flags** in the **Build Settings** of the **sqlcipher** target (in the **sqlcipher.xcodeproj** project):
>
> - `-DSQLITE_ENABLE_FTS4`
> - `-DSQLITE_ENABLE_FTS3_PARENTHESIS`


### Frameworkless Targets

It’s possible to use SQLite.swift in a target that doesn’t support frameworks, including iOS 7 apps and OS X command line tools, though it takes a little extra work.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ repl:
swift -F '$(TMPDIR)/SQLite.swift/Build/Products/Debug'

sloc:
@zsh -c "grep -vE '^ *//|^$$' SQLite/*.{swift,h,c} | wc -l"
@zsh -c "grep -vE '^ *//|^$$' SQLite/*/*.{swift,h,m} | wc -l"

.PHONY: test coverage clean repl sloc
33 changes: 1 addition & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ syntax _and_ intent.
- A lightweight, uncomplicated query and parameter binding interface
- Developer-friendly error handling and debugging
- [Full-text search][] support
- [SQLCipher](#sqlcipher) support
- [Well-documented][See Documentation]
- Extensively tested
- SQLCipher support will be available again soon (see #311)

[Full-text search]: Documentation/Index.md#full-text-search
[See Documentation]: Documentation/Index.md#sqliteswift-documentation
Expand Down Expand Up @@ -150,10 +150,6 @@ SQLite.swift with CocoaPods:

pod 'SQLite.swift',
git: 'https://github.com/stephencelis/SQLite.swift.git'

# instead, for SQLCipher support
pod 'SQLiteCipher.swift',
git: 'https://github.com/stephencelis/SQLite.swift.git'
```

3. Run `pod install`.
Expand Down Expand Up @@ -184,33 +180,6 @@ To install SQLite.swift as an Xcode sub-project:
[download]: https://github.com/stephencelis/SQLite.swift/archive/master.zip


#### SQLCipher

> _Note_: To install with CocoaPods, [see above](#cocoapods).

To install SQLite.swift with [SQLCipher][] support:

1. Make sure the **sqlcipher** working copy is checked out in Xcode. If
**sqlcipher.xcodeproj** is unavailable (_i.e._, it appears red), go to the
**Source Control** menu and select **Check Out sqlcipher…** from the
**sqlcipher** menu item.

2. Follow [the instructions above](#manual) with the **SQLiteCipher** target,
instead.

> _Note:_ By default, SQLCipher compiles [without support for full-text
> search][]. If you intend to use [FTS4][], make sure you add the
> following to **Other C Flags** in the **Build Settings** of the
> **sqlcipher** target (in the **sqlcipher.xcodeproj** project):
>
> - `-DSQLITE_ENABLE_FTS4`
> - `-DSQLITE_ENABLE_FTS3_PARENTHESIS`

[SQLCipher]: http://sqlcipher.net
[without support for full-text search]: https://github.com/sqlcipher/sqlcipher/issues/102
[FTS4]: http://www.sqlite.org/fts3.html


## Communication

[See the planning document] for a roadmap and existing feature requests.
Expand Down
36 changes: 26 additions & 10 deletions SQLite.swift.podspec
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
$LOAD_PATH << '.'
require 'Supporting Files/podspec.rb'
#
# `pod lib lint SQLite.swift.podspec' fails - see
# https://github.com/CocoaPods/CocoaPods/issues/4607
#

Pod::Spec.new do |spec|
spec.name = 'SQLite.swift'
spec.summary = 'A type-safe, Swift-language layer over SQLite3.'
Pod::Spec.new do |s|
s.name = "SQLite.swift"
s.version = "0.9.0"
s.summary = "A type-safe, Swift-language layer over SQLite3 for iOS and OS X."

spec.description = <<-DESC
s.description = <<-DESC
SQLite.swift provides compile-time confidence in SQL statement syntax and
intent.
DESC
DESC

apply_shared_config spec, 'SQLite'
s.homepage = "https://github.com/stephencelis/SQLite.swift"
s.license = 'MIT'
s.author = { "Stephen Celis" => "[email protected]" }
s.source = { :git => "https://github.com/stephencelis/SQLite.swift.git", :tag => s.version.to_s }
s.social_media_url = 'https://twitter.com/stephencelis'

s.module_name = 'SQLite'
s.module_map = 'module.modulemap'
s.ios.deployment_target = "8.0"

s.source_files = 'SQLite/**/*'

# make the sqlite3 C library behave like a module
s.libraries = 'sqlite3'
s.xcconfig = { 'SWIFT_INCLUDE_PATHS' => '${PODS_ROOT}/SQLite.swift/SQLite3' }
s.preserve_path = 'SQLite3/*'

spec.exclude_files = 'Source/Cipher/Cipher.swift'
spec.library = 'sqlite3'
end
Loading

0 comments on commit c2c3d52

Please sign in to comment.