Localframe is a small SwiftUI showcase app for experimenting with Apple’s Image Playground framework on iOS 26. It demonstrates how to create an ImageCreator, stream generated images from a text prompt, and present the result in a minimal native interface.
This project is intentionally lightweight. It is meant to document and demonstrate the API shape, not to serve as a production image generation product.
Warning
Localframe is a demonstration app and is not production-ready. Model output may be inaccurate, incomplete, or misleading.
Important
This app uses Apple’s ImageCreator class for direct programmatic on-device image generation. ImageCreator is deprecated as of iOS 27. Apple announced on June 11, 2026 that the class is being discontinued and will no longer work on iOS 27, iPadOS 27, macOS 27, and visionOS 27 or later.
What that means for this repository:
- iOS 26 is the intended showcase target.
- On iOS 27 beta releases, the code continues to compile with Xcode warnings, but apps using
ImageCreatordo not function in TestFlight and cause a runtime error. - For public iOS 27 releases, code using
ImageCreatorno longer compiles and those features no longer work. - Apple recommends migrating to the system-managed Image Playground sheet or another image generation service. A remote service is intentionally outside this repository's fully on-device scope.
See Apple’s announcement: Deprecation of the ImageCreator class.
- 🖼️ Prompt-based image generation: Creates up to two images with Apple’s on-device
ImageCreatorAPI. - 🧑🎨 Generation style selection: Offers Animation, Illustration, and Sketch styles.
- ⏳ Generation progress: Shows dedicated progress feedback while images are being created.
- 🌊 Streamed image results: Handles generated images incrementally as they arrive.
- 🖼️ Generated image results: Presents every image returned by the generation stream.
- 🔄 Restart generation: Clears the current prompt and results for a new generation cycle.
⚠️ Error presentation: Displays framework errors or a generic fallback.- 🗑️ In-memory data handling: Keeps prompts and generated images in memory without persistence or uploads.
- Xcode 26
- iOS 26 deployment target
- A real Apple Intelligence-compatible iPhone
- Apple Intelligence enabled on the device
- Supported device and Siri language
The iOS Simulator is not a supported runtime for Image Playground image generation. If you run the app in Simulator, ImageCreator can return .notSupported.
- Image generation does not work in the iOS Simulator.
- The app targets iOS 26 and depends on
ImageCreator. ImageCreatoris deprecated as of iOS 27, and Apple has announced that it will no longer work on iOS 27 or later.- Error handling is intentionally minimal for showcase purposes.
import ImagePlaygrounddo {
self.imageCreator = try await ImageCreator()
} catch {
self.error = error as? ImageCreator.Error
}guard let imageCreator else { return }
let images = imageCreator.images(
for: [.text(inputPrompt)],
style: selectedStyle,
limit: 2
)for try await image in images {
generatedCGImages.append(image.cgImage)
}Localframe is available under the MIT License. See LICENSE for the full license text.