diff --git a/Sources/HMActionSet+Promise.swift b/Sources/HMActionSet+Promise.swift index b566285..68f6004 100644 --- a/Sources/HMActionSet+Promise.swift +++ b/Sources/HMActionSet+Promise.swift @@ -14,6 +14,13 @@ extension HMActionSet { self.addAction(action, completionHandler: seal.resolve) } } + + @available(iOS 8.0, *) + public func removeAction(_ action: HMAction) -> Promise { + return Promise { seal in + self.removeAction(action, completionHandler: seal.resolve) + } + } @available(iOS 8.0, *) public func updateName(_ name: String) -> Promise { diff --git a/Sources/HMEventTrigger+Promise.swift b/Sources/HMEventTrigger+Promise.swift index 1446d1a..20f5d3b 100644 --- a/Sources/HMEventTrigger+Promise.swift +++ b/Sources/HMEventTrigger+Promise.swift @@ -15,6 +15,34 @@ extension HMEventTrigger { self.updateExecuteOnce(executeOnce, completionHandler: seal.resolve) } } + + @available(iOS 11.0, *) + public func updateEvents(_ events: [HMEvent]) -> Promise { + return Promise { seal in + self.updateEvents(events, completionHandler: seal.resolve) + } + } + + @available(iOS 11.0, *) + public func updateEndEvents(_ events: [HMEvent]) -> Promise { + return Promise { seal in + self.updateEndEvents(events, completionHandler: seal.resolve) + } + } + + @available(iOS 9.0, *) + public func updatePredicate(_ predicate: NSPredicate?) -> Promise { + return Promise { seal in + self.updatePredicate(predicate, completionHandler: seal.resolve) + } + } + + @available(iOS 11.0, *) + public func updateRecurrences(_ recurrences: [DateComponents]?) -> Promise { + return Promise { seal in + self.updateRecurrences(recurrences, completionHandler: seal.resolve) + } + } }