Swiftpack.co - Darktt/DTPermissionKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Darktt.
Darktt/DTPermissionKit 0.0.5
Check iOS permission
⭐️ 0
🕓 2 years ago
iOS
.package(url: "https://github.com/Darktt/DTPermissionKit.git", from: "0.0.5")

DTPermissionKit

Check iOS permission

Usage:

// Request camera permission.
let premission = DTPermission.camera
premission.request {
    
    status in
    
    switch status {
    
    case .authorized:
        // Can access camera.
        break
    
    case .denied:
        // User denied camera access permission.
        break
    
    case .notDetermined:
        // User not determine.
        break
    
    default:
        // Other case.
        break
    }
}

Note: When summit app to Apple Store Connect, you need add all privacy, then just write description of requested permission on you app, other description can be empty.

GitHub

link
Stars: 0
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics