◉RORK LABJP
●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SDK 58 — Beta since 09/15 with no stable date yet; running projects in Expo Go has required login since 09/03●WIDGET — A write-up traces an iOS widget that renders black only in production builds●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SDK 58 — Beta since 09/15 with no stable date yet; running projects in Expo Go has required login since 09/03●WIDGET — A write-up traces an iOS widget that renders black only in production builds●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…
Articles/AI Models
◉ AI Models/2026-07-02Advanced

Integrating Image Playground in Rork Max Native Swift — Availability Design and Fallbacks for In-App Image Generation

How to build Image Playground into a Rork Max Swift app: availability checks with supportsImagePlayground, the imagePlaygroundSheet modifier, programmatic generation with ImageCreator, and fallback design for unsupported devices.

rork-max40image-playgroundapple-intelligenceswift8on-device-ai

✦ Premium Article

A while back I looked into adding a feature to one of my wallpaper apps that would let users create their own illustrations. When I priced out a server-side generation API, the per-request cost and the moderation workload were simply too heavy for an indie developer operation, so I shelved the idea.

Image Playground changed that calculation. Generation runs entirely on device, so the cost is zero. The output is constrained by Apple's styles and content policy, which means the framework absorbs most of the moderation burden for you.

Since Rork Max generates native Swift, Image Playground is within reach. But the real engineering work is not the generation itself — it is availability detection and fallback design. Skip that part and you get the worst kind of failure: a button that works on supported devices and silently does nothing everywhere else.

How It Differs from Server-Side Generation

Before writing any code, it helps to see how the two approaches compare as design inputs.

AspectServer-side generation APIImage Playground
Generation costBilled per request (accumulates)Zero (fully on-device)
NetworkRequiredNot required (works offline)
StylesUnrestricted (photorealism possible)Limited to animation, illustration, and sketch styles
ModerationYou design and operate itConstrained by the framework
Device coverageAll devicesApple Intelligence devices and regions only

The last row is the one that matters. The style restrictions — no photorealistic people, for instance — actually work in your favor if you handle user-generated content. The limited device coverage, however, is something only your app architecture can absorb.

Design the Availability Check First

Whether Image Playground works depends on the device model, OS version, region, and the user's Apple Intelligence settings. In SwiftUI you check it through an environment value.

import SwiftUI
import ImagePlayground
 
struct IllustrationButton: View {
    // Environment value telling you whether this device supports Apple Intelligence generation
    @Environment(\.supportsImagePlayground) private var supportsPlayground
    @State private var showsSheet = false
 
    var body: some View {
        if supportsPlayground {
            Button("Generate an illustration") { showsSheet = true }
        } else {
            // On unsupported devices, replace the entry point entirely with preset picks
            PresetIllustrationPicker()
        }
    }
}

From UIKit, ImagePlaygroundViewController.isAvailable gives you the same answer.

There is one design decision to make here: on unsupported devices, swap out the entire entry point rather than showing a disabled button. A button that cannot be pressed reads as broken. A row of preset illustrations reads as a complete feature. Since I standardized on this swap-the-entry-point pattern in my own apps, confused reviews and false bug reports dropped noticeably.

✦

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
✦Availability detection with supportsImagePlayground and isAvailable, plus a fallback design that keeps the feature coherent on unsupported devices and regions
✦Working code for both the imagePlaygroundSheet modifier and the ImageCreator API — when to let the system UI drive generation and when to own it programmatically
✦How to phrase Rork Max prompts for image generation features, and the App Review and content-policy pitfalls worth avoiding upfront
Secure payment via Stripe · Cancel anytime
✦

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • ✦Copy-paste ready implementation code
  • ✦New advanced guides published daily
  • ✦$5/mo or $10 for lifetime access
View Membership →

Related Articles

◉ AI Models2026-03-28
Rork × Core ML Custom Model Development × On-Device AI
Notes from training a model in Create ML, shipping it inside a Rork Max app with Core ML, and deciding per request whether inference runs on device or in the cloud — with measured routing, quantization, Vision and Natural Language integration, and OTA model swaps.
◉ AI Models2026-04-10
Improving Quality of Rork AI Native App Generation: SwiftUI Output Pitfalls
When Rork AI's SwiftUI output misses, the thing to fix is usually the instruction, not the code. Here is what happened when I regenerated one screen three ways and counted the round trips, plus the device conditions worth locking down before you send a screenshot.
◉ AI Models2026-10-14
Take the Prompt Out of the App: An Edge Function Gateway With the Guard on the Output Side
A system prompt shipped inside your app is readable from the day it ships. This walkthrough moves the prompt into a Supabase Edge Function, lets the client name only a task, and puts the guard on an output allowlist, with tested code.