Skip to content

Closure triggers!

Choose a tag to compare

@Dean151 Dean151 released this 01 Nov 17:24
· 17 commits to main since this release

Closures!

You may now register a closure instead of a NSNotification.Name to being triggered by RuleKit.
A closure requires a unique name to be provided for triggers history storage.

await RuleKit.setRule(triggering: {
    showPaywall = true
}, rawValue: "showPaywall", options: [.triggerFrequency(.hourly)], .anyOf {
    EventRule(event: .appOpened) {
        Premium.currentOffering.name == "sales"
    }
})

Breaking changes

  • Deleted deprecated RuleKit.Event.resetDonation() in favor of RuleKit.Event.resetDonations()