Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 65e4d5ad62 | |||
| 66c2cce0c9 | |||
| bcb1a269d6 | |||
| e35ae01309 |
@@ -33,3 +33,4 @@ DerivedData
|
||||
.idea/
|
||||
# Pods - for those of you who use CocoaPods
|
||||
Pods
|
||||
/.build
|
||||
|
||||
@@ -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; };
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "Locksmith"
|
||||
)
|
||||
@@ -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
|
||||
Let’s start with an example: the Twitter account from before, except it’s 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`. [Apple’s 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`. [Apple’s 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. [Apple’s 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. [Apple’s 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 {
|
||||
|
||||
Reference in New Issue
Block a user