explaingit

sparrowcode/permissionskit

5,815SwiftAudience · developerComplexity · 2/5Setup · easy

TLDR

A Swift library for Apple platforms that gives your app a single, unified way to request and check the status of 16 system permissions, camera, microphone, location, contacts, and more, instead of writing different code for each.

Mindmap

mindmap
  root((PermissionsKit))
    What It Does
      Unified permission API
      Request access
      Check permission status
    Permissions Covered
      Camera and Microphone
      Location and Contacts
      Notifications
      Health and Motion
    Tech Stack
      Swift
      SwiftUI and UIKit
      Swift Package Manager
    Platforms
      iOS 12 plus
      macOS and tvOS
      watchOS and visionOS
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Request camera or microphone permission in an iOS app with one consistent function call instead of separate boilerplate for each.

USE CASE 2

Check whether a user has already granted location access before showing a map feature in your SwiftUI or UIKit app.

USE CASE 3

Add only the specific permission modules your app actually needs to avoid Apple App Store rejection for declared-but-unused permissions.

USE CASE 4

Handle notification permission prompts across iOS, macOS, tvOS, and watchOS from a single shared code path.

Tech stack

SwiftSwiftUIUIKitSwift Package ManagerCocoaPodsiOSmacOS

Getting it running

Difficulty · easy Time to first run · 5min

Must select only the specific permission modules your app uses when adding via Swift Package Manager, or Apple may reject the app.

In plain English

PermissionsKit is a Swift library for Apple platforms that gives developers a single, consistent way to request and check the status of system permissions in their apps. When an iOS app wants to access the camera, microphone, location, contacts, or any other protected resource, it must first ask the user for permission. Each of these permissions normally requires different code to handle. PermissionsKit wraps all of them behind one unified interface. The library supports sixteen permissions in total: Bluetooth, Calendar, Camera, Contacts, Face ID, Health, Location, Media Library, Microphone, Motion, Notifications, Photo Library, Reminders, Siri, Speech Recognizer, and App Tracking. For each, you can both request access and check the current status, which will be one of three states: authorized, denied, or not yet determined. It works on iOS 12 and later, and also supports macOS, visionOS, tvOS, and watchOS. It is compatible with both UIKit and SwiftUI, the two main ways of building interfaces for Apple platforms. The library is set up as a modular package, meaning you only include the specific permissions your app actually needs rather than pulling in everything at once. The README notes this is important because Apple may reject apps that declare permissions they do not use. Installation is available through Swift Package Manager, which is the modern standard for adding libraries to Apple platform projects, or through CocoaPods, an older dependency manager that the maintainer still supports but no longer recommends. Adding the library via Xcode requires pointing it at the GitHub repository URL and then selecting the specific permission modules needed. No user interface components are included. The library only handles the logic of requesting and reading permission states.

Copy-paste prompts

Prompt 1
Using PermissionsKit in Swift, show me how to request camera permission and handle all three states: authorized, denied, and not determined.
Prompt 2
I'm building a SwiftUI app that needs microphone and notification permissions. Write the Swift code to request both using PermissionsKit.
Prompt 3
Add PermissionsKit to my Xcode project via Swift Package Manager, select only the Location and Contacts modules, and show me how to check their current status before accessing those resources.
Prompt 4
My iOS app uses Health and Motion data. Show me how to request both permissions with PermissionsKit and respond appropriately if the user denies either one.
Prompt 5
Using PermissionsKit, write a permissions onboarding screen in SwiftUI that requests camera, microphone, and photo library access in sequence.
Open on GitHub → Explain another repo

← sparrowcode on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.