Skip to content

iOS 27 API support: adaptive layout, NowPlaying, Foundation Models #5536

Closed

Description

@proggeramlug

Summary

iOS 27 / iPadOS 27 / macOS 27 betas landed (beta 1: 2026-06-08); GM expected ~Sept 2026. This issue tracks adopting the iOS 27 APIs worth supporting in Perry's native UI/runtime layer. Not urgent — work this as iOS 27 lands. Nothing here can ship to the App Store until Xcode 27 GM (Apple rejects beta-SDK submissions), so treat it all as build-and-experiment for now.

Companion concern (SDK/toolchain plumbing, separate from API adoption): native on-Mac builds auto-adapt to the installed SDK via xcrun, but the Linux cross-compile path pins the SDK version (26.0.0) in crates/perry/src/commands/compile/link/platform_cmd.rs (iOS/tvOS/macOS -platform_version args) and the App Store GM DT* markers are hardcoded in crates/perry/src/commands/compile/bundle_apple.rs (gm_dt_defaults, DEFAULT_DT_XCODE). Those are a GM-day bump, not a beta-day one — bumping the DT* markers early would break App Store submissions.

Fit filter

Perry talks to Apple frameworks via a handle-based, imperative FFI (hand-written extern "C" + class!()/msg_send!, frameworks linked at link time — same pattern as the existing AVFoundation/CoreLocation/MapKit integrations). So:

  • Imperative, handle-shaped APIs bridge cleanly → good candidates.
  • Swift-macro/protocol-shaped APIs (@Generable, AppIntent conformances, entity schemas) are a poor fit → high effort, low payoff, defer.

Proposed scope (ranked)

1. Adaptive layout APIs (SwiftUI/UIKit) — do first

Fold/hinge-state detection, side-by-side, 4:3 aspect, split-view multitasking. This is plain UIKit layout — the area perry-ui-ios already owns (splitview, tabbar, stack widgets). Lowest risk, no new framework, fits the existing widget model. Apps break visually on foldables/multitasking without it.

2. NowPlaying framework — natural extension

Wires playback to Lock Screen / Control Center / Dynamic Island / CarPlay. Perry already has media_playback.rs (AVPlayer) + audio_playback.rs; this is the missing companion. Imperative/handle-shaped (MPNowPlayingInfoCenter-style), bridges like the existing audio FFI. Medium effort, high user-visible value.

3. Foundation Models — strategically the big one, scope carefully

On-device LLM access; in iOS 27 it also fronts cloud providers (Claude/Gemini) via a LanguageModel protocol. Compelling for Perry's audience (on-device AI without leaving TypeScript). Ship the simple async path (session → respond(prompt) → string); skip guided/structured generation (@Generable macros/schemas) initially — that part is deeply Swift-shaped.

Lower priority / poor fit

  • App Intents / Siri — now mandatory for Siri (SiriKit deprecating). Strategically real once a production Perry app needs it, but the most macro/protocol-heavy API in the release → worst fit for Perry's FFI. Defer.
  • Core AI (load/run your own models) — lower-level than Foundation Models; most TS app devs want the latter. Defer.
  • Music Understanding (on-device 6-dimension audio analysis) — niche, audio-app-only. Skip unless requested.
  • Game Porting Toolkit 4 — an agentic Metal porting tool, not a runtime API to bind. Out of scope.

Caveats

  1. New iOS 27 APIs need either updated objc2-* binding crates (currently pinned 0.3/0.6) or hand-written FFI. Hand-written is the established Perry pattern, so not a blocker — just the work.
  2. Beta-SDK = no App Store. Prototype against beta devices now; ship after Xcode 27 GM.

References

Activity

  1. added a commit that references this issue on Aug 24, 2026
    8224d87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew capability or improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions