Compare commits

...

4 Commits

Author SHA1 Message Date
Matthew Palmer 65e4d5ad62 Merge pull request #166 from diejmon/master
Add SPM support
2016-12-28 14:25:47 +11:00
Alexander Belyavskiy 66c2cce0c9 Add SPM support 2016-12-26 11:43:15 +03:00
Matthew Palmer bcb1a269d6 Merge pull request #160 from Fuxxel/fix/readme
README has setup section (Keychain Sharing)
2016-11-09 19:30:34 +11:00
Marvin e35ae01309 Added setup section in README.md 2016-11-08 18:49:50 +01:00
5 changed files with 18 additions and 5 deletions
+1
View File
@@ -33,3 +33,4 @@ DerivedData
.idea/
# Pods - for those of you who use CocoaPods
Pods
/.build
+1 -1
View File
@@ -82,7 +82,7 @@
0EC25C451BA38539004191AF /* LocksmithInternetAuthenticationType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocksmithInternetAuthenticationType.swift; sourceTree = "<group>"; };
0EC25C461BA38539004191AF /* LocksmithInternetProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocksmithInternetProtocol.swift; sourceTree = "<group>"; };
0EC25C471BA38539004191AF /* LocksmithSecurityClass.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocksmithSecurityClass.swift; sourceTree = "<group>"; };
0EC25C491BA38539004191AF /* LocksmithTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocksmithTests.swift; sourceTree = "<group>"; };
0EC25C491BA38539004191AF /* LocksmithTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LocksmithTests.swift; path = LocksmithTests/LocksmithTests.swift; sourceTree = "<group>"; };
0EC25C591BA385AA004191AF /* Locksmith.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Locksmith.framework; sourceTree = BUILT_PRODUCTS_DIR; };
0EC25C621BA385AB004191AF /* Locksmith iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Locksmith iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
0EC25C751BA385F6004191AF /* Locksmith.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Locksmith.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+5
View File
@@ -0,0 +1,5 @@
import PackageDescription
let package = Package(
name: "Locksmith"
)
+11 -4
View File
@@ -46,6 +46,13 @@ Locksmith is available through [Carthage](https://github.com/Carthage/Carthage).
## Quick start
### **Setup**
1. Choose your target project
2. Select Capabilties
3. Enable Keychain Sharing
Xcode then automatically creates a .entitlements file and you are ready to use Locksmith!
**Save data**
```swift
@@ -117,7 +124,7 @@ Creating, reading, and deleting each have their own protocols: `CreateableSecure
**You can conform to all three protocols on the same type!**
```swift
struct TwitterAccount: ReadableSecureStorable,
struct TwitterAccount: ReadableSecureStorable,
CreateableSecureStorable,
DeleteableSecureStorable,
GenericPasswordSecureStorable {
@@ -286,7 +293,7 @@ By adopting a protocol-oriented design from the ground up, Locksmith can provide
Lets start with an example: the Twitter account from before, except its now an `InternetPasswordSecureStorable`, which lets us store a bit more metadata.
```swift
struct TwitterAccount: InternetPasswordSecureStorable,
struct TwitterAccount: InternetPasswordSecureStorable,
ReadableSecureStorable,
CreateableSecureStorable {
let username: String
@@ -404,7 +411,7 @@ public enum LocksmithError: ErrorType {
#### `LocksmithInternetAuthenticationType`
`LocksmithInternetAuthenticationType` lets you pick out the type of authentication you want to store alongside your `.InternetPassword`s—anything from `.MSN` to `.HTTPDigest`. [Apples documentation](https://developer.apple.com/library/ios/documentation/Security/Reference/keychainservices/#//apple_ref/doc/constant_group/Authentication_Type_Values) provides more information on these values.
`LocksmithInternetAuthenticationType` lets you pick out the type of authentication you want to store alongside your `.InternetPassword`s—anything from `.MSN` to `.HTTPDigest`. [Apples documentation](https://developer.apple.com/library/ios/documentation/Security/Reference/keychainservices/#//apple_ref/doc/constant_group/Authentication_Type_Values) provides more information on these values.
```swift
public enum LocksmithInternetAuthenticationType {
@@ -421,7 +428,7 @@ public enum LocksmithInternetAuthenticationType {
#### `LocksmithInternetProtocol`
`LocksmithInternetProtocol` is used with `.InternetPassword` to choose which protocol was used for the interaction with the web service, including `.HTTP`, `.SMB`, and a whole bunch more. [Apples documentation](https://developer.apple.com/library/ios/documentation/Security/Reference/keychainservices/#//apple_ref/doc/constant_group/Protocol_Values) provides more information on these values.
`LocksmithInternetProtocol` is used with `.InternetPassword` to choose which protocol was used for the interaction with the web service, including `.HTTP`, `.SMB`, and a whole bunch more. [Apples documentation](https://developer.apple.com/library/ios/documentation/Security/Reference/keychainservices/#//apple_ref/doc/constant_group/Protocol_Values) provides more information on these values.
```swift
public enum {