Tally
is used to check how many times the user has opened the application using a
simple if
statement. This adds a lot of flexability on when you want something to happen.
Want to fire off an alert after the 15th opening? Easy.
CocoaPods is a dependency manager for Cocoa projects.
CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:
$ gem install cocoapods
To integrate Tally
into your Xcode project using CocoaPods, specify it in your Podfile
:
pod 'Tally'
Then, run the following command:
$ pod install
If you prefer not to use CocoaPods, you can integrate Tally
into your project manually.
- Supported build target - iOS 8.0+
First: import the pod
import Tally
Second: add the following snippet to application(_:didFinishLaunchingWithOptions:)
in your AppDelegate
Tally.didOpenApplication()
Third: When you want to check for a certain threshold of app launches, use
if Tally.hasOpenedApp(numberOfTimes: 3) {
// Do anything your heart desires
}
Tally
is developed by Laurent Shala at StockX and is released under the MIT license. See the LICENSE
file for details.
Feel free to follow me on my personal Twitter account. If you find any problems with the project or have ideas to enhance it, feel free to open a GitHub issue and/or create a pull request.