|
@@ -32,11 +32,11 @@ There are three ways you can add KeychainSwift to your Xcode project.
|
|
|
|
|
|
|
|
#### Add source (iOS 7+)
|
|
#### Add source (iOS 7+)
|
|
|
|
|
|
|
|
-Simply add [KeychainSwiftDistrib.swift](https://github.com/marketplacer/keychain-swift/blob/master/Distrib/KeychainSwiftDistrib.swift) file into your Xcode project.
|
|
|
|
|
|
|
+Simply add [KeychainSwiftDistrib.swift](https://github.com/evgenyneu/keychain-swift/blob/master/Distrib/KeychainSwiftDistrib.swift) file into your Xcode project.
|
|
|
|
|
|
|
|
#### Setup with Carthage (iOS 8+)
|
|
#### Setup with Carthage (iOS 8+)
|
|
|
|
|
|
|
|
-Alternatively, add `github "marketplacer/keychain-swift" ~> 8.0` to your Cartfile and run `carthage update`.
|
|
|
|
|
|
|
+Alternatively, add `github "evgenyneu/keychain-swift" ~> 9.0` to your Cartfile and run `carthage update`.
|
|
|
|
|
|
|
|
#### Setup with CocoaPods (iOS 8+)
|
|
#### Setup with CocoaPods (iOS 8+)
|
|
|
|
|
|
|
@@ -44,7 +44,7 @@ If you are using CocoaPods add this text to your Podfile and run `pod install`.
|
|
|
|
|
|
|
|
use_frameworks!
|
|
use_frameworks!
|
|
|
target 'Your target name'
|
|
target 'Your target name'
|
|
|
- pod 'KeychainSwift', '~> 8.0'
|
|
|
|
|
|
|
+ pod 'KeychainSwift', '~> 9.0'
|
|
|
|
|
|
|
|
|
|
|
|
|
#### Setup with Swift Package Manager
|
|
#### Setup with Swift Package Manager
|
|
@@ -57,29 +57,21 @@ import PackageDescription
|
|
|
let package = Package(
|
|
let package = Package(
|
|
|
name: "KeychainSwift",
|
|
name: "KeychainSwift",
|
|
|
dependencies: [
|
|
dependencies: [
|
|
|
- .Package(url: "https://github.com/marketplacer/keychain-swift.git",
|
|
|
|
|
- versions: Version(8,0,0)..<Version(9,0,0))
|
|
|
|
|
|
|
+ .Package(url: "https://github.com/evgenyneu/keychain-swift.git",
|
|
|
|
|
+ versions: Version(9,0,0)..<Version(10,0,0))
|
|
|
]
|
|
]
|
|
|
)
|
|
)
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-#### Swift 4.0 / Xcode 9.0 beta version
|
|
|
|
|
-
|
|
|
|
|
-*Branch:* swift-4.0
|
|
|
|
|
-
|
|
|
|
|
-* *File:* [KeychainSwiftDistrib.swift](https://github.com/marketplacer/keychain-swift/blob/swift-4.0/Distrib/KeychainSwiftDistrib.swift)
|
|
|
|
|
-* *Carthage:* `github "marketplacer/keychain-swift" "swift-4.0"`
|
|
|
|
|
-* *CocoaPods:* `pod 'KeychainSwift', git: 'https://github.com/marketplacer/keychain-swift.git', branch: 'swift-4.0'`
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
## Legacy Swift versions
|
|
## Legacy Swift versions
|
|
|
|
|
|
|
|
-Setup a [previous version](https://github.com/marketplacer/keychain-swift/wiki/Legacy-Swift-versions) of the library if you use an older version of Swift.
|
|
|
|
|
|
|
+Setup a [previous version](https://github.com/evgenyneu/keychain-swift/wiki/Legacy-Swift-versions) of the library if you use an older version of Swift.
|
|
|
|
|
|
|
|
|
|
|
|
|
**iOS 7 support**
|
|
**iOS 7 support**
|
|
|
|
|
|
|
|
-Use [iOS 7 compatible](https://github.com/marketplacer/keychain-swift/blob/iOS7/Distrib/KeychainSwiftDistrib.swift) version of the library.
|
|
|
|
|
|
|
+Use [iOS 7 compatible](https://github.com/evgenyneu/keychain-swift/blob/iOS7/Distrib/KeychainSwiftDistrib.swift) version of the library.
|
|
|
|
|
|
|
|
<h2 id="usage">Usage</h2>
|
|
<h2 id="usage">Usage</h2>
|
|
|
|
|
|
|
@@ -131,7 +123,7 @@ KeychainSwift().set("Hello world", forKey: "key 1", withAccess: .accessibleWhenU
|
|
|
|
|
|
|
|
You can use `.accessibleAfterFirstUnlock` if you need your app to access the keychain item while in the background. Note that it is less secure than the `.accessibleWhenUnlocked` option.
|
|
You can use `.accessibleAfterFirstUnlock` if you need your app to access the keychain item while in the background. Note that it is less secure than the `.accessibleWhenUnlocked` option.
|
|
|
|
|
|
|
|
-See the list of all available [access options](https://github.com/marketplacer/keychain-swift/blob/master/Sources/KeychainSwiftAccessOptions.swift).
|
|
|
|
|
|
|
+See the list of all available [access options](https://github.com/evgenyneu/keychain-swift/blob/master/Sources/KeychainSwiftAccessOptions.swift).
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 id="keychain_synchronization">Synchronizing keychain items with other devices</h3>
|
|
<h3 id="keychain_synchronization">Synchronizing keychain items with other devices</h3>
|
|
@@ -210,15 +202,15 @@ if keychain.lastResultCode != noErr { /* Report error */ }
|
|
|
|
|
|
|
|
## Using KeychainSwift from Objective-C
|
|
## Using KeychainSwift from Objective-C
|
|
|
|
|
|
|
|
-[This manual](https://github.com/marketplacer/keychain-swift/wiki/Using-KeychainSwift-in-Objective-C-project) describes how to use KeychainSwift in Objective-C apps.
|
|
|
|
|
|
|
+[This manual](https://github.com/evgenyneu/keychain-swift/wiki/Using-KeychainSwift-in-Objective-C-project) describes how to use KeychainSwift in Objective-C apps.
|
|
|
|
|
|
|
|
## Known serious issue
|
|
## Known serious issue
|
|
|
|
|
|
|
|
-It [has been reported](https://github.com/marketplacer/keychain-swift/issues/15) that the library sometimes returns `nil` instead of the stored Keychain value. The issue seems to be random and hard to reproduce. It may be connected with [the Keychain issue](https://forums.developer.apple.com/thread/4743) reported on Apple developer forums. If you experienced this problem feel free to create an issue so we can discuss it and find solutions.
|
|
|
|
|
|
|
+It [has been reported](https://github.com/evgenyneu/keychain-swift/issues/15) that the library sometimes returns `nil` instead of the stored Keychain value. The issue seems to be random and hard to reproduce. It may be connected with [the Keychain issue](https://forums.developer.apple.com/thread/4743) reported on Apple developer forums. If you experienced this problem feel free to create an issue so we can discuss it and find solutions.
|
|
|
|
|
|
|
|
## Demo app
|
|
## Demo app
|
|
|
|
|
|
|
|
-<img src="https://raw.githubusercontent.com/marketplacer/keychain-swift/master/graphics/keychain-swift-demo-3.png" alt="Keychain Swift demo app" width="320">
|
|
|
|
|
|
|
+<img src="https://raw.githubusercontent.com/evgenyneu/keychain-swift/master/graphics/keychain-swift-demo-3.png" alt="Keychain Swift demo app" width="320">
|
|
|
|
|
|
|
|
## Running Keychain unit tests
|
|
## Running Keychain unit tests
|
|
|
|
|
|