diff --git a/README.md b/README.md
index b189d05..953c7dd 100755
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
- [x] Rich set of delegate methods
- [x] [Fully documented ](https://appversion.ameba.co)
- [x] Good test coverage
-- [x] [Small code base](https://github.com/amebalabs/AppVersion/master/.cloc.report)
+- [x] [Small code base](https://github.com/amebalabs/AppVersion/blob/master/.cloc.report)
- [x] No external dependencies
- [x] Available through all major package managers: Cocoapods, Cartage and Swift Package Manager
@@ -32,12 +32,12 @@
3. Blocking alert
-
+
### Custom UILabel and UITableView footer
-
+
- Four formatting options available(`AppInfo.VersionFormat`):
diff --git a/docs/Classes.html b/docs/Classes.html
index 8e6ad6f..d0f3707 100644
--- a/docs/Classes.html
+++ b/docs/Classes.html
@@ -165,7 +165,7 @@ Declaration
diff --git a/docs/Classes/AppVersion.html b/docs/Classes/AppVersion.html
index 0f99712..7a33fe1 100644
--- a/docs/Classes/AppVersion.html
+++ b/docs/Classes/AppVersion.html
@@ -744,7 +744,7 @@ Declaration
diff --git a/docs/Classes/AppVersion/AlertType.html b/docs/Classes/AppVersion/AlertType.html
index dac0965..92becc8 100644
--- a/docs/Classes/AppVersion/AlertType.html
+++ b/docs/Classes/AppVersion/AlertType.html
@@ -189,7 +189,7 @@ Declaration
diff --git a/docs/Classes/AppVersionLabel.html b/docs/Classes/AppVersionLabel.html
index 0938049..cc9413f 100644
--- a/docs/Classes/AppVersionLabel.html
+++ b/docs/Classes/AppVersionLabel.html
@@ -191,7 +191,7 @@ Declaration
diff --git a/docs/Extensions.html b/docs/Extensions.html
index c441146..b1fc0a6 100644
--- a/docs/Extensions.html
+++ b/docs/Extensions.html
@@ -129,7 +129,7 @@ Declaration
diff --git a/docs/Extensions/UITableView.html b/docs/Extensions/UITableView.html
index 3f5555b..17446b2 100644
--- a/docs/Extensions/UITableView.html
+++ b/docs/Extensions/UITableView.html
@@ -193,7 +193,7 @@ Parameters
diff --git a/docs/Protocols.html b/docs/Protocols.html
index 7381d3c..5e35285 100644
--- a/docs/Protocols.html
+++ b/docs/Protocols.html
@@ -130,7 +130,7 @@ Declaration
diff --git a/docs/Protocols/AppVersionDelegate.html b/docs/Protocols/AppVersionDelegate.html
index c80e542..eafcb49 100644
--- a/docs/Protocols/AppVersionDelegate.html
+++ b/docs/Protocols/AppVersionDelegate.html
@@ -550,7 +550,7 @@ Declaration
diff --git a/docs/Structs.html b/docs/Structs.html
index 87bbffa..9838853 100644
--- a/docs/Structs.html
+++ b/docs/Structs.html
@@ -194,7 +194,7 @@ Declaration
diff --git a/docs/Structs/AppInfo.html b/docs/Structs/AppInfo.html
index 1b292c1..8c4176d 100644
--- a/docs/Structs/AppInfo.html
+++ b/docs/Structs/AppInfo.html
@@ -360,7 +360,7 @@ Return Value
diff --git a/docs/Structs/AppInfo/VersionFormat.html b/docs/Structs/AppInfo/VersionFormat.html
index b077e42..d1adca0 100644
--- a/docs/Structs/AppInfo/VersionFormat.html
+++ b/docs/Structs/AppInfo/VersionFormat.html
@@ -216,7 +216,7 @@ Declaration
diff --git a/docs/Structs/AppStoreVersion.html b/docs/Structs/AppStoreVersion.html
index 9f24b00..3c4f365 100644
--- a/docs/Structs/AppStoreVersion.html
+++ b/docs/Structs/AppStoreVersion.html
@@ -409,7 +409,7 @@ Declaration
diff --git a/docs/Structs/Version.html b/docs/Structs/Version.html
index e6062f4..ec67413 100644
--- a/docs/Structs/Version.html
+++ b/docs/Structs/Version.html
@@ -225,7 +225,7 @@ Declaration
diff --git a/docs/Structs/Version/UpdateType.html b/docs/Structs/Version/UpdateType.html
index e408985..6bda10d 100644
--- a/docs/Structs/Version/UpdateType.html
+++ b/docs/Structs/Version/UpdateType.html
@@ -216,7 +216,7 @@ Declaration
diff --git a/docs/Typealiases.html b/docs/Typealiases.html
index e08d502..e10d3c8 100644
--- a/docs/Typealiases.html
+++ b/docs/Typealiases.html
@@ -129,7 +129,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/CNAME b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/CNAME
new file mode 100644
index 0000000..d7801bd
--- /dev/null
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/CNAME
@@ -0,0 +1 @@
+appversion.ameba.co
\ No newline at end of file
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes.html
index 8e6ad6f..d0f3707 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes.html
@@ -165,7 +165,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes/AppVersion.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes/AppVersion.html
index 0f99712..7a33fe1 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes/AppVersion.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes/AppVersion.html
@@ -744,7 +744,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes/AppVersion/AlertType.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes/AppVersion/AlertType.html
index dac0965..92becc8 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes/AppVersion/AlertType.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes/AppVersion/AlertType.html
@@ -189,7 +189,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes/AppVersionLabel.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes/AppVersionLabel.html
index 0938049..cc9413f 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes/AppVersionLabel.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Classes/AppVersionLabel.html
@@ -191,7 +191,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Extensions.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Extensions.html
index c441146..b1fc0a6 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Extensions.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Extensions.html
@@ -129,7 +129,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Extensions/UITableView.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Extensions/UITableView.html
index 3f5555b..17446b2 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Extensions/UITableView.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Extensions/UITableView.html
@@ -193,7 +193,7 @@ Parameters
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Protocols.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Protocols.html
index 7381d3c..5e35285 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Protocols.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Protocols.html
@@ -130,7 +130,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Protocols/AppVersionDelegate.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Protocols/AppVersionDelegate.html
index c80e542..eafcb49 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Protocols/AppVersionDelegate.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Protocols/AppVersionDelegate.html
@@ -550,7 +550,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs.html
index 87bbffa..9838853 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs.html
@@ -194,7 +194,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/AppInfo.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/AppInfo.html
index 1b292c1..8c4176d 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/AppInfo.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/AppInfo.html
@@ -360,7 +360,7 @@ Return Value
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/AppInfo/VersionFormat.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/AppInfo/VersionFormat.html
index b077e42..d1adca0 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/AppInfo/VersionFormat.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/AppInfo/VersionFormat.html
@@ -216,7 +216,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/AppStoreVersion.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/AppStoreVersion.html
index 9f24b00..3c4f365 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/AppStoreVersion.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/AppStoreVersion.html
@@ -409,7 +409,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/Version.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/Version.html
index e6062f4..ec67413 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/Version.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/Version.html
@@ -225,7 +225,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/Version/UpdateType.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/Version/UpdateType.html
index e408985..6bda10d 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/Version/UpdateType.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Structs/Version/UpdateType.html
@@ -216,7 +216,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Typealiases.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Typealiases.html
index e08d502..e10d3c8 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Typealiases.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/Typealiases.html
@@ -129,7 +129,7 @@ Declaration
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/index.html b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/index.html
index ddcaba9..d9c2cf9 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/index.html
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/index.html
@@ -91,13 +91,18 @@
-Detect app updates, notify your users.
+Don’t let you users to get stuck on outdated version of your app.
-Build with support for iOS and Semantic Versioning
-
-
-
-
+
+- [x] Automatic update tracking using Semantic Versioning
+- [x] Buil-in UI alerts
+- [x] Rich set of delegate methods
+- [x] Fully documented
+- [x] Good test coverage
+- [x] Small code base
+- [x] No external dependencies
+- [x] Available through all major package managers: Cocoapods, Cartage and Swift Package Manager
+
Table of Contents
@@ -105,26 +110,45 @@ Table of Contents
Screenshots
Update UI alerts
-
-- Default: Unskippable alert
+
- Skippable alert
+- Unskippable alert (Default)
- Blocking alert
+
+
+
+
+
+
+
+
+
+
+
+
+- Four formatting options available(
AppInfo.VersionFormat
):
+
+
+- Short(version only): 1.0.0
+- Short with app name: AppVersion 1.0.0
+- Long(version + build): 1.0.0(42)
+- Long with app name: 1.0.0(42)
+
-
Requirements
@@ -146,47 +170,69 @@ Carthage
Make sure to add AppVersion.framework
to Linked Frameworks and Libraries
and copy-frameworks
Build Phases.
Swift Package Manager
-Features
-
-- [x] Buil-in UI alerts
-- [x] Rich set of delegate methods
-- [x] Fully documented
-- [x] Good test coverage
-- [x] No external dependencies
-- [x] Small size
-- [x] Available through all major package managers: Cocoapods, Cartage and Swift Package Manager
-
+TBD
+Usage
+
+Setup AppVersion in your AppDelegate.swift, code is self-explanatory:
+
func application(_ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
+ let appVersion = AppVersion.shared
+ appVersion.updateFrequency = 1 // I want to check for updates once a day
+ appVersion.alertsEnabled = true // I want UI alerts, presenting update options
+ appVersion.alertType = .skippable // I want UI alert to include "Skip" button
+ appVersion.neverEnabled = true // I want UI alert to include "Never" butoon
+ appVersion.alertPresentationStyle = .actionSheet // I want UI presented as an actionSheet
+ appVersion.checkBeforeUpdatePresented = { // I want to present UI only if App Store version has more than 1 review and average rating is higher than 3
+ return (appVersion.appStoreVersionInfo?.ratingsCount ?? 0) > 1
+ && (appVersion.appStoreVersionInfo?.averageRating ?? 0) > 3
+ }
+ appVersion.run()
+ return true
+ }
+
+
Delegates
-Example
-Using Storyboard
-Create AppVersion label in storyboard: Drag UILabel on your storyboard and set class to AppVersionLabel
-
+Each meaningfull update tracking event provided as delegate (AppVersionDelegate
). All delegates are optional, so you can implement only the one you need.
+Delegates can be used even if UI Alerts are disabled, for example you can choose to implement your own UI.
+Please refer to documentation for more details.
+UILabel and UITableView
+Using Storyboard
+
+Create AppVersion label in storyboard: Drag UILabel on your storyboard and set class to AppVersionLabel
+
+
After that set format name in Attributes Inpector:
-
-
+
+
let versionLabel = AppVersionLabel()
versionLabel.format = format
versionLabel.textAlignment = .center
versionLabel.textColor = .red
-
+
tableView.addVersionFooter(with: .longWithName)
or
tableView.addVersionFooter(with: .long, alignment: .right, textColor: .lightGray, footerHeight: 22)
-License
+Author
+
+
AppVersion is available under the MIT license. See the LICENSE file for more info.
diff --git a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/undocumented.json b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/undocumented.json
index 406e216..22165db 100644
--- a/docs/docsets/AppVersion.docset/Contents/Resources/Documents/undocumented.json
+++ b/docs/docsets/AppVersion.docset/Contents/Resources/Documents/undocumented.json
@@ -2,5 +2,5 @@
"warnings": [
],
- "source_directory": "/Users/melonamin/Library/Mobile Documents/com~apple~CloudDocs/Projects/amebalabs/AppVersion"
+ "source_directory": "/Users/kate/Library/Mobile Documents/com~apple~CloudDocs/Projects/amebalabs/AppVersion"
}
\ No newline at end of file
diff --git a/docs/docsets/AppVersion.tgz b/docs/docsets/AppVersion.tgz
index 2bca12e..4c18318 100644
Binary files a/docs/docsets/AppVersion.tgz and b/docs/docsets/AppVersion.tgz differ
diff --git a/docs/index.html b/docs/index.html
index ddcaba9..d9c2cf9 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -91,13 +91,18 @@
-Detect app updates, notify your users.
+Don’t let you users to get stuck on outdated version of your app.
-Build with support for iOS and Semantic Versioning
-
-
-
-
+
+- [x] Automatic update tracking using Semantic Versioning
+- [x] Buil-in UI alerts
+- [x] Rich set of delegate methods
+- [x] Fully documented
+- [x] Good test coverage
+- [x] Small code base
+- [x] No external dependencies
+- [x] Available through all major package managers: Cocoapods, Cartage and Swift Package Manager
+
Table of Contents
@@ -105,26 +110,45 @@ Table of Contents
Screenshots
Update UI alerts
-
-- Default: Unskippable alert
+
- Skippable alert
+- Unskippable alert (Default)
- Blocking alert
+
+
+
+
+
+
+
+
+
+
+
+
+- Four formatting options available(
AppInfo.VersionFormat
):
+
+
+- Short(version only): 1.0.0
+- Short with app name: AppVersion 1.0.0
+- Long(version + build): 1.0.0(42)
+- Long with app name: 1.0.0(42)
+
-
Requirements
@@ -146,47 +170,69 @@ Carthage
Make sure to add AppVersion.framework
to Linked Frameworks and Libraries
and copy-frameworks
Build Phases.
Swift Package Manager
-Features
-
-- [x] Buil-in UI alerts
-- [x] Rich set of delegate methods
-- [x] Fully documented
-- [x] Good test coverage
-- [x] No external dependencies
-- [x] Small size
-- [x] Available through all major package managers: Cocoapods, Cartage and Swift Package Manager
-
+TBD
+Usage
+
+Setup AppVersion in your AppDelegate.swift, code is self-explanatory:
+
func application(_ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
+ let appVersion = AppVersion.shared
+ appVersion.updateFrequency = 1 // I want to check for updates once a day
+ appVersion.alertsEnabled = true // I want UI alerts, presenting update options
+ appVersion.alertType = .skippable // I want UI alert to include "Skip" button
+ appVersion.neverEnabled = true // I want UI alert to include "Never" butoon
+ appVersion.alertPresentationStyle = .actionSheet // I want UI presented as an actionSheet
+ appVersion.checkBeforeUpdatePresented = { // I want to present UI only if App Store version has more than 1 review and average rating is higher than 3
+ return (appVersion.appStoreVersionInfo?.ratingsCount ?? 0) > 1
+ && (appVersion.appStoreVersionInfo?.averageRating ?? 0) > 3
+ }
+ appVersion.run()
+ return true
+ }
+
+
Delegates
-Example
-Using Storyboard
-Create AppVersion label in storyboard: Drag UILabel on your storyboard and set class to AppVersionLabel
-
+Each meaningfull update tracking event provided as delegate (AppVersionDelegate
). All delegates are optional, so you can implement only the one you need.
+Delegates can be used even if UI Alerts are disabled, for example you can choose to implement your own UI.
+Please refer to documentation for more details.
+UILabel and UITableView
+Using Storyboard
+
+Create AppVersion label in storyboard: Drag UILabel on your storyboard and set class to AppVersionLabel
+
+
After that set format name in Attributes Inpector:
-
-
+
+
let versionLabel = AppVersionLabel()
versionLabel.format = format
versionLabel.textAlignment = .center
versionLabel.textColor = .red
-
+
tableView.addVersionFooter(with: .longWithName)
or
tableView.addVersionFooter(with: .long, alignment: .right, textColor: .lightGray, footerHeight: 22)
-License
+Author
+
+
AppVersion is available under the MIT license. See the LICENSE file for more info.
diff --git a/docs/undocumented.json b/docs/undocumented.json
index 406e216..22165db 100644
--- a/docs/undocumented.json
+++ b/docs/undocumented.json
@@ -2,5 +2,5 @@
"warnings": [
],
- "source_directory": "/Users/melonamin/Library/Mobile Documents/com~apple~CloudDocs/Projects/amebalabs/AppVersion"
+ "source_directory": "/Users/kate/Library/Mobile Documents/com~apple~CloudDocs/Projects/amebalabs/AppVersion"
}
\ No newline at end of file