Skip to content

Commit 9762958

Browse files
committed
perfect somethings
1 parent 2c4d152 commit 9762958

File tree

7 files changed

+109
-19
lines changed

7 files changed

+109
-19
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "Vendor/SQLite.swift"]
2+
path = Vendor/SQLite.swift
3+
url = https://github.com/stephencelis/SQLite.swift.git

README.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
YTKKeyValueStore
22
==========
33

4+
[![Build Status][Badge]][Travis] [![CocoaPods Version](https://cocoapod-badges.herokuapp.com/v/YTKKeyValueStore_Swift/badge.png)](http://cocoadocs.org/docsets/YTKKeyValueStore_Swift) [![Platform](https://cocoapod-badges.herokuapp.com/p/YTKKeyValueStore_Swift/badge.png)](http://cocoadocs.org/docsets/YTKKeyValueStore_Swift)
5+
46
objc version :https://github.com/yuantiku/YTKKeyValueStore
57

68
![License MIT](https://go-shields.herokuapp.com/license-MIT-blue.png)
@@ -38,9 +40,9 @@ let isExists = table.isExists
3840
try! table.put( "name" <- "sgxiang") // put value("sgxiang") for key("name") into table , support string,number,dictionary,array
3941

4042

41-
let objct = table.get("name") // get object with key , return YTKObject?
42-
let item = table.getItem("name") // get item with key ,return YTKItem?
43-
let allItems = table.getAllItems() // get all item with key , return [YTKItem]?
43+
let objct = try! table.get("name") // get object with key , return YTKObject?
44+
let item = try! table.getItem("name") // get item with key ,return YTKItem?
45+
let allItems = try! table.getAllItems() // get all item with key , return [YTKItem]?
4446

4547

4648
try! table.clear() // clear table
@@ -85,9 +87,17 @@ Expand the "Target Dependencies" group, and add YTKKeyValueStore.framework.
8587

8688
- Click on the + button at the top left of the panel and select "New Copy Files Phase". Rename this new phase to "Copy Frameworks", set the "Destination" to "Frameworks", and add YTKKeyValueStore.framework.
8789

88-
### Source File
90+
### CocoaPods
91+
92+
Update Podfile to include the following:
93+
94+
```
95+
use_frameworks!
96+
97+
pod 'YTKKeyValueStore_Swift', '~> 0.3.3'
98+
```
8999

90-
Copy source file into your project
100+
Run `pod install`
91101

92102
## Communication
93103

Vendor/SQLite.swift

Submodule SQLite.swift added at 13e7d77

YTKKeyValueStore.xcodeproj/project.pbxproj

+82
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
1A5891F51A8B5E5D00155614 /* YTKConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A5891F41A8B5E5D00155614 /* YTKConfig.swift */; };
1818
1A5891F71A8B5EBE00155614 /* YTKItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A5891F61A8B5EBE00155614 /* YTKItem.swift */; };
1919
1A81A1671BA80B0400A53DE1 /* YTKError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A81A1661BA80B0400A53DE1 /* YTKError.swift */; };
20+
1A9239681C8FCAE600190AF1 /* SQLite.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A9239611C8FCAC600190AF1 /* SQLite.framework */; };
21+
1A9239691C8FCAEE00190AF1 /* SQLite.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1A9239611C8FCAC600190AF1 /* SQLite.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2022
/* End PBXBuildFile section */
2123

2224
/* Begin PBXContainerItemProxy section */
@@ -27,6 +29,34 @@
2729
remoteGlobalIDString = 1A5891A41A8B4F6200155614;
2830
remoteInfo = YTKKeyValueStore;
2931
};
32+
1A9239601C8FCAC600190AF1 /* PBXContainerItemProxy */ = {
33+
isa = PBXContainerItemProxy;
34+
containerPortal = 1A9239591C8FCAC600190AF1 /* SQLite.xcodeproj */;
35+
proxyType = 2;
36+
remoteGlobalIDString = EE247AD31C3F04ED00AE3E12;
37+
remoteInfo = "SQLite iOS";
38+
};
39+
1A9239621C8FCAC600190AF1 /* PBXContainerItemProxy */ = {
40+
isa = PBXContainerItemProxy;
41+
containerPortal = 1A9239591C8FCAC600190AF1 /* SQLite.xcodeproj */;
42+
proxyType = 2;
43+
remoteGlobalIDString = EE247ADD1C3F04ED00AE3E12;
44+
remoteInfo = "SQLiteTests iOS";
45+
};
46+
1A9239641C8FCAC600190AF1 /* PBXContainerItemProxy */ = {
47+
isa = PBXContainerItemProxy;
48+
containerPortal = 1A9239591C8FCAC600190AF1 /* SQLite.xcodeproj */;
49+
proxyType = 2;
50+
remoteGlobalIDString = EE247B3C1C3F3ED000AE3E12;
51+
remoteInfo = "SQLite Mac";
52+
};
53+
1A9239661C8FCAC600190AF1 /* PBXContainerItemProxy */ = {
54+
isa = PBXContainerItemProxy;
55+
containerPortal = 1A9239591C8FCAC600190AF1 /* SQLite.xcodeproj */;
56+
proxyType = 2;
57+
remoteGlobalIDString = EE247B451C3F3ED000AE3E12;
58+
remoteInfo = "SQLiteTests Mac";
59+
};
3060
/* End PBXContainerItemProxy section */
3161

3262
/* Begin PBXCopyFilesBuildPhase section */
@@ -36,6 +66,7 @@
3666
dstPath = "";
3767
dstSubfolderSpec = 10;
3868
files = (
69+
1A9239691C8FCAEE00190AF1 /* SQLite.framework in CopyFiles */,
3970
);
4071
runOnlyForDeploymentPostprocessing = 0;
4172
};
@@ -55,13 +86,15 @@
5586
1A5891F41A8B5E5D00155614 /* YTKConfig.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YTKConfig.swift; sourceTree = "<group>"; };
5687
1A5891F61A8B5EBE00155614 /* YTKItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YTKItem.swift; sourceTree = "<group>"; };
5788
1A81A1661BA80B0400A53DE1 /* YTKError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YTKError.swift; sourceTree = "<group>"; };
89+
1A9239591C8FCAC600190AF1 /* SQLite.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SQLite.xcodeproj; path = Vendor/SQLite.swift/SQLite.xcodeproj; sourceTree = SOURCE_ROOT; };
5890
/* End PBXFileReference section */
5991

6092
/* Begin PBXFrameworksBuildPhase section */
6193
1A5891A11A8B4F6200155614 /* Frameworks */ = {
6294
isa = PBXFrameworksBuildPhase;
6395
buildActionMask = 2147483647;
6496
files = (
97+
1A9239681C8FCAE600190AF1 /* SQLite.framework in Frameworks */,
6598
);
6699
runOnlyForDeploymentPostprocessing = 0;
67100
};
@@ -105,6 +138,7 @@
105138
1A5891F41A8B5E5D00155614 /* YTKConfig.swift */,
106139
1A81A1661BA80B0400A53DE1 /* YTKError.swift */,
107140
1A5891AA1A8B4F6200155614 /* YTKKeyValueStore.h */,
141+
1A9239591C8FCAC600190AF1 /* SQLite.xcodeproj */,
108142
1A5891A81A8B4F6200155614 /* Supporting Files */,
109143
);
110144
path = YTKKeyValueStore;
@@ -135,6 +169,17 @@
135169
name = "Supporting Files";
136170
sourceTree = "<group>";
137171
};
172+
1A92395A1C8FCAC600190AF1 /* Products */ = {
173+
isa = PBXGroup;
174+
children = (
175+
1A9239611C8FCAC600190AF1 /* SQLite.framework */,
176+
1A9239631C8FCAC600190AF1 /* SQLiteTests iOS.xctest */,
177+
1A9239651C8FCAC600190AF1 /* SQLite.framework */,
178+
1A9239671C8FCAC600190AF1 /* SQLiteTests Mac.xctest */,
179+
);
180+
name = Products;
181+
sourceTree = "<group>";
182+
};
138183
/* End PBXGroup section */
139184

140185
/* Begin PBXHeadersBuildPhase section */
@@ -214,6 +259,12 @@
214259
mainGroup = 1A58919B1A8B4F6200155614;
215260
productRefGroup = 1A5891A61A8B4F6200155614 /* Products */;
216261
projectDirPath = "";
262+
projectReferences = (
263+
{
264+
ProductGroup = 1A92395A1C8FCAC600190AF1 /* Products */;
265+
ProjectRef = 1A9239591C8FCAC600190AF1 /* SQLite.xcodeproj */;
266+
},
267+
);
217268
projectRoot = "";
218269
targets = (
219270
1A5891A41A8B4F6200155614 /* YTKKeyValueStore */,
@@ -222,6 +273,37 @@
222273
};
223274
/* End PBXProject section */
224275

276+
/* Begin PBXReferenceProxy section */
277+
1A9239611C8FCAC600190AF1 /* SQLite.framework */ = {
278+
isa = PBXReferenceProxy;
279+
fileType = wrapper.framework;
280+
path = SQLite.framework;
281+
remoteRef = 1A9239601C8FCAC600190AF1 /* PBXContainerItemProxy */;
282+
sourceTree = BUILT_PRODUCTS_DIR;
283+
};
284+
1A9239631C8FCAC600190AF1 /* SQLiteTests iOS.xctest */ = {
285+
isa = PBXReferenceProxy;
286+
fileType = wrapper.cfbundle;
287+
path = "SQLiteTests iOS.xctest";
288+
remoteRef = 1A9239621C8FCAC600190AF1 /* PBXContainerItemProxy */;
289+
sourceTree = BUILT_PRODUCTS_DIR;
290+
};
291+
1A9239651C8FCAC600190AF1 /* SQLite.framework */ = {
292+
isa = PBXReferenceProxy;
293+
fileType = wrapper.framework;
294+
path = SQLite.framework;
295+
remoteRef = 1A9239641C8FCAC600190AF1 /* PBXContainerItemProxy */;
296+
sourceTree = BUILT_PRODUCTS_DIR;
297+
};
298+
1A9239671C8FCAC600190AF1 /* SQLiteTests Mac.xctest */ = {
299+
isa = PBXReferenceProxy;
300+
fileType = wrapper.cfbundle;
301+
path = "SQLiteTests Mac.xctest";
302+
remoteRef = 1A9239661C8FCAC600190AF1 /* PBXContainerItemProxy */;
303+
sourceTree = BUILT_PRODUCTS_DIR;
304+
};
305+
/* End PBXReferenceProxy section */
306+
225307
/* Begin PBXResourcesBuildPhase section */
226308
1A5891A31A8B4F6200155614 /* Resources */ = {
227309
isa = PBXResourcesBuildPhase;

YTKKeyValueStore.xcodeproj/project.xcworkspace/xcshareddata/YTKKeyValueStore.xcscmblueprint

+4-11
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,26 @@
55
},
66
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
77
"3AE8ED2E684071AF4FB151FA51BF266B82FF45BD" : 0,
8-
"55011AEBD444630C0E9DF47BD2E18FDBBDCC285D" : 0,
98
"4A981CE5EBB25D0F76C1CD8B5935247ECC95C653" : 0
109
},
1110
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "F6638221-B3F5-4B3D-B500-7A6199A548C6",
1211
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
13-
"3AE8ED2E684071AF4FB151FA51BF266B82FF45BD" : "ytk\/SQLite.swift\/",
14-
"55011AEBD444630C0E9DF47BD2E18FDBBDCC285D" : "ytk\/SQLite.swift\/Vendor\/sqlcipher\/",
15-
"4A981CE5EBB25D0F76C1CD8B5935247ECC95C653" : "ytk\/"
12+
"3AE8ED2E684071AF4FB151FA51BF266B82FF45BD" : "YTKKeyValueStore_Swift\/Vendor\/SQLite.swift\/",
13+
"4A981CE5EBB25D0F76C1CD8B5935247ECC95C653" : "YTKKeyValueStore_Swift\/"
1614
},
1715
"DVTSourceControlWorkspaceBlueprintNameKey" : "YTKKeyValueStore",
1816
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
19-
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "YTKKeyValueStore\/YTKKeyValueStore.xcodeproj",
17+
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "YTKKeyValueStore.xcodeproj",
2018
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
2119
{
2220
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/stephencelis\/SQLite.swift.git",
2321
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
2422
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "3AE8ED2E684071AF4FB151FA51BF266B82FF45BD"
2523
},
2624
{
27-
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/sgxiang\/YTKKeyValueStore_Swift.git",
25+
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/sgxiang\/YTKKeyValueStore_Swift",
2826
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
2927
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "4A981CE5EBB25D0F76C1CD8B5935247ECC95C653"
30-
},
31-
{
32-
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/sqlcipher\/sqlcipher.git",
33-
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
34-
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "55011AEBD444630C0E9DF47BD2E18FDBBDCC285D"
3528
}
3629
]
3730
}

YTKKeyValueStore/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.0</string>
18+
<string>0.3.3</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

YTKKeyValueStore_Swift.podspec

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
Pod::Spec.new do |s|
22
s.name = "YTKKeyValueStore_Swift"
3-
s.version = "0.3.2"
3+
s.version = "0.3.3"
44
s.summary = "A simple Key-Value storage tool, using Sqlite as backend."
55
s.homepage = "https://github.com/sgxiang/YTKKeyValueStore_Swift"
66
s.license = "MIT"
77
s.author = { "sgxiang" => "[email protected]" }
88
s.platform = :ios, '8.0'
9-
s.source = { :git => "https://github.com/sgxiang/YTKKeyValueStore_Swift.git", :tag => "0.3.2" }
9+
s.source = { :git => "https://github.com/sgxiang/YTKKeyValueStore_Swift.git", :tag => "0.3.3" }
1010
s.source_files = "YTKKeyValueStore/*.swift"
1111
s.requires_arc = true
12+
s.module_name = 'YTKkeyValueStore'
1213
s.dependency "SQLite.swift", "~> 0.9.2"
1314
end

0 commit comments

Comments
 (0)