SwiftclassAlarmKit

class AlarmKit.AlarmManager

Members 27

  1. varstatic var shared: AlarmKit.AlarmManager { get }
  2. deinitdeinit
  3. fieldlet alarmClient: AlarmKit.AlarmClient+0x10
  4. fieldlet authorizationClient: AlarmKit.AuthorizationClient+0x18
  5. funcauthorizationState(bundleID: String) throws -> AlarmKit.AlarmManager.AuthorizationState
  6. funccancel(id: Foundation.UUID, ownerID: String) throws -> ()
  7. funccancel(id: Foundation.UUID) throws -> ()
  8. funccancelAll() throws -> ()
  9. funccountdown(id: Foundation.UUID, ownerID: String) throws -> ()
  10. funccountdown(id: Foundation.UUID) throws -> ()
  11. funcexecuteIntent(id: Foundation.UUID, ownerID: String, actionType: AlarmKit.AlarmActionType) throws -> ()
  12. funcpause(id: Foundation.UUID, ownerID: String) throws -> ()
  13. funcpause(id: Foundation.UUID) throws -> ()
  14. funcremoveAuthorization(bundleID: String) throws -> ()
  15. funcrequestAuthorization() async throws -> AlarmKit.AlarmManager.AuthorizationState
  16. funcresume(id: Foundation.UUID, ownerID: String) throws -> ()
  17. funcresume(id: Foundation.UUID) throws -> ()
  18. funcschedule<A where A: AlarmKit.AlarmMetadata>(id: Foundation.UUID, configuration: AlarmKit.AlarmManager.AlarmConfiguration<A>) async throws -> AlarmKit.Alarm
  19. funcset(authorizationState: AlarmKit.AlarmManager.AuthorizationState, bundleID: String) throws -> ()
  20. funcstop(id: Foundation.UUID, ownerID: String) throws -> ()
  21. funcstop(id: Foundation.UUID) throws -> ()
  22. funcsupportsAlarmKit(bundleID: String) throws -> Bool
  23. varvar alarmUpdates: some Swift.AsyncSequence<[AlarmKit.Alarm], Never> { get }
  24. varvar alarms: [AlarmKit.Alarm] { get }
  25. varfinal var allAlarms: [String : [AlarmKit.Alarm]] { get }
  26. varvar authorizationState: AlarmKit.AlarmManager.AuthorizationState { get }
  27. varvar authorizationUpdates: some Swift.AsyncSequence<AlarmKit.AlarmManager.AuthorizationState, Never> { get }
class AlarmManager {
    enum AlarmError {
        case maximumLimitReached
    }
    enum AuthorizationState {
        enum CodingKeys {
            case notDetermined
            case denied
            case authorized
        }
        enum NotDeterminedCodingKeys {}
        enum DeniedCodingKeys {}
        enum AuthorizedCodingKeys {}
        case notDetermined
        case denied
        case authorized

        init(rawValue: Swift.Int64)

        var rawValue: Swift.Int64 {
            get
        }
    }
    struct AlarmConfiguration<A> where A: AlarmKit.AlarmMetadata {
        var countdownDuration: AlarmKit.Alarm.CountdownDuration?
        var schedule: AlarmKit.Alarm.Schedule?
        var attributes: AlarmKit.AlarmAttributes<A>
        var appEntityIdentifier: AppIntents.EntityIdentifier?
        var stopIntent: (any AppIntents.LiveActivityIntent)?
        var secondaryIntent: (any AppIntents.LiveActivityIntent)?
        var sound: ActivityKit.AlertConfiguration.AlertSound

        init(countdownDuration: AlarmKit.Alarm.CountdownDuration?, schedule: AlarmKit.Alarm.Schedule?, attributes: AlarmKit.AlarmAttributes<A>, stopIntent: (any AppIntents.LiveActivityIntent)?, secondaryIntent: (any AppIntents.LiveActivityIntent)?, sound: ActivityKit.AlertConfiguration.AlertSound)
        init(countdownDuration: AlarmKit.Alarm.CountdownDuration?, schedule: AlarmKit.Alarm.Schedule?, attributes: AlarmKit.AlarmAttributes<A>, appEntityIdentifier: AppIntents.EntityIdentifier?, stopIntent: (any AppIntents.LiveActivityIntent)?, secondaryIntent: (any AppIntents.LiveActivityIntent)?, sound: ActivityKit.AlertConfiguration.AlertSound)

        static func alarm(schedule: AlarmKit.Alarm.Schedule?, attributes: AlarmKit.AlarmAttributes<A>, stopIntent: (any AppIntents.LiveActivityIntent)?, secondaryIntent: (any AppIntents.LiveActivityIntent)?, sound: ActivityKit.AlertConfiguration.AlertSound) -> AlarmKit.AlarmManager.AlarmConfiguration<A>
        static func alarm(schedule: AlarmKit.Alarm.Schedule?, attributes: AlarmKit.AlarmAttributes<A>, appEntityIdentifier: AppIntents.EntityIdentifier?, stopIntent: (any AppIntents.LiveActivityIntent)?, secondaryIntent: (any AppIntents.LiveActivityIntent)?, sound: ActivityKit.AlertConfiguration.AlertSound) -> AlarmKit.AlarmManager.AlarmConfiguration<A>
        static func timer(duration: Swift.Double, attributes: AlarmKit.AlarmAttributes<A>, stopIntent: (any AppIntents.LiveActivityIntent)?, secondaryIntent: (any AppIntents.LiveActivityIntent)?, sound: ActivityKit.AlertConfiguration.AlertSound) -> AlarmKit.AlarmManager.AlarmConfiguration<A>
        static func timer(duration: Swift.Double, attributes: AlarmKit.AlarmAttributes<A>, appEntityIdentifier: AppIntents.EntityIdentifier?, stopIntent: (any AppIntents.LiveActivityIntent)?, secondaryIntent: (any AppIntents.LiveActivityIntent)?, sound: ActivityKit.AlertConfiguration.AlertSound) -> AlarmKit.AlarmManager.AlarmConfiguration<A>
    }
    struct AlarmUpdates {
        struct Iterator {
            var baseIterator: Swift.AsyncStream<[AlarmKit.Alarm]>.Iterator

            func next() async -> [AlarmKit.Alarm]?
        }
        let stream: Swift.AsyncStream<[AlarmKit.Alarm]>

        func makeAsyncIterator() -> AlarmKit.AlarmManager.AlarmUpdates.Iterator
    }
    struct AlarmAuthorizationStateUpdates {
        struct Iterator {
            var baseIterator: Swift.AsyncStream<AlarmKit.AlarmManager.AuthorizationState>.Iterator

            func next() async -> AlarmKit.AlarmManager.AuthorizationState?
        }
        let stream: Swift.AsyncStream<AlarmKit.AlarmManager.AuthorizationState>

        func makeAsyncIterator() -> AlarmKit.AlarmManager.AlarmAuthorizationStateUpdates.Iterator
    }
    let alarmClient: AlarmKit.AlarmClient
    let authorizationClient: AlarmKit.AuthorizationClient

    func schedule<A>(id: Foundation.UUID, configuration: AlarmKit.AlarmManager.AlarmConfiguration<A>) async throws -> AlarmKit.Alarm where A: AlarmKit.AlarmMetadata
    func countdown(id: Foundation.UUID) throws
    func cancel(id: Foundation.UUID) throws
    func stop(id: Foundation.UUID) throws
    func pause(id: Foundation.UUID) throws
    func resume(id: Foundation.UUID) throws
    var alarms: [AlarmKit.Alarm] {
        get
    }
    var alarmUpdates: some Swift.AsyncSequence<[AlarmKit.Alarm], Swift.Never> {
        get
    }
    var authorizationState: AlarmKit.AlarmManager.AuthorizationState {
        get
    }
    func requestAuthorization() async throws -> AlarmKit.AlarmManager.AuthorizationState
    var authorizationUpdates: some Swift.AsyncSequence<AlarmKit.AlarmManager.AuthorizationState, Swift.Never> {
        get
    }

    final var allAlarms: [Swift.String : [AlarmKit.Alarm]] {
        get
    }

    final func supportsAlarmKit(bundleID: Swift.String) throws -> Swift.Bool
    final func executeIntent(id: Foundation.UUID, ownerID: Swift.String, actionType: AlarmKit.AlarmActionType) throws
    func authorizationState(bundleID: Swift.String) throws -> AlarmKit.AlarmManager.AuthorizationState
    final func removeAuthorization(bundleID: Swift.String) throws
    final func set(authorizationState: AlarmKit.AlarmManager.AuthorizationState, bundleID: Swift.String) throws
    func stop(id: Foundation.UUID, ownerID: Swift.String) throws
    func pause(id: Foundation.UUID, ownerID: Swift.String) throws
    func cancel(id: Foundation.UUID, ownerID: Swift.String) throws
    func resume(id: Foundation.UUID, ownerID: Swift.String) throws
    final func cancelAll() throws
    func countdown(id: Foundation.UUID, ownerID: Swift.String) throws

    static var shared: AlarmKit.AlarmManager {
        get
    }

    deinit
}