AppVersion - Keep users on the up-to date version of your App.

Overview

πŸ“² App Version Build Status Swift Support Documentation Version Carthage compatible SwiftPM Compatible

Don't let you users to get stuck on outdated version of your app.

  • Automatic update tracking using Semantic Versioning
  • Buil-in UI alerts
  • Rich set of delegate methods
  • Fully documented
  • Good test coverage
  • Small code base
  • No external dependencies
  • Available through all major package managers: Cocoapods, Cartage and Swift Package Manager

Table of Contents


Screenshots

Update UI alerts

  1. Skippable alert
  2. Unskippable alert (Default)
  3. Blocking alert

Custom UILabel and UITableView footer

  • 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

  • Swift 4.2
  • Xcode 10 or greater
  • iOS 11.0 or greater

Installation

CocoaPods

AppVersion is available through CocoaPods. To install it add the following line to your Podfile:

pod "AppVersion.swift"

Carthage

If you’re using Carthage, add AppVersion to your Cartfile:

github "amebalabs/AppVersion"

Make sure to add AppVersion.framework to "Linked Frameworks and Libraries" and "copy-frameworks" Build Phases.

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

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:

Create AppVersionLabel programatically:

let versionLabel = AppVersionLabel()
versionLabel.format = format
versionLabel.textAlignment = .center
versionLabel.textColor = .red

Add version in UITableView footer:

tableView.addVersionFooter(with: .longWithName)

or

tableView.addVersionFooter(with: .long, alignment: .right, textColor: .lightGray, footerHeight: 22)

Author

License

AppVersion is available under the MIT license. See the LICENSE file for more info.

You might also like...
Mercato is a lightweight In-App Purchases (StoreKit 2) library for iOS, tvOS, watchOS, macOS, and Mac Catalyst.
Mercato is a lightweight In-App Purchases (StoreKit 2) library for iOS, tvOS, watchOS, macOS, and Mac Catalyst.

Mercato Mercato is a lightweight In-App Purchases (StoreKit 2) library for iOS, tvOS, watchOS, macOS, and Mac Catalyst. Installation Swift Package Man

An App where you can find product and see its detail.
An App where you can find product and see its detail.

MeliProductos Project πŸ‡¬πŸ‡§ An App where you can find product and see its detail. πŸ‡ͺπŸ‡Έ Una App donde puedes encontrar tus productos y ver su detall

Keep track of accessibility settings, leverage high contrast colors, and use scalable fonts to enable users with disabilities to use your app.
Keep track of accessibility settings, leverage high contrast colors, and use scalable fonts to enable users with disabilities to use your app.

Accessibility for iOS, macOS, tvOS, and watchOS πŸŽ‰ What's new in Capable 2.0 πŸŽ‰ Here are the most important changes: πŸ› New framework architecture and

Date Formatter Pool - is a small utility that creates and stores your Date Formatter for simpler reuse
Date Formatter Pool - is a small utility that creates and stores your Date Formatter for simpler reuse

Date Formatter Pool Date Formatter Pool - is a small utility that creates and stores your Date Formatter for simpler reuse Installation is available i

Automatic testing of your Pull Requests on GitHub and BitBucket using Xcode Server. Keep your team productive and safe. Get up and running in minutes. @buildasaur
Automatic testing of your Pull Requests on GitHub and BitBucket using Xcode Server. Keep your team productive and safe. Get up and running in minutes. @buildasaur

Buildasaur Automatic testing of your Pull Requests on GitHub and BitBucket using Xcode Server. Keep your team productive and safe. Get up and running

Pegase is a beautifully easy tool to keep track of your financial life on all your macOS
Pegase is a beautifully easy tool to keep track of your financial life on all your macOS

Pegase πŸŽ‰ Features πŸ“’ Documentation Personal account software Pegase is a beautifully easy tool to keep track of your financial life on all your macOS

iOS Trakt Client - Keep track of your favorite TV shows and movies on your iPhone. (Under development)

CouchTracker Keep track of your favorite movies and tv shows on your iPhone Setup for development You will need Xcode 11.2.1 Swift 5.1.2 Run the follo

Notify users when a new version of your app is available and prompt them to upgrade.
Notify users when a new version of your app is available and prompt them to upgrade.

Siren 🚨 Notify users when a new version of your app is available and prompt them to upgrade. Table of Contents Meta About Features Screenshots Ports

Harpy - Notify users when a new version of your app is available and prompt them to upgrade.
Harpy - Notify users when a new version of your app is available and prompt them to upgrade.

After 6 years of Harpy and 4 years of Siren, I have decided to deprecate Harpy in favor of Siren. Why? Siren is written in Swift and has a feature set

Siren - Notify users when a new version of your app is available and prompt them to upgrade.
Siren - Notify users when a new version of your app is available and prompt them to upgrade.

Siren 🚨 Notify users when a new version of your app is available and prompt them to upgrade. Table of Contents Meta About Features Screenshots Ports

Scan the MRZ code of a passport and extract the firstname, lastname, passport number, nationality, date of birth, expiration date and personal numer.
Scan the MRZ code of a passport and extract the firstname, lastname, passport number, nationality, date of birth, expiration date and personal numer.

PassportScanner Works with 2 and 3 line identity documents. What is this With PassportScanner you can use your camera to scan the MRZ code of a passpo

A "time ago", "time since", "relative date", or "fuzzy date" category for NSDate and iOS, Objective-C, Cocoa Touch, iPhone, iPad

Migration 2014.04.12 NSDate+TimeAgo has merged with DateTools. DateTools is the parent project and Matthew York is the project head. This project is n

RCalendarPicker A date picker control, Calendar calendar control, select control, calendar, date selection, the clock selection control.
RCalendarPicker A date picker control, Calendar calendar control, select control, calendar, date selection, the clock selection control.

RCalendarPicker RCalendarPicker Calendar calendar control, select control, calendar, date selection, the clock selection control. ζ—₯εŽ†ζŽ§δ»Ά ,ζ—₯εŽ†ι€‰ζ‹©ζŽ§δ»ΆοΌŒζ—₯εŽ†οΌŒζ—₯ζœŸι€‰ζ‹©

Simple iOS app to keep all your Warranties tagged!
Simple iOS app to keep all your Warranties tagged!

Warrenty-Tag A simple iOS app to keep all your Warranties tagged! Description Ever find it difficult to get hold of all your warranties and bills? or

Alert popup to notify your users if they use an unsupported iOS version

UnsupportedOSVersionAlert This source code alerts your users if they use your app with an unsupported version of iOS (e.g. iOS 10.0 beta). The alert l

ReleaseNotesKit - a brand new, elegant, and extremely simple way to present the recent version’s release notes to your users
ReleaseNotesKit - a brand new, elegant, and extremely simple way to present the recent version’s release notes to your users

ReleaseNotesKit This is ReleaseNotesKit, a brand new, elegant, and extremely simple way to present the recent version’s release notes to your users. R

πŸ– Memory game with hand gesture recognition that will keep your brain in a good shape!
πŸ– Memory game with hand gesture recognition that will keep your brain in a good shape!

Hands I have always been interested in how I can improve my memory in addition to reading books, and once I came across an interesting technique relat

Stuff application – keep track of your stuff.

stuff-app Stuff application – keep track of your stuff. Platforms App to be released for iOS 15, iPadOS 15 and macOS 12 Monterey. Purpose Project is d

Stuff application – keep track of your stuff

stuff-app Stuff application – keep track of your stuff. Platforms App to be released for iOS 15, iPadOS 15 and macOS 12 Monterey. Purpose Project is d

Comments
  • Added regionCode

    Added regionCode

    1. URL is now separated to its own URLComponent for better management,
    2. Added region code - by default its nil but if added the version will be check for this region only.
    3. Added example for region code in README file
    opened by lohenyumnam 0
Releases(1.0.1)
Owner
Ameba Labs
App experiments, one at a time
Ameba Labs
Siren - Notify users when a new version of your app is available and prompt them to upgrade.

Siren ?? Notify users when a new version of your app is available and prompt them to upgrade. Table of Contents Meta About Features Screenshots Ports

Arthur Ariel Sabintsev 4.1k Dec 27, 2022
Appirater - A utility that reminds your iPhone app's users to review the app.

Introduction Appirater is a class that you can drop into any iPhone app (iOS 4.0 or later) that will help remind your users to review your app on the

Arash Payan 4.7k Jan 7, 2023
Apphud SDK is a lightweight open-source Swift library to manage auto-renewable subscriptions and other in-app purchases in your iOS app.

Apphud SDK Apphud SDK is a lightweight open-source Swift library to manage auto-renewable subscriptions and other in-app purchases in your iOS app. No

Apphud 143 Dec 16, 2022
An easy way to access reviews for your app instead of writing repetitive and redundant codes for every app.

AppStoreReviewManager An easy way to access reviews for your app instead of writing repetitive and redundant codes for every app. Requirements iOS 9.0

Jinya 4 Dec 23, 2022
🍎 An App to check whether a non-App Store app is in App Store.

AppStorify ?? An App to check whether a non-App Store app is in App Store. Benfits Use App Store's upgrade mechanism instead of app's. App Store apps

seedgou 58 Dec 7, 2022
Appstore-Review-Guidelines - A curated list of guideline which has to be taken care before submitting your application to Appstore.

Appstore Review Guidelines The App Review Guidelines provide rules and examples across a range of topics, including user interface design, functionali

Aashish Tamsya 14 Dec 16, 2022
Apple's Framework to support in-app purchases and interaction with the App Store

Apple's Framework to support in-app purchases and interaction with the App Store.

paigeshin 0 Dec 5, 2021
InAppPurchase - A Simple and Lightweight framework for In App Purchase

InAppPurchase A Simple, Lightweight and Safe framework for In App Purchase Feature Simple and Light ?? Support Promoting In-App Purchases ?? No need t

Jin Sasaki 269 Dec 15, 2022
MerchantKit - A modern In-App Purchases management framework for iOS developers

MerchantKit dramatically simplifies the work indie developers have to do in order to add premium monetizable components to their applications. Track purchased products, offer auto-renewing subscriptions, restore transactions, and much more.

Benjamin Mayo 1.1k Dec 17, 2022
SwiftyStoreKit is a lightweight In App Purchases framework for iOS, tvOS, watchOS, macOS, and Mac Catalyst β›Ί

SwiftyStoreKit is a lightweight In App Purchases framework for iOS, tvOS, watchOS, macOS, and Mac Catalyst. Features Super easy-to-use block-based API

Andrea Bizzotto 6.1k Jan 7, 2023