Skip to content

Commit

Permalink
Merged with master after mergining #54 and #55
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtSabintsev committed Apr 27, 2016
2 parents f735dfb + 3ec8d95 commit 78dd7ea
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Siren/Siren.swift
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public enum SirenLanguageType: String {
*/
private enum SirenErrorCode: Int {
case MalformedURL = 1000
case RecentlyCheckedAlready
case NoUpdateAvailable
case AppStoreDataRetrievalFailure
case AppStoreJSONParsingFailure
Expand All @@ -109,6 +110,7 @@ private enum SirenErrorCode: Int {
*/
private enum SirenErrorType: ErrorType {
case MalformedURL
case MissingBundleIdOrAppId
}

/**
Expand Down Expand Up @@ -149,7 +151,7 @@ public final class Siren: NSObject {
The SirenDelegate variable, which should be set if you'd like to be notified:
- When a user views or interacts with the alert
- sirenDidShowUpdateDialog()
- sirenDidShowUpdateDialog(alertType: SirenAlertType)
- sirenUserDidLaunchAppStore()
- sirenUserDidSkipVersion()
- sirenUserDidCancel()
Expand Down Expand Up @@ -216,7 +218,7 @@ public final class Siren: NSObject {
See the SirenAlertType enum for full details.
*/
public lazy var revisionUpdateAlertType = SirenAlertType.Option

// Optional Vars
/**
The name of your app.
Expand Down Expand Up @@ -294,7 +296,7 @@ public final class Siren: NSObject {
if daysSinceLastVersionCheckDate(lastVersionCheckPerformedOnDate) >= checkType.rawValue {
performVersionCheck()
} else {
postError(.NoUpdateAvailable, underlyingError: nil)
postError(.RecentlyCheckedAlready, underlyingError: nil)
}
}
}
Expand Down Expand Up @@ -678,14 +680,16 @@ private extension Siren {
switch code {
case .MalformedURL:
description = "The iTunes URL is malformed. Please leave an issue on http://github.com/ArtSabintsev/Siren with as many details as possible."
case .RecentlyCheckedAlready:
description = "Not checking the version, because it already checked recently."
case .NoUpdateAvailable:
description = "No new update available."
case .AppStoreDataRetrievalFailure:
description = "Error retrieving App Store data as an error was returned."
case .AppStoreJSONParsingFailure:
description = "Error parsing App Store JSON data."
case .AppStoreVersionNumberFailure:
description = "Error retrieving App Store verson number as there was no data returned."
description = "Error retrieving App Store version number as there was no data returned."
case .AppStoreVersionArrayFailure:
description = "Error retrieving App Store verson number as results[0] does not contain a 'version' key."
case .AppStoreAppIDFailure:
Expand Down

0 comments on commit 78dd7ea

Please sign in to comment.