Skip to content

Commit

Permalink
公开权限状态
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiang1994 committed May 10, 2021
1 parent d787a6d commit 506e254
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PermissionKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = 'PermissionKit'
s.version = '1.3.0'
s.version = '1.4.0'
s.summary = 'An elegant permission manager written in swift'

s.homepage = 'https://github.com/lixiang1994/PermissionKit'
Expand Down
2 changes: 1 addition & 1 deletion Sources/Core/Protocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ extension Permissionable {
}
}

enum PermissionStatus {
public enum PermissionStatus {
case authorized
case denied
case disabled
Expand Down
5 changes: 5 additions & 0 deletions Sources/Core/Provider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ public class Provider {
return manager().status == .authorized
}

/// 授权状态
public var status: PermissionStatus {
return manager().status
}

init(_ manager: @escaping @autoclosure () -> Permissionable) {
self.manager = manager
}
Expand Down

0 comments on commit 506e254

Please sign in to comment.