Something in the way

This commit is contained in:
Hariharan Mudaliar 2026-01-13 14:35:23 +05:30
commit 9bd445986d
No known key found for this signature in database
GPG key ID: 025583EB0BE5640E
19 changed files with 2395 additions and 1 deletions

View file

@ -0,0 +1,53 @@
import Foundation
import Defaults
import AtollExtensionKit
import SwiftUI
struct ExtensionLiveActivityPayload: Identifiable, Hashable {
let bundleIdentifier: String
let descriptor: AtollLiveActivityDescriptor
let receivedAt: Date
var id: String { descriptor.id }
var priority: AtollLiveActivityPriority { descriptor.priority }
}
struct ExtensionLockScreenWidgetPayload: Identifiable, Hashable {
let bundleIdentifier: String
let descriptor: AtollLockScreenWidgetDescriptor
let receivedAt: Date
var id: String { descriptor.id }
var priority: AtollLiveActivityPriority { descriptor.priority }
}
enum ExtensionValidationError: LocalizedError, Equatable {
case featureDisabled
case unauthorized
case invalidDescriptor(String)
case rateLimited
case exceedsCapacity
case duplicateIdentifier
case unsupportedContent
var errorDescription: String? {
switch self {
case .featureDisabled:
return "Extensions feature is currently disabled in Atoll."
case .unauthorized:
return "Your app is not authorized to post this content."
case .invalidDescriptor(let reason):
return "Descriptor validation failed: \(reason)."
case .rateLimited:
return "Too many requests in a short period. Please slow down."
case .exceedsCapacity:
return "Atoll reached its limit for simultaneous extension content."
case .duplicateIdentifier:
return "An item with the same identifier already exists."
case .unsupportedContent:
return "Descriptor includes unsupported content for this surface."
}
}
}