ImagePlayground.framework now generates high-quality, photorealistic images via Private Cloud Compute instead of on-device models, with a redesigned API that replaces the deprecated ImageCreator. Developers present a familiar sheet UI and receive a URL to the generated image.
โข ImageCreator on-device API is deprecated; replaced by a new sheet-based API backed by Private Cloud Compute for higher quality output
โข New photorealistic styles added alongside illustration, sketch, animation, and emoji
โข ImagePlaygroundOptions now supports size/aspect ratio configuration via .closest(to:), style locking, and personalization control
โข External AI provider support (e.g. ChatGPT) surfaced via ImagePlaygroundStyle.externalProvider
โข On-device ImageCreator is deprecated โ apps must migrate to the new sheet-based API to access the significantly higher quality models running on Private Cloud Compute
โข Supports photorealistic styles, multiple aspect ratios, personalization from Photos, PencilKit drawings as concepts, and Genmoji output โ all through a single view modifier
โข No server provisioning, API keys, or usage-limit UI required; Apple manages infrastructure and iCloud+ usage limits transparently
A greeting card app that seeds the Image Playground sheet with the card's theme and message, then displays the resulting image as the card's artwork.
import SwiftUIimport ImagePlaygroundโ// iOS 26 / pre-iOS 27 approach using the now-deprecated ImageCreatorโstruct LegacyCardArtworkView: View {+struct CardEditorView: View {let cardTheme: Stringโ @State private var generatedImage: CGImage?โ @State private var isGenerating = false+ let cardMessage: String+ @State private var showPlayground = false+ @State private var generatedImageURL: URL?++ var playgroundOptions: ImagePlaygroundOptions {+ var options = ImagePlaygroundOptions()+ // Lock to illustration and sketch styles, default to illustration+ options.style = .imagePlaygroundGenerationStyle(+ default: .illustration,+ allowed: [.illustration, .sketch]+ )+ // Request a portrait aspect ratio for a greeting card+ options.size = .closest(to: CGSize(width: 600, height: 900))+ return options+ }+var body: some View {VStack(spacing: 24) {โ if let cgImage = generatedImage {โ Image(cgImage, scale: 1.0, orientation: .up, label: Text("Generated"))โ .resizable()โ .scaledToFit()โ .cornerRadius(16)+ if let url = generatedImageURL {+ AsyncImage(url: url) { image in+ image+ .resizable()+ .scaledToFit()+ .cornerRadius(16)+ } placeholder: {+ RoundedRectangle(cornerRadius: 16)+ .fill(Color.secondary.opacity(0.2))+ .frame(height: 300)+ }} else {RoundedRectangle(cornerRadius: 16).fill(Color.secondary.opacity(0.15)).frame(height: 300)โ .overlay(โ isGeneratingโ ? AnyView(ProgressView())โ : AnyView(Text("No artwork yet").foregroundStyle(.secondary))โ )+ .overlay(Text("No artwork yet").foregroundStyle(.secondary))}โ Button("Generate Artwork") {โ Task { await generateArtwork() }+ Button("Add Artwork with Image Playground") {+ showPlayground = true}.buttonStyle(.borderedProminent)โ .disabled(isGenerating)}.padding()+ .imagePlaygroundSheet(+ isPresented: $showPlayground,+ concepts: [+ .text(cardTheme),+ .extracted(from: cardMessage)+ ],+ options: playgroundOptions+ ) { imageURL in+ // imageURL is temporary โ copy to app storage in a real app+ generatedImageURL = imageURL+ }}+}โ @MainActorโ private func generateArtwork() async {โ isGenerating = trueโ defer { isGenerating = false }โ do {โ // ImageCreator is deprecated in iOS 27โ let creator = ImageCreator()โ let images = creator.images(โ for: [ImageCreator.Concept.text(cardTheme)],โ style: .animation+struct ContentView: View {+ @Environment(\.supportsImageGeneration) private var supportsImageGeneration++ var body: some View {+ if supportsImageGeneration {+ CardEditorView(+ cardTheme: "cherry blossoms",+ cardMessage: "Wishing you a wonderful spring full of joy and new beginnings!")โ for try await image in images {โ generatedImage = imageโ breakโ }โ } catch {โ print("Generation failed: \(error)")+ } else {+ Text("Image generation not available on this device.")+ .foregroundStyle(.secondary)+ .padding()}}}
Foundation Models is a new Apple framework introduced in iOS 27 that gives developers on-device access to the same Apple Intelligence language model powering system features, enabling text generation, structured output, and tool-calling entirely on-device without a network connection.
iOS 27 opens the Foundation Models framework to third-party LLM providers via a new public LanguageModel protocol, enabling anyone to integrate custom, server-based, or open-source models using the same Swift API as Apple's on-device system model.
App Schemas let developers describe their app's content and actions using pre-defined domain schemas (like the Calendar domain) so Siri can understand, search, and act on app data without custom NLP. Entities conforming to IndexedEntity are donated to Spotlight's semantic index, enabling natural-language queries over app content.
In-depth guide
iOS 27 On-Device AI & Apple Intelligence โThe URL returned in the completion closure points to a temporary location โ copy it to persistent storage before the session ends. ImageCreator (the old non-UI API) is deprecated in iOS 27 and will eventually be removed. The Genmoji style fires a separate onAdaptiveImageGlyphCreation completion instead of the normal URL completion.
Requires an Apple Intelligence-capable device; availability also depends on supported language/region and user having image generation enabled in Settings
Visual Intelligence brings iOS 17's Visual Look Up capabilities to a new developer-facing API surface in iOS 27, letting apps pipe live camera frames or static images through on-device scene understanding to extract subjects, text, barcodes, and rich semantic labels without any cloud round-trip.