Versions tracker for your iOS, macOS, and tvOS app

Overview

VersionTrackerSwift

Travis Language CocoaPods Carthage compatible Platform

VersionTrackerSwift is a versions / builds tracker to know which version has been installed by a user.

Usage

In your ApplicationDelegate, call the method track to track the current version:

// iOS / tvOS
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    VersionTracker.track()
    return true
}
// macOS
func applicationDidFinishLaunching(aNotification: NSNotification) {
    VersionTracker.track()
    return true        
}

Then, call whenever one of the following methods to get the data you need:

VersionTracker.shared.track() 
VersionTracker.shared.isFirstLaunchEver // Bool
VersionTracker.shared.isFirstVersionLaunch // Bool
VersionTracker.shared.isFirstBuildLaunch // Bool
VersionTracker.shared.versionHistory // [String]
VersionTracker.shared.buildHistory // [String]

VersionTracker.currentVersion // String
VersionTracker.currentBuild // String

Check out the examples and play with the version / build / number to have a concrete example.

How it works?

Each time you call the method track, the version and build are stored in NSUserDefaults if a new version / build is detected. Then, you can access to any information from the tracker.

The version and build number are the information you specify in your app's Info.plist.

Installation

CocoaPods

Add the following line in your Podfile:

pod 'VersionTrackerSwift'

Carthage

Add the following line to your Cartfile:

github "tbaranes/VersionTrackerSwift"

Manual

Just drag the Source/*.swift files into your project.

Contribution

  • If you found a bug, open an issue
  • If you have a feature request, open an issue
  • If you want to contribute, submit a pull request

Licence

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

You might also like...
Easy way to detect iOS device properties, OS versions and work with screen sizes. Powered by Swift.
Easy way to detect iOS device properties, OS versions and work with screen sizes. Powered by Swift.

Easy way to detect device environment: Device model and version Screen resolution Interface orientation iOS version Battery state Environment Helps to

CryptoTrackerMenuBar - A Realtime Crypto Tracker macOS Menu Bar App built with SwiftUI & WebSocket
CryptoTrackerMenuBar - A Realtime Crypto Tracker macOS Menu Bar App built with SwiftUI & WebSocket

Realtime Crypto Tracker macOS Menu Bar App - SwiftUI & WebSocket A Realtime Cryp

Represent and compare versions via semantic versioning (SemVer) in Swift

Version Version is a Swift Library, which enables to represent and compare semantic version numbers. It follows Semantic Versioning 2.0.0. The represe

The best command-line tool to install and switch between multiple versions of Xcode.
The best command-line tool to install and switch between multiple versions of Xcode.

The best command-line tool to install and switch between multiple versions of Xcode.

The easiest way to install and switch between multiple versions of Xcode - with a mouse click.
The easiest way to install and switch between multiple versions of Xcode - with a mouse click.

Xcodes.app The easiest way to install and switch between multiple versions of Xcode. If you're looking for a command-line version of Xcodes.app, try x

swiftenv allows you to easily install, and switch between multiple versions of Swift.
swiftenv allows you to easily install, and switch between multiple versions of Swift.

Swift Version Manager swiftenv allows you to easily install, and switch between multiple versions of Swift. This project was heavily inspired by pyenv

SuccessorCLI A CLI tool to restore iOS Devices on versions they're already on, based on the original Succession

A tool to restore iOS Devices on versions they're already on, based on the original Succession

A tool to restore iOS Devices on versions they're already on, based on the original Succession

SuccessorCLI A CLI tool to restore iOS devices on the version they're already on, inspired by the original Succession GUI Application, rewritten from

Minecraft-silicon - Generate Apple Silicon-native versions of Minecraft
Minecraft-silicon - Generate Apple Silicon-native versions of Minecraft

Minecraft Silicon A dead simple utility to generate Apple Silicon-native Minecra

This repository contains 🎨 My Xcode theme that I use. It is compatible with all versions of Xcode.
This repository contains 🎨 My Xcode theme that I use. It is compatible with all versions of Xcode.

DRL Xcodetheme Installation Automatic (via script) ./install.sh which will install the file in Xcode FontAndColorThemes directory. Restart Xcode Go t

Solarized Dark Theme for Xcode. Compatible with all modern versions of Xcode since 2013!
Solarized Dark Theme for Xcode. Compatible with all modern versions of Xcode since 2013!

Solarized Dark for Xcode Note I've moved away from using Solarized to a Night-Shift/Dark-Mode-friendly palette of my own creation; Cognac. It's availa

Aplikasi CrypTraces adalah MacOS Widget Crypto Tracker dengan SwiftUI, Combine & Cocoa Framework, dan WebSocket & CoinCap API
Aplikasi CrypTraces adalah MacOS Widget Crypto Tracker dengan SwiftUI, Combine & Cocoa Framework, dan WebSocket & CoinCap API

Aplikasi CrypTraces adalah MacOS Widget Crypto Tracker dengan SwiftUI, Combine & Cocoa Framework, dan WebSocket & CoinCap API. Aplikasi ini berbentuk Widget di Menu Bar MacOS dengan menampilkan beberapa Crypto Currency seperti Bitcoin (BTC), Ethereum (ETH), Dogecoin (DOGE), Monero (XMR), dan Litecoin (LTC).

MyWeight is a body mass tracker focused on make easy to input new data and check your weight history

MyWeight MyWeight is a body mass tracker focused on make easy to input new data and check your weight history. Getting Started Environment prerequisit

Intuitive cycling tracker app for iOS built with SwiftUI using Xcode. Features live route tracking, live metrics, storage of past cycling routes and many customization settings.
Intuitive cycling tracker app for iOS built with SwiftUI using Xcode. Features live route tracking, live metrics, storage of past cycling routes and many customization settings.

GoCycling Available on the iOS App Store https://apps.apple.com/app/go-cycling/id1565861313 App Icon About Go Cycling is a cycling tracker app built e

Corona virus tracker app for IOS and Android
Corona virus tracker app for IOS and Android

Corona virus tracker app for IOS and Android

A lightweight and efficient bus tracker app for the Miami-Dade Transit System
A lightweight and efficient bus tracker app for the Miami-Dade Transit System

A lightweight bus tracker app for the Miami-Dade Transit System Built in Swift, this app features a favorites page, real-time bus location and ETA, us

Tracker - A simple location logger app written in Swift and MVVM architecture
Tracker - A simple location logger app written in Swift and MVVM architecture

Tracker - A simple location logger app written in Swift and MVVM architecture

Corona Virus Tracker & Advices iOS App with SwiftUI
Corona Virus Tracker & Advices iOS App with SwiftUI

Corona Virus Stats & Advices App with SwiftUI Features Current statistics of global total confirmed, deaths, recovered cases. Statistics of countries

Building Expense Tracker iOS App with Core Data & SwiftUI Completed Project
Building Expense Tracker iOS App with Core Data & SwiftUI Completed Project

Completed Project for Building Expense Tracker iOS App with Core Data & SwiftUI Follow the tutorial at alfianlosari.com Features Create, edit, and del

Comments
  • public static func isFirstLaunch(forVersion version: String = Bool not correct">

    public static func isFirstLaunch(forVersion version: String = "", firstLaunch: FirstLaunch? = nil) -> Bool not correct

    let isFirstLaunch = VersionTracker.isFirstLaunch(forVersion: "1.0", firstLaunch: nil) isFirstLaunch always true when app start one more time.

    bug 
    opened by qiusuo8 3
  • Package.swift manifest is missing in 3.0.0

    Package.swift manifest is missing in 3.0.0

    Hi!

    I'm reporting the issue I'm having when trying to migrate from CocoaPods to Swift Package Manager (SPM). When I try to fetch the repository, with the latest version (3.0.0) I get this error:

    https://github.com/tbaranes/VersionTrackerSwift has no Package.swift manifest for version 3.0.0

    Also, this happens when trying to fetch this repository by that exact version.

    In case it helps, I'm using Xcode 12.4 and the rest of my dependencies work just fine with SPM.

    Thanks for your work!

    opened by vCrespoP 2
  • Fix iOS Build warning

    Fix iOS Build warning

    The platform specifications cause a build warning in Xcode 12. They're not necessary since VTS supports all versions supported by Xcode versions that support Swift Package Manager.

    Details in nanopb/nanopb#585, firebase/firebase-ios-sdk#6449, https://forums.swift.org/t/minimum-ios-version-xcode-12-and-build-warnings/40224, and https://github.com/apple/swift-evolution/blob/master/proposals/0236-package-manager-platform-deployment-settings.md

    opened by thislooksfun 1
  • Add Package.swift

    Add Package.swift

    Xcode 11 has built-in support for Swift Packages with no need for CocoaPods or Carthage, but this package does not have support for SPM. This PR adds that support.

    opened by thislooksfun 1
Releases(3.0.1)
  • 3.0.1(Dec 12, 2021)

  • 3.0.0(Mar 27, 2019)

  • 2.0.0(Apr 1, 2019)

    API breaking changes

    • Swift 4 and Xcode 9 support
    • Updating module name: VersionTrackerSwift -> VersionTracker
    • API cleanup, a few methods have been removed, and modified. Please check out the README to update your app

    Enhancements

    • Officially supporting Carthage

    Bugfixes

    • isFirstLanch for versions and builds are now working as expected
    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Sep 11, 2016)

    API breaking changes

    • Module name VersionTracking has been renamed VersionTrackerSwift
    • VersionTracking has been renamed VersionTracker
    • Swift 3 support
    • Some APIs have been updated to be more swifty, check out the README for more information

    Enhancements

    • watchOS support
    Source code(tar.gz)
    Source code(zip)
  • 1.0(Feb 18, 2016)

Owner
Tom Baranes
👋
Tom Baranes
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
Monitor iOS app version easily.

AppVersionMonitor Monitor iOS app version easily. You can get previous version and installation history. Usage To run the example project, clone the r

エウレカ 256 Jan 4, 2023
Versions tracker for your iOS, macOS, and tvOS app

VersionTrackerSwift VersionTrackerSwift is a versions / builds tracker to know which version has been installed by a user. Usage In your ApplicationDe

Tom Baranes 82 Oct 5, 2022
null 13 Oct 28, 2022
Matomo iOS, tvOS and macOS SDK: a Matomo tracker written in Swift

MatomoTracker (former PiwikTracker) iOS SDK The MatomoTracker is an iOS, tvOS and macOS SDK for sending app analytics to a Matomo server. MatomoTracke

Matomo Analytics 367 Dec 17, 2022
Google Analytics tracker for Apple tvOS provides an easy integration of Google Analytics’ measurement protocol for Apple TV.

Google Analytics tracker for Apple tvOS by Adswerve About Google Analytics tracker for Apple tvOS provides an easy integration of Google Analytics’ me

Adswerve 81 Nov 13, 2022
RNH Tracker is a GPS logger for iOS (iPhone, iPad, iPod) Track your location and send your logs to RNH Regatta :-)

RNH Tracker for iOS + WatchOS RNH Tracker is a GPS logger for iOS (iPhone, iPad, iPod) with offline map cache support. Track your location, add waypoi

Ed Cafferata 0 Jan 23, 2022
Coronavirus tracker app for iOS & macOS with maps & charts

Features Live data: Shows the most recent data, and updates automatically. Distribution map with two levels of details: Countries: When the user zooms

Mhd Hejazi 1.5k Dec 28, 2022
Async and concurrent versions of Swift’s forEach, map, flatMap, and compactMap APIs.

CollectionConcurrencyKit Welcome to CollectionConcurrencyKit, a lightweight Swift package that adds asynchronous and concurrent versions of the standa

John Sundell 684 Jan 9, 2023
Makes it easier to support older versions of iOS by fixing things and adding missing methods

PSTModernizer PSTModernizer carefully applies patches to UIKit and related Apple frameworks to fix known radars with the least impact. The current set

PSPDFKit Labs 217 Aug 9, 2022