Skip to content

Commit

Permalink
Clean code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed Apr 19, 2022
1 parent 0eecabe commit 621497d
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 26 deletions.
20 changes: 10 additions & 10 deletions README.md
Expand Up @@ -11,22 +11,22 @@
Availalbe three ready-use interface - list, dialog & native. Supports iPad, dark mode and has ready localizations. Also you can check state of permissions, available are `.authorized`, `.denied` & `.notDetermined`.

<p float="left">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/bluetooth.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/calendar.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/camera.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/photos.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/notifications.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/contacts.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/faceid.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/health.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/location.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/music.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/microphone.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/calendar.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/contacts.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/reminders.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/motion.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/music.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/notifications.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/photos.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/reminders.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/siri.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/speech.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/bluetooth.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/health.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/tracking.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/faceid.png" width="38">
<img src="https://cdn.sparrowcode.io/github/permissionskit/icons/siri.png" width="38">
</p>

### Community
Expand Down
Expand Up @@ -24,18 +24,17 @@ import PermissionsKit
#endif

#if os(iOS) && PERMISSIONSKIT_REMINDERS

import Foundation
import EventKit

public extension Permission {

static var reminders: SPRemindersPermission {
return SPRemindersPermission()
static var reminders: RemindersPermission {
return RemindersPermission()
}
}

public class SPRemindersPermission: Permission {
public class RemindersPermission: Permission {

open override var kind: Permission.Kind { .reminders }
open var usageDescriptionKey: String? { "NSRemindersUsageDescription" }
Expand Down
Expand Up @@ -24,18 +24,17 @@ import PermissionsKit
#endif

#if os(iOS) && PERMISSIONSKIT_SIRI

import Foundation
import Intents

public extension Permission {

static var siri: SPSiriPermission {
return SPSiriPermission()
static var siri: SiriPermission {
return SiriPermission()
}
}

public class SPSiriPermission: Permission {
public class SiriPermission: Permission {

open override var kind: Permission.Kind { .siri }
open var usageDescriptionKey: String? { "NSSiriUsageDescription" }
Expand Down
Expand Up @@ -24,18 +24,17 @@ import PermissionsKit
#endif

#if os(iOS) && PERMISSIONSKIT_SPEECH

import Foundation
import Speech

public extension Permission {

static var speech: SPSpeechPermission {
return SPSpeechPermission()
static var speech: SpeechPermission {
return SpeechPermission()
}
}

public class SPSpeechPermission: Permission {
public class SpeechPermission: Permission {

open override var kind: Permission.Kind { .speech }
open var usageDescriptionKey: String? { "NSSpeechRecognitionUsageDescription" }
Expand Down
Expand Up @@ -24,19 +24,18 @@ import PermissionsKit
#endif

#if PERMISSIONSKIT_TRACKING

import AppTrackingTransparency

@available(iOS 14.5, tvOS 14.5, *)
public extension Permission {

static var tracking: SPTrackingPermission {
return SPTrackingPermission()
static var tracking: TrackingPermission {
return TrackingPermission()
}
}

@available(iOS 14.5, tvOS 14.5, *)
public class SPTrackingPermission: Permission {
public class TrackingPermission: Permission {

open override var kind: Permission.Kind { .tracking }
open var usageDescriptionKey: String? { "NSUserTrackingUsageDescription" }
Expand Down

0 comments on commit 621497d

Please sign in to comment.