WWKeychain

main

Use the "property wrapper" to make an enhanced version of Keychain, so that Keychain can be as convenient as UserDefaults.
William-Weng/WWKeychain

WWKeychain

Swift-5.6 iOS-14.0 Swift Package Manager-SUCCESS LICENSE

  • Use the "property wrapper" to make an enhanced version of Keychain, so that Keychain can be as convenient as UserDefaults.
  • 利用「屬性包裝器」做成Keychain加強版,讓Keychain也能跟UserDefaults一樣方便。

WWKeychain

dependencies: [
    .package(url: "https://github.com/William-Weng/WWKeychain.git", .upToNextMajor(from: "1.0.4"))
] 

Function - 可用函式

函式 功能
@WWKeychain() 修飾子

Example

import UIKit
import WWPrint
import WWKeychain

final class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        keychainTest()
    }
    
    /// WWKeychain測試
    func keychainTest() {
        
        let urlString = "https://developer.apple.com/videos/play/wwdc2019/262/"
        let newValue = "https://www.appcoda.com.tw/app-security/"
        
        @WWKeychain("PASSWORD") var password: String?
        
        password = urlString
        wwPrint(password)
        
        password = newValue
        wwPrint(password)
        
        password = nil
        wwPrint(password)
    }
}

Description

  • Swift Tools 5.6.0
View More Packages from this Author

Dependencies

Last updated: Mon Apr 15 2024 04:11:03 GMT-0900 (Hawaii-Aleutian Daylight Time)