LaunchCounter 0.2.0

LaunchCounter 0.2.0

Maintained by Mark Bridges.



LaunchCounter

CI Status Version License Platform

Description

A very simple mechanism for tracking the number of times your app has been launched. Useful for running certain activities the very first time the app is launched, for example.

Example

In your app delegate

let launchCounter = LaunchCounter()

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

    // Record that the app was launched
    launchCounter.trackLaunch()

    if launchCounter.isFirstLaunch {
        // Do something only on first launch 
    }

    return true
}

To run the example project, clone the repo, and run pod install from the Example directory first.

Installation

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

pod 'LaunchCounter'

Author

megatron1000, [email protected]

License

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