KeychainAccess | Simple Swift wrapper for Keychain that works on iOS | iOS library

 by   kishikawakatsumi Swift Version: v4.2.2 License: MIT

kandi X-RAY | KeychainAccess Summary

kandi X-RAY | KeychainAccess Summary

KeychainAccess is a Swift library typically used in Mobile, iOS, Xcode applications. KeychainAccess has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

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.

            kandi-support Support

              KeychainAccess has a medium active ecosystem.
              It has 7406 star(s) with 741 fork(s). There are 129 watchers for this library.
              It had no major release in the last 12 months.
              There are 40 open issues and 198 have been closed. On average issues are closed in 46 days. There are 10 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of KeychainAccess is v4.2.2

            kandi-Quality Quality

              KeychainAccess has 0 bugs and 0 code smells.

            kandi-Security Security

              KeychainAccess has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              KeychainAccess code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              KeychainAccess is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              KeychainAccess releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of KeychainAccess
            Get all kandi verified functions for this library.

            KeychainAccess Key Features

            No Key Features are available at this moment for KeychainAccess.

            KeychainAccess Examples and Code Snippets

            No Code Snippets are available at this moment for KeychainAccess.

            Community Discussions


            Self-signed SSL certificate (added to Keychain and marked Trusted) is displayed Invalid in Chrome
            Asked 2021-Feb-26 at 08:12

            I've created Root CA, Root PEM. Then I've created mysite.key and mysite.crt for my website running on mysite.localhost Root PEM is added to Keychain and is marked as Always trust

            When I visit my website on the left of the address bar I see Not Secure note. When I click on it, it is read that the Certificate is Invalid.

            However, when I go further in the popup I see a chain where my Root CA cert IS trusted, My website cert IS valid. When I expand a "trust" section for the website and set it to "always trust" those changes are not saved.

            What am I doing wrong? I'd like to get rid of this notice since I've marked my certificate as trusted.

            UPDATE I've checked the certificates with openssl s_client



            Answered 2021-Feb-26 at 08:12

            Not sure what was the initial Chrome complaint, but when I visited my page the last time and expanded "Unsafe", "Proceed" and so on, I've noticed the error: NET::ERR_CERT_VALIDITY_TOO_LONG. That was because in my generation script I was so greedy and set a validity period for 999 days, and that was too much for Chrome. I've set 365 days and now it's working.

            I've put my scripts for Root CA generation and Self-signed SSL Certificates generation in my repo.

            Hope it will help some other people. Any notices are welcomed.

            And thanx to @Allan Wind for helping me in comments ;)



            Multiple targets match implicit dependency for linker flags
            Asked 2020-Dec-10 at 11:34

            This is the full warning I get:

            Multiple targets match implicit dependency for linker flags '-framework GTMSessionFetcher'. Consider adding an explicit dependency on the intended target to resolve this ambiguity. (in target 'Wishlists' from project 'Wishlists')

            What is the reason for this and how can I resolve it? This also leads to this error.

            I have a Main-App and a ShareExtension.

            This is my podfile:



            Answered 2020-Dec-10 at 11:34

            This happens when a Podfile has multiple targets, each of which has an implicit dependency on another pod.

            The solution is to make that dependency explicit, at the top level. In your case, that means inserting the following:



            How to Save In App Purchase state in Keychain
            Asked 2020-Sep-14 at 15:41

            Inside my app the user can purchase a non-consumable product. My problem right now is that I don't quite know how to store the information correctly wether or not a user has bought the product or not. I read the User Defaults is not the most secure way, so I tried it with Keychain. For that I am using this helper lib.

            Now this is how I tried implementing it:



            Answered 2020-Sep-14 at 15:41

            This entirely depends on your application logic, the Keychain is working as expected: you save something to it, then read it out again (unchanged). The Keychain has no way of knowing what other kinds of logic is taking place in your app.

            That said, you could do something simple like just storing each user's unlock state with a different key in the Keychain, based off some kind of user identifier.



            Not able to export the cer file to .p12 file, option is disabled
            Asked 2020-Aug-24 at 09:20

            I have created the new distribution certificate in apple portal from my keychainAccess->Preferences->Request a Certificate from Certificate Authority. After installing the .cer file, i am not able to get the private key, basically p12 option is disabled while exporting the certificate. Tried multiple times, by revoking the certificate and repeating the same steps, but still facing the problem. screenshot1




            Answered 2020-Aug-24 at 09:20

            Change keychains from System to Login

            Then Try to Export items.

            Also check while installing .cer file add to Login instead of System.



            "Command PhaseScriptExecution failed with a nonzero exit code" when archiving
            Asked 2020-Jun-10 at 16:28

            so I have an app built with Expo but then ejected to get ios and android folder everything works fine on both android and ios I have published it for android but on ios when I try to archive the project it gives me an error Command PhaseScriptExecution failed with nonzero exit code i don't know what's causing this error I have read a lot of StackOverflow questions tried a lot of things but with no luck here's what I tried so far.

            I tried:

            • removing pod lock file, removing pod folder, doing pod deintegrate, doing pod update
              • locking and unlocking the login in keychainAccess
              • cleaning build folder in xcode
              • restarting my laptop and xcode
              • changing to legacy build system from new build system
              • removing DerivedData folder and cleaning Xcode
            • upgrading cocopods and doing pod install again

            Okay so before, building with Command+B also didn't work but now i went to Targets->App name->build phases->bundle expo assets-> and checked the " run script only while installing" option and building started working but archiving still doesn't work

            along with the above error i also noticed another error on xcode

            So please if anyone has any ideas why this is happening, please?



            Answered 2020-Jun-10 at 16:28

            Solution 1:

            it is due to Bare Expo Bundle Assets

            here is the actual issue raised on forum:

            this pull (fix) request has merged into master



            update your expo-cli to expo-cli@3.19.2 or higher



            How properly add MacOS Signature & Notarization to .app built with Qt
            Asked 2020-May-29 at 12:24

            I have an application (built with Qt / QML) that I am trying to sign and notarize for Ad hoc distribution outside the App Store (it's for internal company use). Apple confirms that my software has been notarized, and I then staple my .app - but Gatekeeper still stops the application from running and alerts users:

            App Name can’t be opened because Apple cannot check it for malicious software.

            What am I doing wrong?.

            Here are the steps that I am following:

            1. Ran QMake / Build in Qt Creator.

            2. Modified the CFBundleIdentifier key in the generated Info.plist file to be com.myCompanyName.appName instead of com.yourcompany.appName as generated by Qt.

            3. cd to my build dir.

            4. Ran macdeployqt:
              /Users//Qt/5.13.0/clang_64/bin/macdeployqt .app -qmldir=.

            5. Code Sign:
              codesign --deep -f -s "Developer ID Application: ()" --options "runtime" ".app/"
              (Where the developer id application is the name as it appears in KeychainAccess).

            6. Verified that the signature:
              codesign -dv --verbose=4 .app



            Answered 2020-May-29 at 12:24

            The problem is that since you are distributing using a .dmg you need to notarize the .dmg as well. Please follow these steps:

            1) Add your notarized and stapled app to the .dmg.

            2) Notarize your .dmg file.

            3) Staple the notarization to the .dmg file.

            You can use the following bash script I created which allows you to create a notarization request, check notarization request staus and staple notarization:



            OSStatus error:[-34018] Internal error when a required entitlement isn't present error on device
            Asked 2020-Apr-30 at 14:57

            I am trying to implement keychain sharing using KeyChainAccess. I have build two very basic applications: App One that writes a string to a shared keychain, and App Two that reads the data from the shared keychain and displays it.

            My code for App One:



            Answered 2020-Apr-30 at 14:57

            I had the same issue. And the solution was very easy. Check once again accessGroup parameter in Keychain initializer. For example, you add the Keychain Group in Capabilities with the name "". But it is not the full name of accessGroup. To solve the issue just prepend "App ID prefix" to the keychain group name. You can find this prefix in your apple developer account inside your App ID configuration. The full accessGroup name will be "", where XXXXXXXXXX is your App ID prefix.



            Can't run Xcode project on device even I did deep clean and reinstall Xcode, always error with Keychain
            Asked 2020-Apr-01 at 15:27

            Everything was doing well, running multiple projects on simulators and on my three test devices (iPhone 8, iPhone 8 plus, and this current iPhone 11 (iOS 11.3.1)) until just one moment, when started to shows up this error, when I'm trying to run project on device. On simulator, it still works well.

            Went through many of adviced steps, StackOverflow answers and even I cleaned up everything related to the XCode (in that time I already updated XCode on 11.4): deleted ~/Library/Developer/ , ~/Library/Caches/ ; reinstall it and now it still doesn't work.

            This becomes really frustrating and I would really appreciate for someone's help, who already have faced this problem, and I hope had resolved this.



            Answered 2020-Mar-31 at 13:40

            It sounds like something went wrong with KeychainAccess. Perhaps try to run pod install again to update your KeychainAccess Pod. If that doesn't work, try to run pod deintegrate and then pod install again.


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install KeychainAccess

            You can download it from GitHub.


            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone kishikawakatsumi/KeychainAccess

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular iOS Libraries


            by apple


            by ionic-team


            by vsouza


            by fastlane


            by bumptech

            Try Top Libraries by kishikawakatsumi


            by kishikawakatsumiSwift


            by kishikawakatsumiJavaScript


            by kishikawakatsumiSwift


            by kishikawakatsumiSwift


            by kishikawakatsumiTypeScript