XUtils

SPPermission

Simple request permission with native UI and interactive animation.


iOS Dev Community

Swift Package Manager

In Xcode go to Project -> Your Project Name -> Package Dependencies -> Tap Plus. Insert url:

https://github.com/sparrowcode/PermissionsKit

Next, choose the permissions that you need. But don’t add all of them, because apple will reject app. Or adding it to the dependencies of your Package.swift:

dependencies: [
    .package(url: "https://github.com/sparrowcode/PermissionsKit", .upToNextMajor(from: "10.0.1"))
]

and choose valid targets.

Why Modules

If put all code to one package and compile it, Apple Review Team will see a lot of calls to permissions API and ask you provide reason why you really need it permissions. Modules allow compile only really using code parts. Just select only which you need.

[!WARNING] Import only the permissions you really need.

Request Permission

import PermissionsKit
import NotificationPermission

Permission.notification.request {
    
}

Get Status Permission

import PermissionsKit
import NotificationPermission

let authorized = Permission.notification.authorized

[!WARNING] For FaceID permission no way detect if request .authorized or .notDetermined accurate. Status .denied detect well. For now for both states return .notDetermined.

Apps Using

If you use a PermissionsKit, add your app via Pull Request.


Articles

  • coming soon...