diff --git a/Siren.podspec b/Siren.podspec index 8f355287..df85cf09 100755 --- a/Siren.podspec +++ b/Siren.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| # Version - s.version = "3.5.0" + s.version = "3.5.1" s.swift_version = '4.2' # Meta diff --git a/Sources/Siren.swift b/Sources/Siren.swift index 523891d1..8aa08156 100644 --- a/Sources/Siren.swift +++ b/Sources/Siren.swift @@ -325,14 +325,14 @@ private extension Siren { func updateAlertAction() -> UIAlertAction { let title = localizedUpdateButtonTitle() let action = UIAlertAction(title: title, style: .default) { [weak self] _ in - guard let strongSelf = self else { + guard let self = self else { return } - strongSelf.hideWindow() - strongSelf.launchAppStore() - strongSelf.delegate?.sirenUserDidLaunchAppStore() - strongSelf.alertViewIsVisible = false + self.hideWindow() + self.launchAppStore() + self.delegate?.sirenUserDidLaunchAppStore() + self.alertViewIsVisible = false return } @@ -342,13 +342,13 @@ private extension Siren { func nextTimeAlertAction() -> UIAlertAction { let title = localizedNextTimeButtonTitle() let action = UIAlertAction(title: title, style: .default) { [weak self] _ in - guard let strongSelf = self else { + guard let self = self else { return } - strongSelf.hideWindow() - strongSelf.delegate?.sirenUserDidCancel() - strongSelf.alertViewIsVisible = false + self.hideWindow() + self.delegate?.sirenUserDidCancel() + self.alertViewIsVisible = false return } @@ -358,18 +358,18 @@ private extension Siren { func skipAlertAction() -> UIAlertAction { let title = localizedSkipButtonTitle() let action = UIAlertAction(title: title, style: .default) { [weak self] _ in - guard let strongSelf = self else { + guard let self = self else { return } - if let currentAppStoreVersion = strongSelf.currentAppStoreVersion { + if let currentAppStoreVersion = self.currentAppStoreVersion { UserDefaults.standard.set(currentAppStoreVersion, forKey: SirenDefaults.StoredSkippedVersion.rawValue) UserDefaults.standard.synchronize() } - strongSelf.hideWindow() - strongSelf.delegate?.sirenUserDidSkipVersion() - strongSelf.alertViewIsVisible = false + self.hideWindow() + self.delegate?.sirenUserDidSkipVersion() + self.alertViewIsVisible = false return } @@ -586,7 +586,6 @@ public extension Siren { // MARK: - Enumerated Types (Private) private extension Siren { - /// Siren-specific UserDefaults Keys enum SirenDefaults: String { /// Key that stores the timestamp of the last version check in UserDefaults @@ -595,7 +594,6 @@ private extension Siren { /// Key that stores the version that a user decided to skip in UserDefaults. case StoredSkippedVersion } - } // MARK: - Error Handling diff --git a/Sources/SirenDelegate.swift b/Sources/SirenDelegate.swift index 84946ebd..43c84d2c 100644 --- a/Sources/SirenDelegate.swift +++ b/Sources/SirenDelegate.swift @@ -65,7 +65,6 @@ public protocol SirenDelegate: NSObjectProtocol { // MARK: - SirenDelegate Protocol Extension public extension SirenDelegate { - func sirenDidDetectNewVersionWithoutAlert(title: String, message: String, updateType: UpdateType) { printMessage() } @@ -101,5 +100,4 @@ public extension SirenDelegate { private func printMessage(_ function: String = #function) { SirenLog("The default implementation of \(function) is being called. You can ignore this message if you do not care to implement this method in your `SirenDelegate` conforming structure.") } - }