Skip to content

Instantly share code, notes, and snippets.

View lanserxt's full-sized avatar
🖥️
Developing a dream

Anton Gubarenko lanserxt

🖥️
Developing a dream
View GitHub Profile
@lanserxt
lanserxt / PodcastDemoApp.swift
Created October 25, 2026 07:32
iOS 27: Now Playing example
import SwiftUI
import AVFoundation
// Now Playing is used exclusively from PodcastPlayer's main-actor context.
@preconcurrency import NowPlaying
import Observation
@main
struct PodcastDemoApp: App {
@State private var player = PodcastPlayer(
episode: .init(
@lanserxt
lanserxt / FocusTimerEntity.swift
Created October 11, 2026 07:51
iOS 27: App Intent Testing
struct FocusTimerEntity: AppEntity, Identifiable, Hashable {
static let typeDisplayRepresentation = TypeDisplayRepresentation(
name: "Focus Timer"
)
static let defaultQuery = FocusTimerQuery()
var id: String
private let titleValue: String
@lanserxt
lanserxt / TrustInsightsView.swift
Created September 22, 2026 07:50
iOS 27: TrustInsigth Framework
//
// RemoteSupportModel.swift
// GlassEffectDemo
//
// Created by Anton Gubarenko on 19.09.2026.
//
//
// RemoteSupportModel.swift
@lanserxt
lanserxt / SupCharts.swift
Created September 16, 2026 19:58
SwiftUI Charts: Dynamic Masking Example
//
// SupCharts.swift
// WWDC25Demo
//
// Created by Anton Gubarenko on 31.08.2026.
//
import Charts
import SwiftUI
@lanserxt
lanserxt / UtilityCrashReporterExtension.swift
Created September 12, 2026 05:06
iOS 27: CrashReportExtension
import Foundation
import CrashReportExtension
@main
struct UtilityCrashReporterExtension: CrashReporterExtension {
func processCrashReport(process: CrashedProcess) {
let report = CrashEnvelope(process: process)
do {
@lanserxt
lanserxt / ReaderViewController.swift
Created September 7, 2026 21:12
visionOS 27: UILookToScrollInteraction example
import UIKit
// Look to Scroll is a visionOS feature exposed through UIKit.
@available(visionOS 27.0, *)
final class ReaderViewController: UIViewController {
private let scrollView = UIScrollView()
private let contentLabel = UILabel()
private let controlsView = UIVisualEffectView(
@lanserxt
lanserxt / USDKitArticleDemoView.swift
Created August 22, 2026 20:09
iOS 27: UISDKit Framework example
//
// USDInspectorModel.swift
// WWDC25Demo
//
// Created by Anton Gubarenko on 22.08.2026.
//
import SwiftUI
import Observation
import RealityKit
@lanserxt
lanserxt / DiskImageKitArticleDemoView.swift
Created August 22, 2026 19:58
macOS 27: DiskImageKit Example
import SwiftUI
import Observation
import DiskImageKit
import Virtualization
@available(macOS 27.0, *)
@MainActor
@Observable
final class VMDiskSnapshotModel {
@lanserxt
lanserxt / StorageCleanupDemo.swift
Created August 15, 2026 15:58
iOS 27: StateReporting Framework
import SwiftUI
import Observation
import StateReporting
// MARK: - StateReporting Metadata
@available(iOS 27.0, *)
@ReportableMetadata
struct CleanupStableMetadata: Equatable {
/// A low-cardinality value that changes how cleanup behaves.
@lanserxt
lanserxt / DataDetectorView.swift
Created August 4, 2026 20:09
iOS 26: Data Detection - find entities in String
//
// DataDetectorView.swift
// WWDC25Demo
//
// Created by Anton Gubarenko on 04.08.2026.
//
import SwiftUI
import DataDetection