Skip to content

A package to help track how often the user opened the app and if they opened it in the current version before.

Notifications You must be signed in to change notification settings

chFlorian/AppOpenTracker

Repository files navigation

AppOpenTracker

AppOpenTracker provides an observable AppOpenTracker.shared instance that can be used to track

  • the last version that the app was opened in
  • the last build that the app was opened in
  • how often the app was opened

AppOpenTracker also includes an UpdateService (thanks to Antoine v. d. Lee) that can be used to check for an available app update.

Installation

AppOpenTracker can be installed via Swift Package Manager, just copy the repository URL into the respective Xcode window:

https://github.com/chFlorian/AppOpenTracker

Usage

AppOpenTracker exposes a shared instance, that can be accessed like this:

import AppOpenTracker

struct ContentView: View {
  @ObservedObject private var appOpenTracker = AppOpenTracker.shared
}

There are several exposed @Published member variables:

Name Description
versionFirstOpened A flag that resembles wether this version was opened for the first time
countOfAppOpenedBefore A counter that keeps track of how often the app was opened before this session
appIsFirstOpened A flag that resembles wether this is the first time the user opened the app

About

A package to help track how often the user opened the app and if they opened it in the current version before.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages