Latest 0.6.3
Homepage https://github.com/mborsten/AfterX
License MIT
Platforms ios 8.0, osx 10.9
Authors

Version
License
Platform

AfterX uses the UserDefaults to keep track of tasks you have performed before. It keeps track of the tasks using the task identifier you give.

Example

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

When you want to do something only once during the lifetime of the app:

  AfterX.doOnce(task: "button_hint") {
    self.showHint()
  }

When you want to do something once after the user has performed a task an x amount of times:

  func calledWhenSucceedingTask() {

    ...

    AfterX.do(task: "ask_for_review", after: 5) {
      self.askForReview()
    }
  }

You can reset the count for a task:

  AfterX.resetCount("my_task")

Or reset the count for all tasks:

  AfterX.resetAll()

Requirements

Installation

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

pod "AfterX"

Author

Marcel Borsten, [email protected]

License

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

Latest podspec

{
    "name": "AfterX",
    "version": "0.6.3",
    "summary": "Do something once, after x amount of times",
    "description": "AfterX is ideal for keeping track of onboarding, tips, etc. Want to show a tip the first time a user sees a view?: `AfterX.doOnce()`. Want to ask the user for a glaring review after succeeding a task 5 times?: `AfterX.do(task: "once_after_five", after: 5) { self.askForReview() }`",
    "homepage": "https://github.com/mborsten/AfterX",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Marcel Borsten": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mborsten/AfterX.git",
        "tag": "0.6.3"
    },
    "social_media_url": "https://twitter.com/mborsten",
    "swift_versions": "4.0",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9"
    },
    "source_files": "AfterX/Classes/**/*"
}

Pin It on Pinterest

Share This