Skip to content

Commit

Permalink
Merge pull request #100 from ennioma/develop
Browse files Browse the repository at this point in the history
Release 1.7.0
  • Loading branch information
ennioma authored Dec 13, 2017
2 parents 9b10dca + 1cbd13b commit 21ae360
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 58 deletions.
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "Codeido/PMAlertController"
github "Codeido/PMAlertController", "3.1.0"
100 changes: 50 additions & 50 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
PODS:
- arek (1.6.0):
- arek/Bluetooth (= 1.6.0)
- arek/Camera (= 1.6.0)
- arek/CloudKit (= 1.6.0)
- arek/Contacts (= 1.6.0)
- arek/Core (= 1.6.0)
- arek/Events (= 1.6.0)
- arek/Health (= 1.6.0)
- arek/Location (= 1.6.0)
- arek/MediaLibrary (= 1.6.0)
- arek/Microphone (= 1.6.0)
- arek/Motion (= 1.6.0)
- arek/Notifications (= 1.6.0)
- arek/Photos (= 1.6.0)
- arek/Reminders (= 1.6.0)
- arek/SpeechRecognizer (= 1.6.0)
- PMAlertController (= 2.1.2)
- arek/Bluetooth (1.6.0):
- arek (1.7.0):
- arek/Bluetooth (= 1.7.0)
- arek/Camera (= 1.7.0)
- arek/CloudKit (= 1.7.0)
- arek/Contacts (= 1.7.0)
- arek/Core (= 1.7.0)
- arek/Events (= 1.7.0)
- arek/Health (= 1.7.0)
- arek/Location (= 1.7.0)
- arek/MediaLibrary (= 1.7.0)
- arek/Microphone (= 1.7.0)
- arek/Motion (= 1.7.0)
- arek/Notifications (= 1.7.0)
- arek/Photos (= 1.7.0)
- arek/Reminders (= 1.7.0)
- arek/SpeechRecognizer (= 1.7.0)
- PMAlertController (= 3.1.0)
- arek/Bluetooth (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- arek/Camera (1.6.0):
- PMAlertController (= 3.1.0)
- arek/Camera (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- arek/CloudKit (1.6.0):
- PMAlertController (= 3.1.0)
- arek/CloudKit (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- arek/Contacts (1.6.0):
- PMAlertController (= 3.1.0)
- arek/Contacts (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- arek/Core (1.6.0):
- PMAlertController (= 2.1.2)
- arek/Events (1.6.0):
- PMAlertController (= 3.1.0)
- arek/Core (1.7.0):
- PMAlertController (= 3.1.0)
- arek/Events (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- arek/Health (1.6.0):
- PMAlertController (= 3.1.0)
- arek/Health (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- arek/Location (1.6.0):
- PMAlertController (= 3.1.0)
- arek/Location (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- arek/MediaLibrary (1.6.0):
- PMAlertController (= 3.1.0)
- arek/MediaLibrary (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- arek/Microphone (1.6.0):
- PMAlertController (= 3.1.0)
- arek/Microphone (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- arek/Motion (1.6.0):
- PMAlertController (= 3.1.0)
- arek/Motion (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- arek/Notifications (1.6.0):
- PMAlertController (= 3.1.0)
- arek/Notifications (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- arek/Photos (1.6.0):
- PMAlertController (= 3.1.0)
- arek/Photos (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- arek/Reminders (1.6.0):
- PMAlertController (= 3.1.0)
- arek/Reminders (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- arek/SpeechRecognizer (1.6.0):
- PMAlertController (= 3.1.0)
- arek/SpeechRecognizer (1.7.0):
- arek/Core
- PMAlertController (= 2.1.2)
- PMAlertController (2.1.2)
- PMAlertController (= 3.1.0)
- PMAlertController (3.1.0)

DEPENDENCIES:
- arek (from `../`)
Expand All @@ -70,8 +70,8 @@ EXTERNAL SOURCES:
:path: ../

SPEC CHECKSUMS:
arek: 24c5e1ece5f7c9c93a08f10243e717c78b26548c
PMAlertController: 0fbcc3d1cee86ee0bd85f693ca85f6388e504ec8
arek: 234fa1d86f1950b9531f3d22aba75a1c7685add6
PMAlertController: 2c9f27b318e5adf685ba10737ff84be0a3ac5618

PODFILE CHECKSUM: 51391b981566b427912c687e0f5ba15813bf3aa4

Expand Down
2 changes: 2 additions & 0 deletions Example/arek_example/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
<string>Let me read your contacts!</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Get me the Location Dude!</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Want to write to your photos!</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Want to access your photos!</string>
<key>NSRemindersUsageDescription</key>
Expand Down
4 changes: 2 additions & 2 deletions arek.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'arek'
s.version = '1.6.0'
s.version = '1.7.0'
s.summary = 'AREK is a clean and easy to use wrapper over any kind of iOS permission.'
s.homepage = 'https://github.com/ennioma/arek'
s.license = { :type => 'MIT', :file => 'LICENSE'}
Expand All @@ -10,7 +10,7 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '9.0'
s.source_files = 'code/Classes/**/*', 'code/Classes/Core/**/*', 'code/Classes/Permissions/**/*'
s.exclude_files = 'Example/*'
s.dependency 'PMAlertController', '2.1.2'
s.dependency 'PMAlertController', '3.1.0'

s.subspec 'Core' do |ss|
ss.source_files = 'code/Classes/Core/**/*.swift'
Expand Down
12 changes: 8 additions & 4 deletions code/Classes/Core/Arek.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,10 @@ open class ArekBasePermission {
while let presentedViewController = topController.presentedViewController {
topController = presentedViewController
}

topController.present(alertVC, animated: true, completion: nil)

DispatchQueue.main.async {
topController.present(alertVC, animated: true, completion: nil)
}
}
}

Expand All @@ -152,8 +154,10 @@ open class ArekBasePermission {
while let presentedViewController = topController.presentedViewController {
topController = presentedViewController
}

topController.present(alert, animated: true, completion: nil)

DispatchQueue.main.async {
topController.present(alert, animated: true, completion: nil)
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion code/Classes/Permissions/ArekNotifications.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ open class ArekNotifications: ArekBasePermission, ArekPermissionProtocol {

open func askForPermission(completion: @escaping ArekPermissionResponse) {
if #available(iOS 10.0, *) {
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge]) { (granted, error) in
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { (granted, error) in
if let error = error {
print("[🚨 Arek 🚨] Push notifications permission not determined 🤔, error: \(error)")
return completion(.notDetermined)
Expand Down

0 comments on commit 21ae360

Please sign in to comment.