Skip to content
archive

stackoverflow-swift-question-4

Swift · · 1 min read

Unknown Error code 1032 from Apple Intelligence

Stack Overflow Question

Link: https://stackoverflow.com/questions/79939126/unknown-error-code-1032-from-apple-intelligence

Published: 2026-05-11T03:01:51Z

Updated: 2026-05-11T03:01:51Z

Author: Jon Vogel

Tags: swift, xcode, apple-intelligence, foundation-models

Summary:

        <p>I'm using Apple intelligence to power suggestions to user of my app. It's a great feature but I'm baffled about this error.</p>
    try self.checkAvailability()
    
    let prompt = &quot;&quot;&quot;
    Please generate at least \(numberOfIdeas) different and unique primary colors for the users idea which they are calling -&gt; \'\(name)\' and pitch -&gt; \'\(hero)\'
    &quot;&quot;&quot;

    let assistant = colorIdeasModelSession.streamResponse(to: prompt,
                                                        generating: [ColorChip].self,
                                                        includeSchemaInPrompt: true,
                                                        options: creativity.generationOptions)
    
    return assistant
}

    self.generatingIdeas = []
    focusField = nil
    
    do {
        
        withAnimation(.snappy) {
            generationStep = .streaming
        }
        
        let ideaStream = try agent.generateIdeas(name: self.projectName, hero: self.projectPitch, creativity: Creativity.allCases.randomElement() ?? .medium, numberOfIdeas: 5)
        
        //Error gets throws from here.
        for try await partialResponse in ideaStream {
            self.generatingIdeas = partialResponse.content
        }
        
        withAnimation(.snappy) {
            generationStep = .finished
        }
        
        generationText = &quot;Generate again&quot;
    }catch {
        generationStep = .error(error)
    }
}