A SwiftUI package to beautifully display and handle permissions.

Last update: Jun 24, 2022


PermissionsSwiftUI: A SwiftUI package to handle permissions

PermissionsSwiftUI displays and handles permissions in SwiftUI. It is largely inspired by SPPermissions. The UI is highly customizable and resembles an Apple style. If you like the project, please star ★.

PermissionsSwiftUI looks equally gorgeous on both ☀️ light and 🌑 dark mode.

🧭 Navigation

Usage
Additional Information

🖥️ Installation

Requirements

  • iOS 11 (SwiftUI require iOS 13.0) or iPadOS 13
  • Xcode 12 and Swift 5.3
  • tvOS support coming soon
  • No MacOS, and WatchOS support for now

Install

Swift Package Manager (Recommended)

You can install PermissionsSwiftUI into your Xcode project via SPM. To learn more about SPM, click here

  1. In Xcode 12, open your project and navigate to File → Swift Packages → Add Package Dependency...

For Xcode 13, navigate to Files → Add Package

  1. Paste the repository URL (https://github.com/jevonmao/PermissionsSwiftUI) and click Next.
  2. For Version, verify it's Up to next major.
  3. Click Next and ONLY SELECT PERMISSIONS NEEDED else Apple will reject your app

(You don't need to add CorePermissionsSwiftUI or PermissionsSwiftUI)

image

  1. Click Finish
  2. You are all set, thank you for using PermissionsSwiftUI!

Cocoapods (Deprecated)

You can also install PermissionsSwiftUI with Cocoapods. Add pod 'PermissionsSwiftUI' in your podfile:

platform :ios, '14.0'

target 'test abstract' do
  use_frameworks!
  pod 'PermissionsSwiftUI'

end

🚀 Quickstart

Before you start, please star ★ this repository. Your star is my biggest motivation to pull all-nighters and maintain this open source project.

⚠️ v1.4.0 Migration Guide

v1.4 is here! If you encounter any issues, please checkout the migration guide designed to help developers resolve any deprecations and API updates.

Modal Style

To use PermissionsSwiftUI, simply add the JMModal modifier to any view:

.JMModal(showModal: $showModal, for: [.locationAlways, .photo, .microphone])`

Pass in a Binding to show the modal view, and add whatever permissions you want to show. For example:

   struct ContentView: View {
       @State var showModal = false
       var body: some View {
           Button(action: {
               showModal=true
           }, label: {
               Text("Ask user for permissions")
           })
           .JMModal(showModal: $showModal, for: [.locationAlways, .photo, .microphone])
       }
   }

Alert Style

The alert style is equally gorgeous, and allows for more versatile use. It is recommended when you have less than 3 permissions.
To show a permission pop up alert, use:
.JMAlert(showModal: $showModal, for: [.locationAlways, .photo])

Similar to the previous JMPermissions, you need to pass in a Binding to show the view, and add whatever permissions you want to show. To quickly glance all of PermissionsSwiftUI's customization and configurations, checkout the cheatsheet!





🛠️ Usage

Customize Permission Texts

To customize permission texts, use the modifier setPermissionComponent() For example, you can change title, description, and image icon:

.setPermissionComponent(for: .camera, 
                        image: AnyView(Image(systemName: "camera.fill")), 
                        title: "Camcorder",
                        description: "App needs to record videos")

and the result:


Or only change 1 of title and description:
setPermissionComponent(for: .tracking, title: "Trackers")
setPermissionComponent(for: .tracking, description: "Tracking description")

Note:

  • The parameters you don't provide will show the default text
  • Add the setPermissionComponent modifier on your root level view, after JMPermissions modifier

The image parameter accepts AnyView, so feel free to use SF Symbols or your custom asset:

.setPermissionComponent(for: .camera, 
                        image: AnyView(Image("Your-cool-image"))

Even full SwiftUI views will work 😱 :

.setPermissionComponent(for: .camera, 
                        image: AnyView(YourCoolView())

You can use custom text and icon for all the supported permissions, with a single line of code.

Customize Header Texts

To customize the header title, use the modifier changeHeaderTo: Annotated for headers screen

.JMPermissions(showModal: $showModal, for: [.camera, .location, .calendar])
.changeHeaderTo("App Permissions")

To customize the header description, use the modifier changeHeaderDescriptionTo:

.JMPermissions(showModal: $showModal, for: [.camera, .location, .photo])
.changeHeaderDescriptionTo("Instagram need certain permissions in order for all the features to work.")

To customize the bottom description, use the modifier changeBottomDescriptionTo:

.JMPermissions(showModal: $showModal, for: [.camera, .location, .photo])
.changeBottomDescriptionTo("If not allowed, you have to enable permissions in settings")

onAppear and onDisappear Override

You might find it incredibly useful to execute your code, or perform some update action when a PermissionsSwiftUI view appears and disappears.
You can perform some action when PermissionsSwiftUI view appears or disappears by:

.JMPermissions(showModal: $showModal, for: [.locationAlways, .photo, .microphone], onAppear: {}, onDisappear: {})

The onAppear and onDisappear closure parameters will be executed everytime PermissionsSwiftUI view appears and disappears.
The same view modifier closure for state changes are available for the JMAlert modifier:

.JMAlert(showModal: $showModal,
                     for: [.locationAlways, .photo],
                     onAppear: {print("Appeared")},
                     onDisappear: {print("Disappeared")})

Auto Check Authorization

PermissionsSwiftUI by default will automatically check for authorization status. It will only show permissions that are currently notDetermined status. (iOS system prevent developers from asking denied permissions. Allowed permissions will also be ignored by PermissionsSwiftUI). If all permissions are allowed or denied, PermissionsSwiftUI will not show the modal or alert at all. To set auto check authorization, use the autoCheckAuthorization parameter:

.JMModal(showModal: $showModal, for: [.camera], autoCheckAuthorization: false)

same applies for JMAlert

.JMAlert(showModal: $showModal, for: [.camera], autoCheckAuthorization: false)

Auto Dismiss

PermissionsSwiftUI by default will not have any auto dimiss behavior. You can override this behaviour to make it automatically dismiss the modal or alert after user allows the last permission item. (All permissions must be ALLOWED, if any is DENIED, it will not auto dismiss).

.JMModal(... autoDismiss: Bool) -> some View

Pass in true or false to select whether to automatically dismiss the view.

Customize Colors

Using PermissionSwiftUI's capabilities, developers and designers can customize all the UI colors with incredible flexibility. You can fully configure all color at all states with your custom colors.
To easily change the accent color:

.setAccentColor(to: Color(.sRGB, red: 56/255, green: 173/255,
                                  blue: 169/255, opacity: 1))

To change the primary (default Apple blue) and tertiary (default Apple red) colors:

.setAccentColor(toPrimary: Color(.sRGB, red: 56/255, green: 173/255,
                                  blue: 169/255, opacity: 1),
                toTertiary: Color(.systemPink))

⚠️ .setAccentColor() and .setAllowButtonColor() should never be used at the same time.

To unleash the full customization of all button colors under all states, you need to pass in the AllButtonColors struct:

.setAllowButtonColor(to: .init(buttonIdle: ButtonColor(foregroundColor: Color,
                                                               backgroundColor: Color),
                                       buttonAllowed: ButtonColor(foregroundColor: Color,
                                                                  backgroundColor: Color),
                                       buttonDenied: ButtonColor(foregroundColor: Color,
                                                                 backgroundColor: Color)))

For more information regarding the above method, reference the official documentation.

Restrict Dismissal

PermissionsSwiftUI will by default, prevent the user from dismissing the modal and alert, before all permissions have been interacted. This means if the user has not explictly denied or allowed EVERY permission shown, they will not be able to dismiss the PermissionsSwiftUI view. This restrict dismissal behavior can be overriden by the var restrictModalDismissal: Bool or var restrictAlertDismissal: Bool properties. To disable the default restrict dismiss behavior:

.JMModal(showModal: $show, for permissions: [.camera], restrictDismissal: false)

You can also configure with the model:

let model: PermissionStore = {
        var model = PermissionStore()
        model.permissions = [.camera]
        model.restrictModalDismissal = false
        model.restrictAlertDismissal = false
        return model
    }
    ......

    .JMModal(showModal: $showModal, forModel: model)

Configuring Health Permissions

Unlike all the other permissions, the configuration for health permission is a little different. Because Apple require developers to explictly set read and write types, PermissionsSwiftUI greatly simplifies the process.

HKAccess

The structure HKAccess is required when initalizing health permission’s enum associated values. It encapsulates the read and write type permissions for the health permission.

To set read and write health types (activeEnergyBurned is used as example here):

let healthTypes = Set([HKSampleType.quantityType(forIdentifier: .activeEnergyBurned)!])
.JMModal(showModal: $show, for: [.health(categories: .init(readAndWrite: healthTypes))])

//Same exact syntax for JMAlert styles
.JMAlert(showModal: $show, for: [.health(categories: .init(readAndWrite: healthTypes))])

To set read or write individually:

let readTypes = Set([HKSampleType.quantityType(forIdentifier: .activeEnergyBurned)!])
let writeTypes = Set([HKSampleType.quantityType(forIdentifier: .appleStandTime)!])
.JMModal(showModal: $showModal, for: [.health(categories: .init(read: readTypes, write: writeTypes))])

You may also set only read or write type:

let readTypes = Set([HKSampleType.quantityType(forIdentifier: .activeEnergyBurned)!])
.JMModal(showModal: $showModal, for: [.health(categories: .init(read: readTypes))])

📖 Cheatsheat

Modifiers

Customize overall accent color:

setAccentColor(to:)
setAccentColor(toPrimary:toTertiary:)

Customize title:

changeHeaderTo(_:)

Customize top description:

changeHeaderDescriptionTo(_:)

Customize bottom description:

changeBottomDescriptionTo(_:)

Customize each permission's displayed text & image:

setPermissionComponent(for:image:title:description:)

setPermissionComponent(for:title:)

setPermissionComponent(for:description:)

Customize allow button's colors:

setAllowButtonColor(to:)

Automatically dismiss after last

autoDismiss: Bool

Parameters of JMModal and JMAlert

Check authorization before showing modal or alert

autoCheckAuthorization: Bool

Prevent dismissing before all permissions interacted

restrictDismissal: Bool

Do something right before view appear

onAppear: () -> Void

Do something right before view disappear

onDisappear: (() -> Void

🧰 Supported Permissions

Here is a list of all the permissions PermissionsSwiftUI supports. Yup, even the newest tracking permission for iOS 14 so you can stay on top of your game. All permissions in PermissionsSwiftUI come with a default name, description, and a stunning Apple native SF Symbols icon.

Support for FaceID permission is work in progress and coming soon! If you don't find a permission you need, open an issue. Even better, build it yourself and open a pull request, you can follow this step-by-step guide on adding new permissions.


A card of all the permissions

💪 Contribute

Contributions are welcome here for coders and non-coders alike. No matter what your skill level is, you can for certain contribute to PermissionSwiftUI's open source community. Please read contributing.md before starting, and if you are looking to contributing a new type of iOS permission, be sure to read this step-by-step guide.

If you encounter ANY issue, have ANY concerns, or ANY comments, please do NOT hesitate to let me know. Open a discussion, issue, or email me. As a developer, I feel you when you don't understand something in the codebase. I try to comment and document as best as I can, but if you happen to encounter any issues, I will be happy to assist in any way I can.

Additional Information

Acknowledgement

SPPermissions is in large a SwiftUI remake of famous Swift library SPPermissions by @verabeis. SPPermissions was initially created in 2017, and today on GitHub has over 4000 stars. PermissionsSwiftUI aims to deliver a just as beautiful and powerful library in SwiftUI. If you star ★ my project PermissionsSwiftUI, be sure to checkout the original project SPPermissions where I borrowed the UI Design, some parts of README.md page, and important source code references along the way.

License

PermissionsSwiftUI is created by Jingwen (Jevon) Mao and licensed under the MIT License

GitHub

https://github.com/jevonmao/PermissionsSwiftUI
Comments
  • 1. [BUG] - On click of Allow push notifications fails

    Hi, I've set up my iOS app to ask for permissions like so: .JMModal(showModal: self.$showModal, for: [.locationAlways, .notification]) Allowing location successfully changes button to allowed, but allowing push notifications does not change the button to allowed, therefore, I cannot exit the modal.

    However, I do see printouts in my appDelegate's didRegisterForRemoteNotificationsWithDeviceToken: saying that I have successfully registered? Everytime I click allow I see the button. I only see the Apple alert for allowing push notifications the very first time. But, button does not change to allowed.

    To Reproduce Steps to reproduce the behavior:

    1. Show JMModal with .locationAlways and .notification
    2. Allow Notifications
    3. See error

    push notifications should change button to allowed and be able to dismiss.

    Desktop (please complete the following information):

    • OS: iOS
    • Version 1.4

    Smartphone (please complete the following information):

    • Device: iPhone 12 Pro device

    Additional context Add any other context about the problem here.

    Reviewed by smaldd14 at 2021-05-27 02:26
  • 2. Translation for Allow-Button

    Is your feature request related to a problem? Please describe. I know the word Allow is pretty self-explanatory in all languages. But, is there any possibility to change/translate this? I don't see any method for that. Thanks for the help!

    Reviewed by delvinwidjaja at 2021-12-06 12:21
  • 3. [Action] - Permission submodules to avoid info.plist App Store rejection

    Currently PermissionsSwiftUI uses one whole module for all the permissions, resulting in App Store rejection when used. Apple guidelines would require info.plist strings for all permissions referenced in code.

    Tracking bug #77.

    Action items

    • [x] Define submodules in Package.swift
    • [x] Create new directories and move permission managers files accordingly
    • [x] Build & Test, pull request

    (This solution is derived from https://github.com/ivanvorobei/SPPermissions/issues/240)

    Visual Reference

    Apple rejection reason (original text):

    ITMS-90683: Missing Purpose String in Info.plist - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSContactsUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more

    Special Instructions

    Reviewed by jevonmao at 2021-06-13 00:06
  • 4. [BUG] - JMNotificationPermissionManager does not work with iOS 15

    Describe the bug I was building my project with iOS 15 and the library won't build. Starting from iOS 15, UIApplication.shared.registerForRemoteNotifications() cannot be used in extensions anymore and the error suggests to use a ViewController implementation instead.

    To Reproduce Steps to reproduce the behavior:

    1. Install Xcode 13
    2. Build the project
    3. Observe the build process fail

    Expected behavior The framework should build

    Smartphone (please complete the following information):

    • OS: iOS 15
    Reviewed by cipolleschi at 2021-09-01 11:33
  • 5. prevent dismiss modal before allowing all permissions

    Describe the solution you'd like A clear and concise description of what you want to happen.

    I need to prevent user from dismissing modal view before allowing all permissions.

    Reviewed by gharary at 2021-02-28 16:14
  • 6. Add ability to customize accent colour

    The default colour is blue for PermissionsSwiftUI, which doesn't quite work with my app's design.

    For the permission images, I can pass in custom images and provide them with my preferred accent colour.

    For the buttons, there seems to be no way to customize them. I see in the source code "ButtonStatusColor", but as it's not a public class I cannot extend it and over-ride it.

    Being able to pass in an accent colour that when calling .JMModal would be great!

    Reviewed by khuffie at 2021-02-20 21:59
  • 7. Use generics to replace AnyView

    Using AnyView is bad practice, and if it can be replaced (and I believe it can in this case) it should be. With just a few changes, MainView.swift would be modified to look like this:

    struct MainView<BodyView: View>: View {
        private var showModal: Binding<Bool>
        private var bodyView: BodyView
        init(for bodyView: BodyView, show showModal: Binding<Bool>) {
            self.bodyView = bodyView
            self.showModal = showModal
        }
    
        var body: some View {
            bodyView
                .sheet(isPresented: showModal, content: {
                    ModalView(showModal: showModal)
                })
                
        }
    }
    

    AnyView is used in many places and most (if not all) of them can be replaced with generics. This won't break anyone's existing code either, the type will not be MainView, it will be MainView<AnyView>. AnyView should be switched for generics in JMPermission (for the imageIcon) as well. This helps SwiftUI update views more efficiently and prevents always casting the image to AnyView like is currently in the README:

    .setPermissionComponent(for: .camera, 
                            image: AnyView(Image(systemName: "camera.fill")), 
                            title: "Camcorder",
                            description: "App needs to record videos")
    
    Reviewed by johnnythedoggie at 2021-02-10 22:59
  • 8. [BUG] - Trying to ask for tracking permissions with iOS < 14.5 will cause crash

    Describe the bug If you are not using iOS v14.5, the handlePermissionRequest() permission.getPermissionManager()?.init(permissionType: permission) will return nil because version is less than 14.5... This should be correct behavior, however, the next line in handlePermissionRequest() tries to force unwrap permissionManager by doing permissionManager!.requestPermission...

    Would a if permissionManager != nil {} check be enough to suffice?

    To Reproduce Steps to reproduce the behavior:

    1. use iOS simulator with v14.4, add .tracking to JMModal, watch crash

    Expected behavior Should not crash with iOS versions < 14.5... Should just not show tracking permission option

    Reviewed by smaldd14 at 2021-06-09 00:21
  • 9. Unsafe Flags - Can't build any longer

    Describe the bug Here is the alert I get when trying to build: The package product 'PermissionsSwiftUI' cannot be used as a dependency of this target because it uses unsafe build flags. This happens when updating to versions 1.4.0 or 1.4.1. Version 1.3.0 still builds.

    To Reproduce Steps to reproduce the behavior: Just build & run

    Expected behavior A clear and concise description of what you expected to happen.

    Screenshots If applicable, add screenshots to help explain your problem.

    Desktop (please complete the following information):

    • OS: [iOS 14]

    Additional context Add any other context about the problem here.

    Reviewed by macteuts at 2021-04-08 11:06
  • 10. [BUG] - Review rejected due to "PermissionsSwiftUI".

    Describe the bug Adding "PermissionsSwiftUI" to the project will cause the review to be rejected.

    See Screenshots for details.

    To Reproduce Steps to reproduce the behavior:

    1. Add "PermissionsSwiftUI" to the project
    2. Submit your project to App Store Connect

    Screenshots Reject details スクリーンショット 2022-04-18 13 26 30

    スクリーンショット 2022-04-18 13 27 33

    My App Screenshot-0417-091821

    Smartphone (please complete the following information):

    • OS: iOS14.0 〜 iOS15.4.1
    Reviewed by SNQ-2001 at 2022-04-18 04:38
  • 11. [BUG] - EnvironmentObject not found error in ModalView

    Describe the bug Error is

    SwiftUI/EnvironmentObject.swift:70: Fatal error: No ObservableObject of type PermissionStore found. A View.environmentObject(_:) for PermissionStore may be missing as an ancestor of this view.
    2021-12-17 15:56:57.358536+0200 MyTrekking[14483:606357] SwiftUI/EnvironmentObject.swift:70: Fatal error: No ObservableObject of type PermissionStore found. A View.environmentObject(_:) for PermissionStore may be missing as an ancestor of this view.
    (lldb) 
    

    To Reproduce When i have implemented the package usage 1 month ago it worked fine. But last week i tried to make new build and started to get this error. It happens when i lick to allow permissions (location), i see the dialog, click to enable and then this error appears

    Expected behavior Dialog is closed

    Screenshots https://paste.pics/8a3f3e916a72e7b3c6673f1edc3d550e

    Reviewed by doubush at 2021-12-17 14:01
  • 12. [BUG] - iOS 15, dismissal is not working, if the showModal toggles within onAppear function of the view.

    Describe the bug A clear and concise description of what the bug is.

    This bug only present on iOS 15. When, the showModal boolean is set to true in .onAppear. It is not possible to dismiss the modal, unless restrictDismissal is set to false. To Reproduce Steps to reproduce the behavior: Great example would be:

    struct Dashboard: View {
       @State private var showModal: Bool = false
       var body: Some View {
              VStack {
                 //some code
       }.onAppear {
             showModal = true
        }
    }
    

    Expected behavior A clear and concise description of what you expected to happen. Modal with permissions will disappear when the "close" button is pressed

    Screenshots If applicable, add screenshots to help explain your problem. Attached GIF recording of the issue ios15BUG *Desktop (please complete the following information):

    • OS: iOS 15
    • Browser [e.g. chrome, safari]
    • Version [e.g. 22]

    Smartphone (please complete the following information):

    • Device: [e.g. iPhone6]
    • OS: [e.g. iOS8.1]
    • Browser [e.g. stock browser, safari]
    • Version [e.g. 22]

    Additional context Add any other context about the problem here. The issue is present in the simulator and in the physical device.

    Reviewed by sapoepsilon at 2021-10-17 20:08
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

May 31, 2022
Swift Package for fetching approximate user location without asking for their permission 👺 .

Earendil Swift Package for fetching approximate user location without asking for their permission ?? . Get their country, subregion or continent with

Sep 3, 2021
Ported Shamirs Secret Sharing Into A Swift Package

Shamirs-Secret-Sharing-Swift Ported Shamirs Secret Sharing Into A Swift Package Based on Adi Shamir's Secret Sharing (https://en.wikipedia.org/wiki/Sh

May 15, 2022
Swift package wrapping the OpenWall BCrypt hashing algorithm

SwiftBCrypt A simple Swift Package wrapping the OpenWall BCrypt hashing algorithm. Generate Salt let bcryptSalt = try BCRypt.makeSalt() Hash Phrases

Nov 19, 2021
Generate passwords and save them in Keychain. Made with SwiftUI.
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

Jun 6, 2022
Virgil Core SDK allows developers to get up and running with Virgil Cards Service API quickly and add end-to-end security to their new or existing digital solutions to become HIPAA and GDPR compliant and more.
Virgil Core SDK allows developers to get up and running with Virgil Cards Service API quickly and add end-to-end security to their new or existing digital solutions to become HIPAA and GDPR compliant and more.

Virgil Core SDK Objective-C/Swift Introduction | SDK Features | Installation | Configure SDK | Usage Examples | Docs | Support Introduction Virgil Sec

Aug 11, 2021
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

Jun 15, 2022
Native and encrypted password manager for iOS and macOS.
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

Jun 26, 2022
PGPro can encrypt and decrypt messages as well as manage all your OpenPGP keys. It is free, simple and lightweight. Everything stays on your device. PGPro is made in Switzerland.
PGPro can encrypt and decrypt messages as well as manage all your OpenPGP keys. It is free, simple and lightweight. Everything stays on your device. PGPro is made in Switzerland.

PGPro can encrypt and decrypt messages as well as manage all your OpenPGP keys. It is free, simple and lightweight. Everything stays on your device. P

Jun 24, 2022
Simple, secure password and data management for individuals and teams

Padloc Simple, secure password and data management for individuals and teams (formerly known as Padlock). This repo is split into multiple packages: P

Jun 20, 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.

Mar 29, 2022
CryptoSwift is a growing collection of standard and secure cryptographic algorithms implemented in Swift
CryptoSwift is a growing collection of standard and secure cryptographic algorithms implemented in Swift

CryptoSwift Crypto related functions and helpers for Swift implemented in Swift. (#PureSwift) Note: The master branch follows the latest currently rel

Jun 20, 2022
A framework for the JOSE standards JWS, JWE, and JWK written in Swift.

JOSESwift is a modular and extensible framework for the JOSE standards JWS, JWE, and JWK written in Swift. ?? Please note that this implementation of

May 12, 2022
CCCryptor (AES encryption) wrappers for iOS and Mac in Swift. -- For ObjC, see RNCryptor/RNCryptor-objc

RNCryptor Cross-language AES Encryptor/Decryptor data format. The primary targets are Swift and Objective-C, but implementations are available in C, C

Jun 25, 2022
Simple and secure hashing in Swift with the SipHash algorithm

SipHash ⚠️ WARNING This package has been obsoleted by the Hasher type and the Hashable.hash(into:) requirement introduced in Swift 4.2. Using this pac

Apr 13, 2022
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.

Themis provides strong, usable cryptography for busy people General purpose cryptographic library for storage and messaging for iOS (Swift, Obj-C), An

Jun 15, 2022
Helper functions for saving text in Keychain securely for iOS, OS X, tvOS and watchOS.
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

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

KeychainAccess KeychainAccess is a simple Swift wrapper for Keychain that works on iOS and OS X. Makes using Keychain APIs extremely easy and much mor

Jun 22, 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

Jan 29, 2022