◉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/Dev Tools
⬡ Dev Tools/2026-03-25Advanced

Building Apple Intelligence Apps with Rork Max — Writing Tools, Image Playground & Genmoji API Integration Guide

Learn how to integrate Apple Intelligence APIs — Writing Tools, Image Playground, and Genmoji — into native Swift apps using Rork Max, with working code examples and App Store submission best practices.

Rork Max236Apple Intelligence3Swift48Writing ToolsImage PlaygroundCore ML6Native Apps7

What Apple Intelligence Means for App Developers

Apple Intelligence is Apple's on-device AI framework suite, available starting with iOS 18.4. Unlike Core ML or the Natural Language Framework, Apple Intelligence is deeply integrated at the system level, directly enhancing user experiences without requiring cloud processing or third-party APIs.

With Rork Max, you can seamlessly integrate these Apple Intelligence APIs into native Swift apps — all from your browser, without ever touching Xcode. Writing Tools for intelligent text editing, Image Playground for on-device image generation, and Genmoji for custom emoji creation are all within reach.

Prerequisites and Environment Setup

Requirements

To work with Apple Intelligence APIs, you'll need:

  • Rork Max plan (native Swift builds are required)
  • Deployment target: iOS 18.4 or later
  • Supported devices: A17 Pro chip or later (iPhone 15 Pro / iPhone 16 series)
  • Xcode 16.3-equivalent build environment (provided by Rork Max's cloud Mac fleet)

Setting Up Your Rork Max Project

When creating a project in Rork Max, include Apple Intelligence requirements in your prompt:

// Rork Max prompt example:
// "Create a SwiftUI app targeting iOS 18.4+.
//  Integrate Apple Intelligence Writing Tools and Image Playground,
//  with screens for text editing and image generation."

Rork Max is powered by Claude Opus 4.6, which generates the appropriate project structure and API integration code from prompts like this.

Integrating Writing Tools API

Writing Tools lets users proofread, summarize, and rewrite text directly within your app's text fields. While standard UITextView and TextField components automatically support Writing Tools in iOS 18.4, custom implementations give you much finer control.

Basic Writing Tools Support

SwiftUI's TextEditor supports Writing Tools out of the box. To customize its behavior, use the writingToolsBehavior modifier:

import SwiftUI
 
struct ContentEditorView: View {
    @State private var articleText: String = ""
    @State private var isProcessing: Bool = false
 
    var body: some View {
        VStack(spacing: 16) {
            // Writing Tools is automatically available
            TextEditor(text: $articleText)
                .writingToolsBehavior(.complete) // Enable all features
                .frame(minHeight: 300)
                .padding()
                .background(Color(.systemGray6))
                .cornerRadius(12)
 
            // Show processing state
            if isProcessing {
                ProgressView("AI is processing your text...")
                    .padding()
            }
        }
        .padding()
        .navigationTitle("Article Editor")
    }
}
 
// Expected behavior:
// When text is selected, the context menu offers
// "Proofread", "Rewrite", "Summarize", and more

Custom Writing Tools Delegate

For advanced control, implement delegate methods to receive callbacks during Writing Tools operations:

import UIKit
 
class CustomTextViewController: UIViewController,
                                UITextViewDelegate {
    private let textView = UITextView()
 
    override func viewDidLoad() {
        super.viewDidLoad()
        textView.delegate = self
        // Configure Writing Tools behavior
        textView.writingToolsBehavior = .complete
 
        // Basic text view setup
        textView.font = .preferredFont(forTextStyle: .body)
        textView.translatesAutoresizingMaskIntoConstraints = false
        view.addSubview(textView)
 
        NSLayoutConstraint.activate([
            textView.topAnchor.constraint(
                equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 16),
            textView.leadingAnchor.constraint(
                equalTo: view.leadingAnchor, constant: 16),
            textView.trailingAnchor.constraint(
                equalTo: view.trailingAnchor, constant: -16),
            textView.bottomAnchor.constraint(
                equalTo: view.bottomAnchor, constant: -16)
        ])
    }
 
    // Called before Writing Tools modifies text
    func textView(_ textView: UITextView,
                  writingToolsIgnoredRangesIn range: NSRange) -> [NSRange] {
        // Return ranges that should be protected from AI editing
        return findCodeBlockRanges(in: textView.text, within: range)
    }
 
    private func findCodeBlockRanges(
        in text: String, within range: NSRange
    ) -> [NSRange] {
        // Protect text wrapped in backtick code blocks
        var ignoredRanges: [NSRange] = []
        let nsText = text as NSString
        let pattern = "```[\\s\\S]*?```"
 
        if let regex = try? NSRegularExpression(pattern: pattern) {
            let matches = regex.matches(in: text, range: range)
            ignoredRanges = matches.map { $0.range }
        }
        return ignoredRanges
    }
}
 
// Expected behavior:
// Text within code blocks is excluded from Writing Tools edits,
// while all other text can be proofread, rewritten, or summarized

Integrating Image Playground API

Image Playground generates images from text prompts entirely on-device, preserving user privacy while enabling creative image generation experiences.

Presenting the Image Playground Sheet

The simplest integration method is presenting the system-provided Image Playground sheet:

import SwiftUI
import ImagePlayground
 
struct ImageGeneratorView: View {
    @State private var showPlayground = false
    @State private var generatedImage: Image?
    @State private var conceptText: String = ""
 
    var body: some View {
        VStack(spacing: 24) {
            // Display area for generated images
            if let image = generatedImage {
                image
                    .resizable()
                    .aspectRatio(contentMode: .fit)
                    .frame(maxHeight: 400)
                    .cornerRadius(16)
                    .shadow(radius: 8)
            } else {
                RoundedRectangle(cornerRadius: 16)
                    .fill(Color(.systemGray5))
                    .frame(height: 300)
                    .overlay(
                        VStack {
                            Image(systemName: "photo.badge.plus")
                                .font(.system(size: 48))
                                .foregroundColor(.secondary)
                            Text("Generate an image to get started")
                                .foregroundColor(.secondary)
                        }
                    )
            }
 
            // Concept input field
            TextField("Describe your image concept", text: $conceptText)
                .textFieldStyle(.roundedBorder)
                .padding(.horizontal)
 
            // Launch Image Playground
            Button(action: { showPlayground = true }) {
                Label("Generate with Image Playground",
                      systemImage: "wand.and.stars")
                    .font(.headline)
                    .frame(maxWidth: .infinity)
                    .padding()
                    .background(Color.accentColor)
                    .foregroundColor(.white)
                    .cornerRadius(12)
            }
            .padding(.horizontal)
        }
        .imagePlaygroundSheet(
            isPresented: $showPlayground,
            concept: conceptText
        ) { url in
            // Callback when generation completes
            if let uiImage = UIImage(contentsOfFile: url.path) {
                generatedImage = Image(uiImage: uiImage)
            }
        }
        .navigationTitle("AI Image Generator")
    }
}
 
// Expected behavior:
// Tapping the button opens the Image Playground sheet,
// where users can refine their prompt and generate images.
// The generated image is displayed in the app after completion.

Programmatic Image Generation

For background image generation without presenting a sheet, use ImageGenerator directly:

import ImagePlayground
 
class ImageService {
    private let generator = ImageGenerator()
 
    func generateImage(
        from prompt: String,
        style: ImageGenerator.Style = .natural
    ) async throws -> CGImage {
        // Create the generation request
        let request = ImageGenerator.Request(
            concepts: [.text(prompt)],
            style: style
        )
 
        // Generate asynchronously (on-device processing)
        let response = try await generator.generateImage(request: request)
        return response.image
    }
 
    func generateWithMultipleConcepts(
        textPrompt: String,
        referenceImage: CGImage? = nil
    ) async throws -> CGImage {
        var concepts: [ImageGenerator.Concept] = [
            .text(textPrompt)
        ]
 
        // Add reference image if available
        if let refImage = referenceImage {
            concepts.append(.image(refImage))
        }
 
        let request = ImageGenerator.Request(
            concepts: concepts,
            style: .animation // Animation style
        )
 
        let response = try await generator.generateImage(request: request)
        return response.image
    }
}
 
// Usage:
// let service = ImageService()
// let image = try await service.generateImage(
//     from: "A shiba inu walking along a beach at sunset"
// )

Integrating Genmoji API

Genmoji generates custom emoji from text descriptions. Adding this to chat apps or reaction features dramatically expands how users express themselves.

Basic Genmoji Implementation

import SwiftUI
import ImagePlayground
 
struct GenmojiPickerView: View {
    @State private var showGenmojiPicker = false
    @State private var selectedGenmoji: NSAttributedString?
    @State private var genmojiDescription: String = ""
 
    var body: some View {
        VStack(spacing: 20) {
            // Display the generated Genmoji
            if let genmoji = selectedGenmoji {
                Text(AttributedString(genmoji))
                    .font(.system(size: 96))
                    .padding()
            }
 
            TextField("Describe your Genmoji", text: $genmojiDescription)
                .textFieldStyle(.roundedBorder)
                .padding(.horizontal)
 
            Button("Create Genmoji") {
                showGenmojiPicker = true
            }
            .buttonStyle(.borderedProminent)
        }
        .imagePlaygroundSheet(
            isPresented: $showGenmojiPicker,
            concept: genmojiDescription,
            style: .genmoji
        ) { url in
            // Process the generated Genmoji
            handleGenmojiResult(url: url)
        }
    }
 
    private func handleGenmojiResult(url: URL) {
        // Store the Genmoji as an NSAttributedString
        if let imageData = try? Data(contentsOf: url),
           let image = UIImage(data: imageData) {
            let attachment = NSTextAttachment()
            attachment.image = image
            attachment.bounds = CGRect(x: 0, y: -8, width: 32, height: 32)
            selectedGenmoji = NSAttributedString(attachment: attachment)
        }
    }
}
 
// Expected behavior:
// A description like "a programmer happily drinking coffee"
// generates a custom Genmoji that can be used within the app

Adding Genmoji to a Chat App

import SwiftUI
 
struct ChatMessage: Identifiable {
    let id = UUID()
    let content: NSAttributedString
    let isFromCurrentUser: Bool
    let timestamp: Date
}
 
struct ChatView: View {
    @State private var messages: [ChatMessage] = []
    @State private var inputText: String = ""
    @State private var showGenmojiPicker = false
 
    var body: some View {
        VStack {
            // Message list
            ScrollView {
                LazyVStack(alignment: .leading, spacing: 12) {
                    ForEach(messages) { message in
                        ChatBubble(message: message)
                    }
                }
                .padding()
            }
 
            // Input area
            HStack(spacing: 12) {
                // Genmoji button
                Button(action: { showGenmojiPicker = true }) {
                    Image(systemName: "face.smiling.inverse")
                        .font(.title2)
                        .foregroundColor(.accentColor)
                }
 
                TextField("Type a message", text: $inputText)
                    .textFieldStyle(.roundedBorder)
 
                Button("Send") {
                    sendMessage()
                }
                .buttonStyle(.borderedProminent)
            }
            .padding()
        }
        .imagePlaygroundSheet(
            isPresented: $showGenmojiPicker,
            style: .genmoji
        ) { url in
            appendGenmojiMessage(url: url)
        }
    }
 
    private func sendMessage() {
        guard !inputText.isEmpty else { return }
        let attributed = NSAttributedString(string: inputText)
        let msg = ChatMessage(
            content: attributed,
            isFromCurrentUser: true,
            timestamp: Date()
        )
        messages.append(msg)
        inputText = ""
    }
 
    private func appendGenmojiMessage(url: URL) {
        if let data = try? Data(contentsOf: url),
           let image = UIImage(data: data) {
            let attachment = NSTextAttachment()
            attachment.image = image
            attachment.bounds = CGRect(x: 0, y: -8, width: 40, height: 40)
            let attributed = NSAttributedString(attachment: attachment)
            let msg = ChatMessage(
                content: attributed,
                isFromCurrentUser: true,
                timestamp: Date()
            )
            messages.append(msg)
        }
    }
}

Checking Apple Intelligence Availability

Apple Intelligence isn't available on every device. Your app should gracefully check for feature availability and provide fallback experiences on unsupported hardware.

import SwiftUI
import ImagePlayground
 
struct FeatureAvailabilityView: View {
    // Check Image Playground support via environment
    @Environment(\.supportsImagePlayground)
    private var supportsImagePlayground
 
    var body: some View {
        List {
            Section("Apple Intelligence Features") {
                // Writing Tools (auto-available on iOS 18.4+)
                HStack {
                    Label("Writing Tools", systemImage: "pencil.and.outline")
                    Spacer()
                    availabilityBadge(
                        available: isWritingToolsAvailable
                    )
                }
 
                // Image Playground
                HStack {
                    Label("Image Playground",
                          systemImage: "photo.badge.plus")
                    Spacer()
                    availabilityBadge(
                        available: supportsImagePlayground
                    )
                }
 
                // Genmoji
                HStack {
                    Label("Genmoji", systemImage: "face.smiling.inverse")
                    Spacer()
                    availabilityBadge(
                        available: supportsImagePlayground
                    )
                }
            }
        }
        .navigationTitle("Feature Check")
    }
 
    private var isWritingToolsAvailable: Bool {
        if #available(iOS 18.4, *) {
            return true
        }
        return false
    }
 
    @ViewBuilder
    private func availabilityBadge(available: Bool) -> some View {
        if available {
            Text("Available")
                .font(.caption)
                .foregroundColor(.green)
                .padding(.horizontal, 8)
                .padding(.vertical, 4)
                .background(Color.green.opacity(0.1))
                .cornerRadius(8)
        } else {
            Text("Not Supported")
                .font(.caption)
                .foregroundColor(.secondary)
                .padding(.horizontal, 8)
                .padding(.vertical, 4)
                .background(Color.gray.opacity(0.1))
                .cornerRadius(8)
        }
    }
}
 
// Expected behavior:
// Each Apple Intelligence feature's availability
// is accurately displayed based on the device

App Store Submission Best Practices

When submitting Apple Intelligence-powered apps to the App Store, keep these key points in mind.

Review Checklist

Info.plist configuration: When using Apple Intelligence features, you must include the NSImagePlaygroundUsageDescription key with a clear usage description.

// Add to Info.plist:
// Key: NSImagePlaygroundUsageDescription
// Value: "This app uses Image Playground to generate custom
//         images and emoji within the app."

Graceful fallbacks: Ensure your app functions properly on devices that don't support Apple Intelligence. Provide alternative UI elements when features are unavailable.

Privacy policy: Although Apple Intelligence processes everything on-device, your app handles user content, so it's recommended to mention AI feature usage in your privacy policy.

Content guidelines: Apple's content policies are automatically enforced for Image Playground-generated images. Inappropriate content is blocked at the system level, but consider implementing additional filtering on the app side as well.

Wrapping Up — Unlock Apple Intelligence with Rork Max

Apple Intelligence represents a significant opportunity for app developers. Writing Tools elevates text editing experiences, Image Playground enables creative on-device image generation, and Genmoji expands how users express themselves.

With Rork Max, integrating these APIs requires no Xcode installation — just browser-based prompt instructions. What used to take weeks of native AI feature implementation can now be accomplished in hours.

Start with basic Writing Tools support (writingToolsBehavior(.complete)), then gradually add Image Playground and Genmoji for a phased approach that keeps complexity manageable.

For more on Apple Intelligence APIs, check out our Rork Max Native Swift Complete Guide. For Core ML integration details, see the Rork Max Core ML Guide, and for Siri integration, visit the Rork Max Siri App Intents Guide.

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 →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

⬡ Dev Tools2026-04-05
Rork Max × WidgetKit & Live Activities in Practice — From Home Screen to Dynamic Island
A complete guide to implementing iOS Widgets, Lock Screen widgets, and Dynamic Island Live Activities with Rork Max. Covers WidgetKit fundamentals, Timeline update strategies, App Intents integration, and monetization.
⬡ Dev Tools2026-07-18
The Generated Screen That Quietly Jams at AX5 and in German — Putting Layout Resilience Checks on Rork Max SwiftUI
A record of running every Rork Max generated SwiftUI screen through pseudolocalization and the largest text size to find exactly where it jams. Covers when to reach for ViewThatFits, ScaledMetric and layoutPriority, plus the snapshot checks that catch regressions every time you regenerate.
⬡ Dev Tools2026-05-17
Testing Rork Max SwiftUI Features on a Real Wallpaper App — What Worked, What Needed Fixes
I benchmarked Rork Max's SwiftUI generation against the production code of a wallpaper app I actually run. Here is what shipped as-is, what needed fixing, and what I ended up writing by hand — with working code and on-device measurements.