Closure triggers!
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 ofRuleKit.Event.resetDonations()