Embed an iOS and Catalyst share extension using existing discovery and player APIs. Share saved players through an App Group snapshot, preserve the queue, and verify advancing playback before reporting success. Cover URL provider transport, settings migration, discovery addresses, duplicate handling, cancellation, and partial enqueue/play outcomes with focused tests. Document authentication and signing limits.
26 lines
374 B
Swift
26 lines
374 B
Swift
//
|
|
// Utilities.swift
|
|
// QueueCube
|
|
//
|
|
// Created by James Magahern on 3/3/25.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftUI
|
|
|
|
extension Optional
|
|
{
|
|
func try_unwrap() throws -> Wrapped {
|
|
guard let self else { throw UnwrapError() }
|
|
return self
|
|
}
|
|
|
|
struct UnwrapError: Swift.Error {}
|
|
}
|
|
|
|
|
|
extension Color
|
|
{
|
|
static let label = Color(uiColor: .label)
|
|
}
|