Simple Swift wrapper for Keychain that works on iOS, watchOS, tvOS and macOS.

Overview

KeychainAccess

Build Status Carthage compatible SPM supported Version Platform

KeychainAccess is a simple Swift wrapper for Keychain that works on iOS and OS X. Makes using Keychain APIs extremely easy and much more palatable to use in Swift.

๐Ÿ’ก Features

๐Ÿ“– Usage

๐Ÿ‘€ See also:

๐Ÿ”‘ Basics

Saving Application Password

let keychain = Keychain(service: "com.example.github-token")
keychain["kishikawakatsumi"] = "01234567-89ab-cdef-0123-456789abcdef"

Saving Internet Password

let keychain = Keychain(server: "https://github.com", protocolType: .https)
keychain["kishikawakatsumi"] = "01234567-89ab-cdef-0123-456789abcdef"

๐Ÿ”‘ Instantiation

Create Keychain for Application Password

let keychain = Keychain(service: "com.example.github-token")
let keychain = Keychain(service: "com.example.github-token", accessGroup: "12ABCD3E4F.shared")

Create Keychain for Internet Password

let keychain = Keychain(server: "https://github.com", protocolType: .https)
let keychain = Keychain(server: "https://github.com", protocolType: .https, authenticationType: .htmlForm)

๐Ÿ”‘ Adding an item

subscripting

for String
keychain["kishikawakatsumi"] = "01234567-89ab-cdef-0123-456789abcdef"
keychain[string: "kishikawakatsumi"] = "01234567-89ab-cdef-0123-456789abcdef"
for NSData
keychain[data: "secret"] = NSData(contentsOfFile: "secret.bin")

set method

keychain.set("01234567-89ab-cdef-0123-456789abcdef", key: "kishikawakatsumi")

error handling

do {
    try keychain.set("01234567-89ab-cdef-0123-456789abcdef", key: "kishikawakatsumi")
}
catch let error {
    print(error)
}

๐Ÿ”‘ Obtaining an item

subscripting

for String (If the value is NSData, attempt to convert to String)
let token = keychain["kishikawakatsumi"]
let token = keychain[string: "kishikawakatsumi"]
for NSData
let secretData = keychain[data: "secret"]

get methods

as String
let token = try? keychain.get("kishikawakatsumi")
let token = try? keychain.getString("kishikawakatsumi")
as NSData
let data = try? keychain.getData("kishikawakatsumi")

๐Ÿ”‘ Removing an item

subscripting

keychain["kishikawakatsumi"] = nil

remove method

do {
    try keychain.remove("kishikawakatsumi")
} catch let error {
    print("error: \(error)")
}

๐Ÿ”‘ Set Label and Comment

let keychain = Keychain(server: "https://github.com", protocolType: .https)
do {
    try keychain
        .label("github.com (kishikawakatsumi)")
        .comment("github access token")
        .set("01234567-89ab-cdef-0123-456789abcdef", key: "kishikawakatsumi")
} catch let error {
    print("error: \(error)")
}

๐Ÿ”‘ Obtaining Other Attributes

PersistentRef

let keychain = Keychain()
let persistentRef = keychain[attributes: "kishikawakatsumi"]?.persistentRef
...

Creation Date

let keychain = Keychain()
let creationDate = keychain[attributes: "kishikawakatsumi"]?.creationDate
...

All Attributes

let keychain = Keychain()
do {
    let attributes = try keychain.get("kishikawakatsumi") { $0 }
    print(attributes?.comment)
    print(attributes?.label)
    print(attributes?.creator)
    ...
} catch let error {
    print("error: \(error)")
}
subscripting
let keychain = Keychain()
if let attributes = keychain[attributes: "kishikawakatsumi"] {
    print(attributes.comment)
    print(attributes.label)
    print(attributes.creator)
}

๐Ÿ”‘ Configuration (Accessibility, Sharing, iCloud Sync)

Provides fluent interfaces

let keychain = Keychain(service: "com.example.github-token")
    .label("github.com (kishikawakatsumi)")
    .synchronizable(true)
    .accessibility(.afterFirstUnlock)

Accessibility

Default accessibility matches background application (=kSecAttrAccessibleAfterFirstUnlock)
let keychain = Keychain(service: "com.example.github-token")
For background application
Creating instance
let keychain = Keychain(service: "com.example.github-token")
    .accessibility(.afterFirstUnlock)

keychain["kishikawakatsumi"] = "01234567-89ab-cdef-0123-456789abcdef"
One-shot
let keychain = Keychain(service: "com.example.github-token")

do {
    try keychain
        .accessibility(.afterFirstUnlock)
        .set("01234567-89ab-cdef-0123-456789abcdef", key: "kishikawakatsumi")
} catch let error {
    print("error: \(error)")
}
For foreground application
Creating instance
let keychain = Keychain(service: "com.example.github-token")
    .accessibility(.whenUnlocked)

keychain["kishikawakatsumi"] = "01234567-89ab-cdef-0123-456789abcdef"
One-shot
let keychain = Keychain(service: "com.example.github-token")

do {
    try keychain
        .accessibility(.whenUnlocked)
        .set("01234567-89ab-cdef-0123-456789abcdef", key: "kishikawakatsumi")
} catch let error {
    print("error: \(error)")
}

๐Ÿ‘ซ Sharing Keychain items

let keychain = Keychain(service: "com.example.github-token", accessGroup: "12ABCD3E4F.shared")

๐Ÿ”„ Synchronizing Keychain items with iCloud

Creating instance
let keychain = Keychain(service: "com.example.github-token")
    .synchronizable(true)

keychain["kishikawakatsumi"] = "01234567-89ab-cdef-0123-456789abcdef"
One-shot
let keychain = Keychain(service: "com.example.github-token")

do {
    try keychain
        .synchronizable(true)
        .set("01234567-89ab-cdef-0123-456789abcdef", key: "kishikawakatsumi")
} catch let error {
    print("error: \(error)")
}

๐ŸŒ€ Touch ID (Face ID) integration

Any Operation that require authentication must be run in the background thread.
If you run in the main thread, UI thread will lock for the system to try to display the authentication dialog.

To use Face ID, add NSFaceIDUsageDescription key to your Info.plist

๐Ÿ” Adding a Touch ID (Face ID) protected item

If you want to store the Touch ID protected Keychain item, specify accessibility and authenticationPolicy attributes.

let keychain = Keychain(service: "com.example.github-token")

DispatchQueue.global().async {
    do {
        // Should be the secret invalidated when passcode is removed? If not then use `.WhenUnlocked`
        try keychain
            .accessibility(.whenPasscodeSetThisDeviceOnly, authenticationPolicy: .userPresence)
            .set("01234567-89ab-cdef-0123-456789abcdef", key: "kishikawakatsumi")
    } catch let error {
        // Error handling if needed...
    }
}

๐Ÿ” Updating a Touch ID (Face ID) protected item

The same way as when adding.

Do not run in the main thread if there is a possibility that the item you are trying to add already exists, and protected. Because updating protected items requires authentication.

Additionally, you want to show custom authentication prompt message when updating, specify an authenticationPrompt attribute. If the item not protected, the authenticationPrompt parameter just be ignored.

let keychain = Keychain(service: "com.example.github-token")

DispatchQueue.global().async {
    do {
        // Should be the secret invalidated when passcode is removed? If not then use `.WhenUnlocked`
        try keychain
            .accessibility(.whenPasscodeSetThisDeviceOnly, authenticationPolicy: .userPresence)
            .authenticationPrompt("Authenticate to update your access token")
            .set("01234567-89ab-cdef-0123-456789abcdef", key: "kishikawakatsumi")
    } catch let error {
        // Error handling if needed...
    }
}

๐Ÿ” Obtaining a Touch ID (Face ID) protected item

The same way as when you get a normal item. It will be displayed automatically Touch ID or passcode authentication If the item you try to get is protected.
If you want to show custom authentication prompt message, specify an authenticationPrompt attribute. If the item not protected, the authenticationPrompt parameter just be ignored.

let keychain = Keychain(service: "com.example.github-token")

DispatchQueue.global().async {
    do {
        let password = try keychain
            .authenticationPrompt("Authenticate to login to server")
            .get("kishikawakatsumi")

        print("password: \(password)")
    } catch let error {
        // Error handling if needed...
    }
}

๐Ÿ” Removing a Touch ID (Face ID) protected item

The same way as when you remove a normal item. There is no way to show Touch ID or passcode authentication when removing Keychain items.

let keychain = Keychain(service: "com.example.github-token")

do {
    try keychain.remove("kishikawakatsumi")
} catch let error {
    // Error handling if needed...
}

๐Ÿ”‘ Shared Web Credentials

Shared web credentials is a programming interface that enables native iOS apps to share credentials with their website counterparts. For example, a user may log in to a website in Safari, entering a user name and password, and save those credentials using the iCloud Keychain. Later, the user may run a native app from the same developer, and instead of the app requiring the user to reenter a user name and password, shared web credentials gives it access to the credentials that were entered earlier in Safari. The user can also create new accounts, update passwords, or delete her account from within the app. These changes are then saved and used by Safari.
https://developer.apple.com/library/ios/documentation/Security/Reference/SharedWebCredentialsRef/

let keychain = Keychain(server: "https://www.kishikawakatsumi.com", protocolType: .HTTPS)

let username = "[email protected]"

// First, check the credential in the app's Keychain
if let password = try? keychain.get(username) {
    // If found password in the Keychain,
    // then log into the server
} else {
    // If not found password in the Keychain,
    // try to read from Shared Web Credentials
    keychain.getSharedPassword(username) { (password, error) -> () in
        if password != nil {
            // If found password in the Shared Web Credentials,
            // then log into the server
            // and save the password to the Keychain

            keychain[username] = password
        } else {
            // If not found password either in the Keychain also Shared Web Credentials,
            // prompt for username and password

            // Log into server

            // If the login is successful,
            // save the credentials to both the Keychain and the Shared Web Credentials.

            keychain[username] = inputPassword
            keychain.setSharedPassword(inputPassword, account: username)
        }
    }
}

Request all associated domain's credentials

Keychain.requestSharedWebCredential { (credentials, error) -> () in

}

Generate strong random password

Generate strong random password that is in the same format used by Safari autofill (xxx-xxx-xxx-xxx).

let password = Keychain.generatePassword() // => Nhu-GKm-s3n-pMx

How to set up Shared Web Credentials

  1. Add a com.apple.developer.associated-domains entitlement to your app. This entitlement must include all the domains with which you want to share credentials.

  2. Add an apple-app-site-association file to your website. This file must include application identifiers for all the apps with which the site wants to share credentials, and it must be properly signed.

  3. When the app is installed, the system downloads and verifies the site association file for each of its associated domains. If the verification is successful, the app is associated with the domain.

More details:
https://developer.apple.com/library/ios/documentation/Security/Reference/SharedWebCredentialsRef/

๐Ÿ” Debugging

Display all stored items if print keychain object

let keychain = Keychain(server: "https://github.com", protocolType: .https)
print("\(keychain)")
=>
[
  [authenticationType: default, key: kishikawakatsumi, server: github.com, class: internetPassword, protocol: https]
  [authenticationType: default, key: hirohamada, server: github.com, class: internetPassword, protocol: https]
  [authenticationType: default, key: honeylemon, server: github.com, class: internetPassword, protocol: https]
]

Obtaining all stored keys

let keychain = Keychain(server: "https://github.com", protocolType: .https)

let keys = keychain.allKeys()
for key in keys {
  print("key: \(key)")
}
=>
key: kishikawakatsumi
key: hirohamada
key: honeylemon

Obtaining all stored items

let keychain = Keychain(server: "https://github.com", protocolType: .https)

let items = keychain.allItems()
for item in items {
  print("item: \(item)")
}
=>
item: [authenticationType: Default, key: kishikawakatsumi, server: github.com, class: InternetPassword, protocol: https]
item: [authenticationType: Default, key: hirohamada, server: github.com, class: InternetPassword, protocol: https]
item: [authenticationType: Default, key: honeylemon, server: github.com, class: InternetPassword, protocol: https]

Keychain sharing capability

If you encounter the error below, you need to add an Keychain.entitlements.

OSStatus error:[-34018] Internal error when a required entitlement isn't present, client has neither application-identifier nor keychain-access-groups entitlements.

Screen Shot 2019-10-27 at 8 08 50

Requirements

OS Swift
v1.1.x iOS 7+, macOS 10.9+ 1.1
v1.2.x iOS 7+, macOS 10.9+ 1.2
v2.0.x iOS 7+, macOS 10.9+, watchOS 2+ 2.0
v2.1.x iOS 7+, macOS 10.9+, watchOS 2+ 2.0
v2.2.x iOS 8+, macOS 10.9+, watchOS 2+, tvOS 9+ 2.0, 2.1
v2.3.x iOS 8+, macOS 10.9+, watchOS 2+, tvOS 9+ 2.0, 2.1, 2.2
v2.4.x iOS 8+, macOS 10.9+, watchOS 2+, tvOS 9+ 2.2, 2.3
v3.0.x iOS 8+, macOS 10.9+, watchOS 2+, tvOS 9+ 3.x
v3.1.x iOS 8+, macOS 10.9+, watchOS 2+, tvOS 9+ 4.0, 4.1, 4.2
v3.2.x iOS 8+, macOS 10.9+, watchOS 2+, tvOS 9+ 4.0, 4.1, 4.2, 5.0
v4.0.x iOS 8+, macOS 10.9+, watchOS 2+, tvOS 9+ 4.0, 4.1, 4.2, 5.1
v4.1.x iOS 8+, macOS 10.9+, watchOS 3+, tvOS 9+, Mac Catalyst 13+ 4.0, 4.1, 4.2, 5.1

Installation

CocoaPods

KeychainAccess is available through CocoaPods. To install it, simply add the following lines to your Podfile:

use_frameworks!
pod 'KeychainAccess'

Carthage

KeychainAccess is available through Carthage. To install it, simply add the following line to your Cartfile:

github "kishikawakatsumi/KeychainAccess"

Swift Package Manager

KeychainAccess is also available through Swift Package Manager.

Xcode

Select File > Swift Packages > Add Package Dependency...,

CLI

First, create Package.swift that its package declaration includes:

// swift-tools-version:5.0
import PackageDescription

let package = Package(
    name: "MyLibrary",
    products: [
        .library(name: "MyLibrary", targets: ["MyLibrary"]),
    ],
    dependencies: [
        .package(url: "https://github.com/kishikawakatsumi/KeychainAccess.git", from: "3.0.0"),
    ],
    targets: [
        .target(name: "MyLibrary", dependencies: ["KeychainAccess"]),
    ]
)

Then, type

$ swift build

To manually add to your project

  1. Add Lib/KeychainAccess.xcodeproj to your project
  2. Link KeychainAccess.framework with your target
  3. Add Copy Files Build Phase to include the framework to your application bundle

See iOS Example Project as reference.

Author

kishikawa katsumi, [email protected]

License

KeychainAccess is available under the MIT license. See the LICENSE file for more info.

Comments
  • Error -34018 required entitlement

    Error -34018 required entitlement

    Hello,

    I'm frequently getting this error:

    Error Domain=com.kishikawakatsumi.KeychainAccess.error Code=-34018 "Internal error when a required entitlement isn't present, client has neither application-identifier nor keychain-access-groups entitlements."

    I noticed it tends to happen when the application comes back from Background. Any idea where this could come from?

    help wanted 
    opened by arnaudmeunier 82
  • Disable passcode entry completely

    Disable passcode entry completely

    I have tried disabling by using policy authenticationPolicy: .biometryCurrentSet and authenticationPolicy: .biometryAny but after three failed attempts the app asks for a passcode. How do I remove passcode completely?

    opened by kipropkorir 12
  • Application has issues with line 537 let status = SecItemCopyMatching(query as CFDictionary, &result)

    Application has issues with line 537 let status = SecItemCopyMatching(query as CFDictionary, &result)

    Each time my application opens which has a breakpoint for any errors this line stops execution for some reason:

        let status = SecItemCopyMatching(query as CFDictionary, &result)
    

    Any ideas what may be going wrong?

    help wanted 
    opened by dkalinai 12
  • OSStatus error:[-50] with Xcode 8 and swift3

    OSStatus error:[-50] with Xcode 8 and swift3

    I make main app and today extension. I'm using keychain for personal data. so, when i save data in keychain, i did use Keychain(service: , accessGroup: ) and KeychainAccess ver 3.0.1

    //save action @IBAction func btnSave(_ sender: UIButton) { let keychain = Keychain(service: "ABC", accessGroup: "*") keychain[data: keyname] = NSData(data: UIImagePNGRepresentatioin(image)) as Data }

    //get list personal data (in tableViewController)

    let keychain = Keychain(service: "ABC", accessGroup: "*")

    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequ..... cell.textLabel.text = "(keychain.allKeys()[indexPath.row])" return cell }

    sometimes, save data in keychain successfully and show data list. But when one or more data saved in keychain, i can't show data list and show this error message. "osstatus error:[-50] One or more parameters passed to a function were not valid. "

    help wanted 
    opened by Dev-MJ 10
  • KeychainAccess return sometimes empty value

    KeychainAccess return sometimes empty value

    I have a Issue which I don't really understand sometimes the Keychain is empty without any reason. Look's like I have the same Issue like this http://stackoverflow.com/questions/36285783/keychain-sometimes-returns-empty-value

    Other people with the same issue ?

    I observed some other app's like Telegram or Slack where I was kick out sometimes maybe it's a issue from Keychain from Apple. I'm not really sure.. :/

    help wanted 
    opened by BilalReffas 10
  • Keychain on iOS

    Keychain on iOS

    Hi, spoke to you via email - I'm not using you code but hope you might be able to give me some insight into an issue with the C API. I'm not a swift programmer, but think we're basically doing the same thing.

        CFMutableDictionaryRef query = CFDictionaryCreateMutable( nullptr, 10, nullptr, nullptr );
        CFDictionaryAddValue( query, kSecClass, kSecClassGenericPassword );
        CFDictionaryAddValue( query, kSecAttrAccount, "test" );
        CFDictionaryAddValue( query, kSecValueData, "data" );
    
        const auto res = SecItemAdd( query, nullptr );
    

    This code works fine on Mac, but returns error -50 on iOS, which is errSecParam. Looking through you code it seems this should be supported on iOS.

    Cheers

    opened by leehu 8
  • Change SPM library to dynamic instead of static

    Change SPM library to dynamic instead of static

    Hi, since Xcode 11.4b1 I'm unable to use KeychainAccess imported using SwiftPM in main app target and Today widget target at the same time. It's because SwiftPM by default imports dependencies as static library. Is there a chance to update Package.swift manifest to produce dynamic framework? I found out it should be pretty simple and I can send PR if your are open to it.

    opened by marekpridal 8
  • Could not locate installed application Install claimed to have succeeded

    Could not locate installed application Install claimed to have succeeded

    today, My Colleague and I are carthage update for our project.

    build our project is OK, but can't install device

    we replace old framework step by step, and found out KeychainAccess.framework cause the error.

    Xcode alert message: Could not locate installed application Install claimed to have succeeded

    Xcode 11.1 KeychainAccess tag: v3.2.1

    opened by astroboy0803 8
  • Should i call something like synchronize like UserDefaults?

    Should i call something like synchronize like UserDefaults?

    Sometimes seems the tokens are not saved or i can't read them? This class its correct?

    import KeychainAccess

    class DataStorage {

        private static let keychain = Keychain(service: Identifiers.GCalendar)
    
        private struct Identifiers {
            static let GCalendar = "OAuthGoogleCalendar"
            static let token = "the_token_key1"
            static let secretToken = "the_secret_token_key1"
        }
    
        class func saveTokens(token: String, secretToken: String) {
            keychain[string: Identifiers.token] = token
            keychain[string: Identifiers.secretToken] = secretToken
        }
    
        @discardableResult
        class func getTokens() -> (token: String, secretToken: String) {
            return (keychain[Identifiers.token] ?? "", keychain[Identifiers.secretToken] ?? "")
        }
    
        class func existsToken() -> Bool {
            return keychain[Identifiers.token]  != nil
        }
    
        class func removeTokens() {
            do {
                try keychain.remove(Identifiers.token)
                try keychain.remove(Identifiers.secretToken)
            } catch let error {
                print("error removing tokens \(error.localizedDescription)")
            }
        }
    

    }

    help wanted 
    opened by ivanruizscm 8
  • Support Swift 3.0

    Support Swift 3.0

    Support Swift 3.0

    • [x] id is now mapped to Any

      [SE-0116] Import Objective-C id as Swift Any type

    • [x] OptionSetType => OptionSet

    • [x] ErrorType => ErrorProtocol => Error

    • [x] AuthenticationPolicy to be UInt

    • [x] Drop NS prefix

      • [x] NSData => Data
      • [x] NSURL => URL
      • [x] NSIndexSet => IndexSet
    • [x] Lowercase enums (adn OptionSet types)

    Update to Xcode 8 recommended build settings

    • [x] Enable whole module optimazatin (by default on Xcode 8)
    • [x] New code signing

    Tests on Travis CI with Xcode 8beta

    • [x] Fix code signing issue

    Bug fixes

    • [x] Enable to catch specific errors
    opened by kishikawakatsumi 8
  • Check if item exists in keychain without Touch ID auth

    Check if item exists in keychain without Touch ID auth

    Is this possible? Is it possible to see if a value exists at a given key in a keychain secured with Touch ID without prompting the user for their finger print?

    If not, is there a way to check if the keychain, as a whole, exists without prompting for authentication?

    I was torn as to whether I should ask this on here or on StackOverflow. I hope you don't mind me asking here? :innocent: :sweat_smile:. I figured since I'm using your framework and couldn't find anything about my question in the README, I'd be coming back to you with any answer I got on SO to see how I do it via KeychainAccess.

    Many thanks!

    opened by ky1ejs 8
  • First write doesn't trigger Face ID authentication

    First write doesn't trigger Face ID authentication

    I'm using Face ID authentication to protect items in the keychain. However, the authentication dialog is not triggered when a new value is written. Only when reading and overwriting the value for the same id, the dialog is displayed. Is this intended behaviour? Also the string passed to .authenticationPrompt() is never displayed. Where is it supposed to show up?

    func save(data: String, id: String) async {
        try? keychain
          .accessibility(.whenPasscodeSetThisDeviceOnly, authenticationPolicy: [.biometryAny])
          .authenticationPrompt("This text is never shown")
          .set(data, key: id)
      }
    
      func load(id: String) async -> String? {
        try? keychain
          .authenticationPrompt("This text is never shown")
          .get(id)
      }
    
    opened by henriklu 0
  • Designed for iPad (iOS on MacOS) macOS 13.0

    Designed for iPad (iOS on MacOS) macOS 13.0

    if I try to store my credentials I get:

    OSStatus error:[-34018] Internal error when a required entitlement isn't present, client has neither application-identifier nor keychain-access-groups entitlements.

    Do you have any idea on how to solve that

    opened by mariohahn 6
  • Crash

    Crash

    I'm seeing a crash in Crashlytics.

    This is how its being used: Screen Shot 2022-09-25 at 19 13 37

    Crash log:

    0  libsystem_kernel.dylib         0x7b38 __pthread_kill + 8
    1  libsystem_pthread.dylib        0x73bc pthread_kill + 268
    2  libsystem_c.dylib              0x20524 abort + 168
    3  libsystem_malloc.dylib         0x1ca04 _malloc_put + 550
    4  libsystem_malloc.dylib         0x1cc9c malloc_zone_error + 100
    5  libsystem_malloc.dylib         0x170dc nanov2_allocate_from_block + 568
    6  libsystem_malloc.dylib         0x16164 nanov2_allocate + 128
    7  libsystem_malloc.dylib         0x16080 nanov2_malloc + 64
    8  libsystem_malloc.dylib         0x6024 _malloc_zone_malloc + 156
    9  CoreFoundation                 0xe520 __CFBasicHashRehash + 376
    10 CoreFoundation                 0x1fef4 __CFBasicHashAddValue + 104
    11 CoreFoundation                 0x13ae0 CFBasicHashAddValue + 2308
    12 CoreFoundation                 0x5cd18 CFDictionaryAddValue + 348
    13 Security                       0x5674 der_decode_dictionary + 248
    14 Security                       0x13f60 der_decode_plist + 1164
    15 Security                       0x117dc SecXPCDictionaryCopyPList + 120
    16 Security                       0x16ef4 SecXPCDictionaryCopyPListOptional + 72
    17 Security                       0x12ca4 securityd_send_sync_and_do + 136
    18 Security                       0xb81fc cftype_to_bool_cftype_error_request + 160
    19 Security                       0x4938 __SecItemCopyMatching_block_invoke_2 + 224
    20 Security                       0x5318 __SecItemAuthDoQuery_block_invoke + 5
    40
    21 Security                       0x3a90 SecItemAuthDoQuery + 1304
    22 Security                       0x4e80 __SecItemCopyMatching_block_invoke + 140
    23 Security                       0xb19c SecOSStatusWith + 56
    24 Security                       0x4ba4 SecItemCopyMatching + 400
    25 KeychainAccess                 0x7d78 Keychain.getData(_:ignoringAttributeSynchronizable:) + 619 (Keychain.swift:619)
    26 MrsoolSDK                      0x1faa08 specialized Storable<>.tryFetchWithKey(_:_:) + 37 (Keychain.swift:37)
    27 MrsoolSDK                      0x1f0bfc specialized Storable<>.prefethUserData() + 63 (Storable.swift:63)
    28 MrsoolSDK                      0x1f0e14 specialized Storable<>.storedValue() + 95 (Storable.swift:95)
    29 MrsoolSDK                      0x1fad80 specialized static User.current.getter + 60 (User.swift:60)
    30 MrsoolSDK                      0x7a258 specialized BaseRequest.params.getter + 34 (BaseRequest.swift:34)
    31 MrsoolSDK                      0x1ec1a8 specialized SupportConfigurationRequest.params.getter + 4359242152 (<compiler-generated>:4359242152)
    32 MrsoolSDK                      0x1b4f70 Router.support.parameters.getter + 4359016304 (<compiler-generated>:4359016304)
    33 Netjob                         0xb0bc NetworkService.request(endpoint:success:failure:) + 97 (NetworkService.swift:97)
    34 Netjob                         0xcab0 protocol witness for Network.request(endpoint:success:failure:) in conformance NetworkService + 4364176048 (<compiler-generated>:4364176048)
    35 Netjob                         0x8608 Endpoint.request(success:failure:) + 73 (Endpoint.swift:73)
    36 MrsoolSDK                      0x1ea678 static Support.getConfiguration(network:completion:) + 77 (Support.swift:77)
    37 MRSOOL                         0x6b0af0 SupportManager.getConfiguration(completion:) + 74 (SupportManager.swift:74)
    38 MRSOOL                         0x6b4158 protocol witness for MrsoolSupportApiManager.getConfiguration(completion:) in conformance SupportManager + 4304077144 (<compiler-generated>:4304077144)
    39 MrsoolSupport                  0x6d510 static MrsoolSupport.refreshConfigurations(isInitialize:completion:) + 69 (MrsoolSupport.swift:69)
    40 MRSOOL                         0xd0a8a0 AppDelegate.setRichyLanguageIdentity() + 475 (AppDelegate.swift:475)
    41 MRSOOL                         0x534da0 MRLanguageSelectionBottomSheetVC.onClickConfirm(btn:) + 116 (MRLanguageSelectionBottomSheetVC.swift:116)
    42 MRSOOL                         0x534df8 @objc MRLanguageSelectionBottomSheetVC.onClickConfirm(btn:) + 4302507512 (<compiler-generated>:4302507512)
    43 UIKitCore                      0x4c4f1c -[UIApplication sendAction:to:from:forEvent:] + 100
    44 UIKitCore                      0x5ef868 -[UIControl sendAction:to:forEvent:] + 128
    45 UIKitCore                      0x36c7dc -[UIControl _sendActionsForEvents:withEvent:] + 356
    46 UIKitCore                      0x4095b8 -[UIButton _sendActionsForEvents:withEvent:] + 160
    47 UIKitCore                      0x69a9bc -[UIControl touchesEnded:withEvent:] + 520
    48 UIKitCore                      0x1717b4 -[UIWindow _sendTouchesForEvent:] + 980
    49 UIKitCore                      0x1a2a38 -[UIWindow sendEvent:] + 4408
    50 UIKitCore                      0x3506fc -[UIApplication sendEvent:] + 824
    51 MRSOOL                         0xb0b000 CustomApplication.sendEvent(_:) + 28 (CustomApplication.swift:28)
    52 MRSOOL                         0xb0b1a4 @objc CustomApplication.sendEvent(_:) + 4308627876 (<compiler-generated>:4308627876)
    53 UIKitCore                      0x176318 __dispatchPreprocessedEventFromEventQueue + 7856
    54 UIKitCore                      0x16b070 __processEventQueue + 6616
    55 UIKitCore                      0xfbc574 updateCycleEntry + 176
    56 UIKitCore                      0x7d8d5c _UIUpdateSequenceRun + 84
    57 UIKitCore                      0xe5fedc schedulerStepScheduledMainSection + 144
    58 UIKitCore                      0xe5f6a4 runloopSourceCallback + 92
    59 CoreFoundation                 0xbb414 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
    60 CoreFoundation                 0xcc1a0 __CFRunLoopDoSource0 + 208
    61 CoreFoundation                 0x5694 __CFRunLoopDoSources0 + 268
    62 CoreFoundation                 0xb05c __CFRunLoopRun + 828
    63 CoreFoundation                 0x1ebc8 CFRunLoopRunSpecific + 600
    64 GraphicsServices               0x1374 GSEventRunModal + 164
    65 UIKitCore                      0x514b58 -[UIApplication _run] + 1100
    66 UIKitCore                      0x296090 UIApplicationMain + 364
    67 MRSOOL                         0x3f8a08 main + 10 (main.swift:10)
    68 ???                            0x104241da4 (Missing)```
    opened by abdullahumer 0
  • Question: detecting compromised passwords/items

    Question: detecting compromised passwords/items

    iOS recently introduced the ability to see compromised logins in settings from keychain.

    Would it be possible to detect that a user has any of these. I'd be looking just for an event/loop to determine they have some and nothing more, not the login/details just that the compromised logins exist.

    opened by StuartMorris0 0
Releases(v4.2.2)
Owner
Kishikawa Katsumi
iOS developer
Kishikawa Katsumi
Simple Objective-C wrapper for the keychain that works on Mac and iOS

SAMKeychain SAMKeychain is a simple wrapper for accessing accounts, getting passwords, setting passwords, and deleting passwords using the system Keyc

Sam Soffes 5.4k Dec 29, 2022
A wrapper to make it really easy to deal with iOS, macOS, watchOS and Linux Keychain and store your user's credentials securely.

A wrapper (written only in Swift) to make it really easy to deal with iOS, macOS, watchOS and Linux Keychain and store your user's credentials securely.

Ezequiel Aceto 2 Mar 29, 2022
A simple Swift Keychain Wrapper for iOS, watchOS, and OS X.

Latch A simple Swift 2.0 Keychain Wrapper for iOS, watchOS 2, and OS X. Usage A proper example of how to use Latch can be seen in the tests. import La

Danielle 56 Oct 25, 2022
Helper functions for saving text in Keychain securely for iOS, OS X, tvOS and watchOS.

Helper functions for storing text in Keychain for iOS, macOS, tvOS and WatchOS This is a collection of helper functions for saving text and data in th

Evgenii Neumerzhitckii 2.3k Dec 28, 2022
A simple wrapper for the iOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift.

SwiftKeychainWrapper A simple wrapper for the iOS / tvOS Keychain to allow you to use it in a similar fashion to User Defaults. Written in Swift. Prov

Jason 1.5k Dec 30, 2022
A really simple key-value wrapper for keychain.

PlainKeychain A really simple key-value wrapper for keychain. Features โœ… Key-value pairs using kSecClassGenericPassword. โŒ Internet passwords (kSecCla

Benjamin Barnard 0 Nov 27, 2021
RSA public/private key encryption, private key signing and public key verification in Swift using the Swift Package Manager. Works on iOS, macOS, and Linux (work in progress).

BlueRSA Swift cross-platform RSA wrapper library for RSA encryption and signing. Works on supported Apple platforms (using Security framework). Linux

Kitura 122 Dec 16, 2022
RSA public/private key encryption, private key signing and public key verification in Swift using the Swift Package Manager. Works on iOS, macOS, and Linux (work in progress).

BlueRSA Swift cross-platform RSA wrapper library for RSA encryption and signing. Works on supported Apple platforms (using Security framework). Linux

Kitura 122 Dec 16, 2022
Generate passwords and save them in Keychain. Made with SwiftUI.

lockd Generate strong passwords and save them in Keychain. Join lockd Beta on TestFlight: https://testflight.apple.com/join/xJ5AlvS3 Features: Generat

Iliane 56 Dec 29, 2022
A powerful, protocol-oriented library for working with the keychain in Swift.

Locksmith A powerful, protocol-oriented library for working with the keychain in Swift. ?? iOS 8.0+ ?? Mac OS X 10.10+ โŒš๏ธ watchOS 2 ?? tvOS ?? I make

Matthew Palmer 2.9k Dec 21, 2022
KeyClip is yet another Keychain library written in Swift.

KeyClip KeyClip is yet another Keychain library written in Swift. Features Multi Types ( String / NSDictionary / NSData ) Error Handling Settings ( kS

Shinichiro Aska 43 Nov 6, 2022
Very simple swift wrapper for Biometric Authentication Services (Touch ID) on iOS.

SimpleTouch Very simple swift wrapper for Biometric Authentication Services (Touch ID) on iOS. Sample Project There is a SimpleTouchDemo target define

Simple Machines 117 Nov 15, 2022
The IDAGIO WatchOS app using swift

IDAGIORedesignWatchOS I redesigned the IDAGIO WatchOS app as an exercise Old App

Francesco Junior Iaccarino 0 Dec 23, 2021
A wrapper for Apple's Common Crypto library written in Swift.

IDZSwiftCommonCrypto A Swift wrapper for Apple's CommonCrypto library. IDZSwiftCommonCrypto works with both CocoaPods and Cathage. For more details on

idz 472 Dec 12, 2022
Helper/wrapper for mautrix-imessage for jailbroken devices

Brooklyn This readme is out-of-date. Blame Ethan, he's working on it. Components Rubicon "The die is cast." Crosses Apple's last river between IMCore

Ethan Chaffin 11 Jun 24, 2022
Wrapper class for handling all tasks related to RSA cryptography

RSAWrapper Wrapper class for handling all tasks related to RSA cryptography USAG

null 1 Dec 24, 2021
A super simple tool for macOS Swift developers to check validity of a Gumroad-issued software license keys

Gumroad License Validator Overview A super simple tool for macOS Swift developers to check validity of a Gumroad-issued software license keys Requirem

Daniel Kaลกaj 13 Sep 2, 2022
Safe and easy to use crypto for iOS and macOS

Swift-Sodium Swift-Sodium provides a safe and easy to use interface to perform common cryptographic operations on macOS, iOS, tvOS and watchOS. It lev

Frank Denis 483 Jan 5, 2023
Native and encrypted password manager for iOS and macOS.

Open Sesame Native and encrypted password manager for iOS and macOS. What is it? OpenSesame is a free and powerful password manager that lets you mana

OpenSesame 432 Jan 7, 2023