Skip to content

Commit

Permalink
Update to 4.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed Oct 31, 2019
1 parent f3a032f commit 171daba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SPPermission.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "SPPermission"
s.version = "4.0.6"
s.version = "4.0.8"
s.summary = "A unified API to ask for permissions on iOS. Available dialog UI."
s.homepage = "https://github.com/IvanVorobei/SPPermission"
s.source = { :git => "https://github.com/IvanVorobei/SPPermission.git", :tag => s.version }
Expand Down
10 changes: 10 additions & 0 deletions Source/SPPermission/Dialog/SPPermissionDialog.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ extension SPPermission {
controller.present(on: viewController)
}
}

public static func requestIfNeeded(with permissions: [SPPermissionType], on viewController: UIViewController, delegate: SPPermissionDialogDelegate? = nil, dataSource: SPPermissionDialogDataSource? = nil) {

request(
with: permissions.filter { SPPermission.isAllowed($0) == false },
on: viewController,
delegate: delegate,
dataSource: dataSource
)
}
}
}

Expand Down

0 comments on commit 171daba

Please sign in to comment.