Posts under Machine Learning & AI topic

Post

Replies

Boosts

Views

Activity

Neural Engine compiler fails ("Graph traversal failure", Code=22) on a slice of a concat; the model silently falls back to the CPU
Environment: Mac mini, Apple M2 Pro (Mac14,12), macOS 27.2 (26B123). coremltools 9.0, mlprogram, iOS17 target. Disclosure. I used AI to find and triage this: to bisect the model, isolate the pattern and draft this post. The reproducer and every result above were run on the machine described. Summary. I load the model with computeUnits = .cpuAndNeuralEngine. If the program slices a concat's output along the last axis (slice_by_index) and then joins the slice with other tensors (concat or stack), the Neural Engine compiler refuses the program. MLModel still loads without an error, but runs every operation on the CPU. On a large model, a streaming speech encoder, this costs: a load of 20 s to 6 minutes, at every launch; 1.1 to 1.8 GB of extra memory, because the weights are copied to float32; inference about 15 times slower. MLComputePlan puts 0 of the model's 1,674 operations on the Neural Engine. If the program computes the same values without slicing the concat, the compiler accepts it, and the whole model runs on the Neural Engine. The pattern is common. It is the cache update of a streaming convolution: next_cache = concat(cache, x)[..., -K:]. Reproducer. The script needs coremltools 9.0. It writes refused.mlpackage, or fixed.mlpackage with --fix: import sys import numpy as np import coremltools as ct from coremltools.converters.mil import Builder as mb from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.passes.pass_pipeline import PassPipeline N, C, T, K = 24, 1024, 7, 8 # layers, channels, new frames per step, cached frames FIX = "--fix" in sys.argv rng = np.random.default_rng(0) W = [(rng.standard_normal((C, 1, K + 1)) * 0.1).astype(np.float16) for _ in range(N)] @mb.program(input_specs=[mb.TensorSpec(shape=(1, N, C, K), dtype=types.fp16), mb.TensorSpec(shape=(1, C, T), dtype=types.fp16)], opset_version=ct.target.iOS17) def prog(cache, x): v = mb.transpose(x=cache, perm=[1, 0, 2, 3]) outs, h = [], x for i in range(N): c = mb.slice_by_index(x=v, begin=[i, 0, 0, 0], end=[i + 1, 1, 0, 0], end_mask=[False, False, True, True], squeeze_mask=[True, False, False, False]) # [1, C, K] new = mb.concat(values=[c, h], axis=-1) # [1, C, K+T] if FIX: # the same values, without cutting the concat o = mb.concat(values=[mb.slice_by_index(x=c, begin=[0, 0, T], end=[1, C, K]), h], axis=-1) else: # the next cache: the last K columns of the concat (start 7, width 8) o = mb.slice_by_index(x=new, begin=[0, 0, T], end=[1, C, T + K]) outs.append(o) h = mb.conv(x=new, weight=W[i], groups=C, pad_type="valid") # [1, C, T] return mb.transpose(x=mb.stack(values=outs, axis=0), perm=[1, 0, 2, 3]), h pipe = PassPipeline.EMPTY # keep the ops as written pipe.append_pass("common::dead_code_elimination") m = ct.convert(prog, convert_to="mlprogram", minimum_deployment_target=ct.target.iOS17, pass_pipeline=pipe, compute_precision=ct.precision.FLOAT32) m.save("fixed.mlpackage" if FIX else "refused.mlpackage")How to see the failure. Start the log, then load each model with .cpuAndNeuralEngine: log stream --level info --predicate 'process == "ANECompilerService"'refused: the log shows allocation hint propogation fails …, MirInfo propogation fails … and Calling ANE compiler done ret(22). The model then runs on the CPU, and MLComputePlan shows no Neural Engine operations. fixed: the log shows ret(0), and the model runs on the Neural Engine. With private data logging on, the compiler names the operation: allocation hint propogation fails in y and MirInfo propogation fails in y/src, then Compiler internal error: Graph traversal failure (target h14g). Here y is the concat that joins the slice, and y/src is the slice. What causes the failure. I changed one property at a time. The compiler fails only when all four conditions hold: a slice_by_index slices a concat's output along the last axis; the slice starts at an offset that is not a multiple of 8 elements (here 7); the slice's width is a multiple of 8 but not of 32 (here 8); a concat or stack then joins the slice with other tensors. These cases compile: starts 0, 8, 16, 24 and 32, and widths 1, 2, 4, 9, 12, 31, 32, 33 and 64. The result does not depend on the number of channels (1 to 1,024), the number of layers or slices (2 to 24), or the weights. Slicing the inputs instead (--fix) compiles. I applied the rewrite to a real model that has this pattern in 24 layers. On the CPU, its outputs are identical to the original's. On the Neural Engine, its word error rate is the same as the original model's on the CPU. Questions. Is this a known limitation of the M2-generation (h14g) compiler, or a bug? Other reports describe similar "propogation" or register-allocation failures on M2- and M3-family chips, with streaming encoders that compile on M5. Could Core ML report the refusal instead of silently loading the model on the CPU? Today the only signals are the log and the memory footprint. Core ML does not cache the failed compile, so every launch repeats it. Is there a recommended way to write a streaming cache update for the Neural Engine?
0
0
36
1w
Siri AI tools: how do I make an App Intent available to Siri but not listed in Shortcuts?
With the Siri AI Developer Preview in iOS 27.3 beta 1, we are exposing custom intents to Siri as tools with @AppIntent(.tool). Some of these only make sense for Siri, for example a read-only status tool whose result Siri phrases as an answer, or variants that would duplicate existing Shortcuts actions. Our app already has a long list of Shortcuts actions, so we would like these tools to be available to Siri AI without appearing as actions in the Shortcuts app. @available(iOS 27.3, *) @AppIntent(.tool) struct GetStatusIntent: AppIntent { static let title: LocalizedStringResource = "Get Status" @Parameter(title: "Item") var item: ItemEntity func perform() async throws -> some IntentResult & ReturnsValue<StatusEntity> { // ... } }What we have tried on iOS 27.3 beta 1: static let isDiscoverable = false hides the action from Shortcuts, but Siri then never called the tool and used a different one instead. Conforming to DeprecatedAppIntent while keeping it discoverable also hides the action, but Siri stopped calling the tool over repeated attempts. Removing the deprecation brought it straight back. isAssistantOnly would describe what we want, but it only exists on AssistantSchemaIntent, and combining .tool with a Siri-supported schema is a build error. ToolIntent itself has no requirements in the 27.3 SDK. IntentVisibility only applies to entity properties, and .internal hides the property from Siri as well. Questions: Is there a supported way to make an intent available to Siri AI while keeping it out of the Shortcuts action list? Is it intended that isDiscoverable = false and DeprecatedAppIntent also make a tool unavailable to Siri AI? If there is no such option today, is one planned, and is there a feedback number we should reference? Related question about schema intents: https://developer.apple.com/forums/thread/838658 Thanks!
1
8
218
1w
Core Spotlight Semantic Search - still non-functional for 1+ year after WWDC24?
After more than a year since the announcement, I'm still unable to get this feature working properly and wondering if there are known issues or missing implementation details. Current Setup: Device: iPhone 16 Pro Max iOS: 26 beta 3 Development: Tested on both Xcode 16 and Xcode 26 Implementation: Following the official documentation examples The Problem: Semantic search simply doesn't work. Lexical search functions normally, but enabling semantic search produces identical results to having it disabled. It's as if the feature isn't actually processing. Error Output (Xcode 26): [QPNLU][qid=5] Error Domain=com.apple.SpotlightEmbedding.EmbeddingModelError Code=-8007 "Text embedding generation timeout (timeout=100ms)" [CSUserQuery][qid=5] got a nil / empty embedding data dictionary [CSUserQuery][qid=5] semanticQuery failed to generate, using "(false)" In Xcode 16, there are no error messages at all - the semantic search just silently fails. Missing Resources: The sample application mentioned during the WWDC24 presentation doesn't appear to have been released, which makes it difficult to verify if my implementation is correct. Would really appreciate any guidance or clarification on the current status of this feature. Has anyone in the community successfully implemented this?
7
5
4.3k
1w
iOS 27.3 beta: Apple Intelligence works in system UI, but Foundation Models returns deviceNotEligible on a mainland China iPhone Duo
Hello Apple team, After updating an iPhone Duo purchased in mainland China to iOS 27.3 beta, Apple Intelligence appears to be available at the system level: Apple Intelligence is visible in Settings. Pressing and holding the side button successfully activates the system assistant. The multicolored glow appears around the edges of the screen while using it. However, when developing an app using the Foundation Models framework, the on-device model reports that this device is not eligible, and an actual generation request is also rejected. Environment Physical device: iPhone Duo (iPhone19,4) iOS version: 27.3 beta OS build: 24C5037i Build toolchain: Xcode 27.1 / iPhoneOS 27.1 SDK Diagnostic app deployment target: iOS 26.0 Developer Mode: enabled Reported locale: zh-Hans_HK Minimal reproduction We built and installed a separate, minimal diagnostic app to rule out our main app’s business logic. It reads the model availability and attempts one request containing only synthetic test text: let model = SystemLanguageModel.default print(model.availability) print(model.supportsLocale(Locale(identifier: "zh_CN"))) do { let session = LanguageModelSession( instructions: "Reply briefly. This is a synthetic device diagnostic." ) let response = try await session.respond(to: "Reply with OK.") print(response.content) } catch { print(String(reflecting: type(of: error))) print(String(describing: error)) }Results on the physical device availability: unavailable( FoundationModels.SystemLanguageModel.Availability .UnavailableReason.deviceNotEligible ) supportsLocale(zh_CN): true error_type: FoundationModels.SystemLanguageModel.Error error: This device does not support Apple Intelligence.The availability remains deviceNotEligible after the request. Could you please clarify: Does the mainland China Apple Intelligence rollout in iOS 27.3 beta include third-party access to the on-device model through Foundation Models? Is this a known issue or an expected limitation of this beta? Is building with Xcode 27.3 / the iOS 27.3 SDK required for this access? Does enabling the Qwen extension affect Foundation Models eligibility, or is that extension independent of SystemLanguageModel.default? We can provide the minimal diagnostic project and additional diagnostics if needed. Thank you.
0
0
297
1w
ToolIntent experience on watchOS
ToolIntent is currently marked unavailable on watchOS. (FB25455121) When Siri is invoked on Watch, what behavior(s) can users expect when invoking ToolIntents declared in our paired iOS codebase? Example use case: At their gym, a user leaves their iPhone face down nearby. To Siri on their Watch, they say "I just did 350 lbs 8 reps to failure" or "Rest for 3 minutes" or "Hack squat machine is busy, let's jump to the next exercise". If it matters, we benefit from extended background runtime via a mirrored live HKWorkout between our watch app and iPhone app (which displays a Live Activity).
0
0
267
1w
What can @Property(visibility: .internal) do that a plain var can’t?
Hello, My understanding is that @Property(visibility: .internal) makes an AppEntity field available to the app and its extensions through App Intents while hiding it from Siri and Shortcuts. But both the app and its extensions can already read a plain Swift property on a CatEntity instance they’ve loaded. // Plain Swift property var internalNote: String // Internal App Intents property @Property(visibility: .internal) var internalNote: StringWhat does the annotation enable in practice that a plain Swift property doesn’t?
0
1
265
1w
On-device specialization of ahead-of-time compiled Core AI LLM bundles preallocates 35 GB and crashes the app
I am shipping Core AI language models in an App Store app and have followed the ahead-of-time compilation workflow from WWDC26 session 326 and the article "Compiling Core AI models ahead of time". The remaining on-device specialization step is unusable for LLM exports, and I would like to know whether there is a supported way around it. Setup Models are exported with the coreai-models recipes and compiled with coreai-build for the Neural Engine: uv run coreai.llm.export Qwen/Qwen3-0.6B --platform iOS --compression-config models/qwen3/qwen3_0_6b_mixed_4bit_8bit.yaml xcrun coreai-build compile <model>.aimodel --platform iOS --architecture h18pThe compiled .aimodelc bundles are hosted remotely, one per architecture, and selected at runtime with AIModel.deviceArchitectureName. Loading uses CoreAILanguageModel(resourcesAt:) and FoundationModels.LanguageModelSession. Xcode 27.1 (27A9275), coreai-build 3600.83.1, coreai-models cc3c234, iPhone 17 Pro. The published bundles are public for reproduction: https://huggingface.co/333i/qwen3-0.6b-coreai-ios https://huggingface.co/333i/smollm2-1.7b-coreai-ios What happens on device Each compiled bundle carries its 30 Neural Engine regions (extend and prompt_opt, contexts 256 to 4096, query sizes 8, 16 and 64) as .mlir.bc under main-h18p-delegates/MPSGraph. On first load, ANELargeModelCompilerService compiles all 30 on the device. Qwen3 0.6B: the first reply takes over two minutes. Later launches load from the cache in about eight seconds. SmolLM2 1.7B: the compile fails after about a minute. The device reported 56 GB free. Freeing 20 GB more moved the failure from 33.6 GB to 35.5 GB. ANELargeModelCompilerService Convert 27/30 procedures of ANEHLO task 308/7012 ANELargeModelCompilerService ANECompiler internal error: temp file: F_PREALLOCATE failure (35500589056 bytes) -> (35511074816 bytes): No space left on device ANELargeModelCompilerService Caught ZinException kernel ERROR: [ANELargeModelCompilerService:61615] FATAL exception: type=0x1 reason=0x25 code=0x106 aned Could not create connection to com.apple.ANELargeModelCompilerService MPSGraphANEUtils.mm:1033: Error = Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.ANELargeModelCompilerService" MPSGraphANEUtils.mm:1038: ANE compile failed! MPSGraphExecutable_Project.h:510: failed assertion `could not load module from MPSGraphPackage'The assertion terminates the app. No error reaches the load call, so there is no way to fall back or tell the user what happened. Compiling the same export with --preferred-compute gpu avoids the Neural Engine compiler but allocates roughly 0.5 GB of GPU memory per compiled function at load time. The 0.6B model reaches a 17 GB footprint at 4096 context on a Mac and is killed by Jetsam at about 6 GB on iPhone 17 Pro. What I have ruled out The ahead-of-time workflow is followed as documented. The article states that the compiled asset still requires some specialization on the device, and for these exports that residual step is the Neural Engine compile described above. coreai-build compile --help offers no option to generate the Neural Engine executables on the build machine. The failure reproduces on the October 18 runtime and on coreai-models cc3c234. Disk space is not the limit in practice. The compiler preallocates more than 30 GB of temporary storage for a 1.7B model, which no production device can be expected to provide. Related reports apple/coreai-models issue 387 (this failure, open since October 27 with no response): https://github.com/apple/coreai-models/issues/387 apple/coreai-models issue 406: a 0.6B export measured at roughly 600 seconds per specialization on iPhone 16 Pro Max, with Jetsam kills during specialization on a current-toolchain export. apple/coreai-models issue 205: coreai-build exits 0 and writes a GPU-only bundle when offline Neural Engine compilation fails, with an empty ErrorList. The Gemma 4 README in coreai-models states that ahead-of-time compilation is not supported for that model on the Xcode 27.2 beta toolchain and recommends on-device specialization from the raw .aimodel, which is the same path that fails here at 1.7B. Questions Is there a supported way to generate the Neural Engine executables for an LLM bundle on the build machine, so that no ANELargeModelCompilerService run happens on the user's device? If on-device specialization is the intended path, is there a bound on its temporary storage and time, and can the export emit fewer specializations or share work across them? Can a Neural Engine compile failure be surfaced as an error from the load call instead of an MPSGraph assertion that terminates the process? Is the per-function GPU memory in the --preferred-compute gpu build expected, and is there an export option that avoids it? At this point I have removed Core AI text models from the shipping app and kept Core AI for diffusion only, where ahead-of-time compilation works well. I would like to bring the text models back and am happy to test any build or export change.
1
0
133
1w
Using Siri to Control In-App Navigation and Perform Multiple Actions
Is it possible to integrate Siri into an iOS app in a way that allows users to control the app entirely through voice commands? For example, imagine a user saying: “Siri, open my add-ons and show me my available internet packages.” I would like to understand whether Siri, using App Intents or another Apple framework, can: Recognize a voice command and identify the requested action. Navigate to a specific section of the app's Home Screen, even if that section is currently outside the visible area. Automatically scroll to the relevant UI component and bring it into view. Navigate to other screens when required. Perform multiple actions as part of one continuous experience, such as scrolling, opening a screen, selecting an option, and triggering an API request. My main question is: Can we create a conversational, voice-controlled experience where a single Siri command can trigger a sequence of UI navigation and app-related operations, rather than simply opening the app or navigating to a predefined screen? What are the recommended Apple frameworks and best practices for implementing this kind of experience?
0
0
86
2w
CoreML Model Cache Issues
Hi, is there any way to have caching done better for CoreML models (ANE)? Right now from my testing, after the first model compile and specialization, the cached model loads fast etc, but it only persists until an app update, even if nothing was changed on the app side. Just changing the build number is enough to invalidate the cache and require the first time compilation and load again. This seems like such a huge issue to me, and I'm hoping I'm just missing something, and this isn't intended behaviour, especially with the massive degradation in first time model compilation and speialization time for A20 and M6 devices which have a larger neural engine.
4
0
839
2w
FoundationModels API Availability, deviceNotEligible Error on CH/A Hardware, and Roadmap Timeline (Team ID: NVQ5CF8F2X)
Dear Apple Developer Relations & Technical Support Team, I am an iOS developer based in Mainland China. We are currently developing an on-device AI-powered translation assistant for reading original English books, targeted at a global market. We have upgraded our development setup to Xcode 27.3 Beta and iOS 27.3 Beta. When attempting to invoke the FoundationModels API on an iPhone 15 Pro (Mainland China SKU: MTQA3CH/A), the system fails to initialize and returns the following diagnostics: Availability: unavailable(FoundationModels.SystemLanguageModel.Availability.UnavailableReason.deviceNotEligible) Raw Error: FoundationModels.SystemLanguageModel.Error Code 0 ("The assets required for the session are unavailable.") Language Support: supportsLocale(zh-Hans): true Considering that the iPhone 15 Pro hardware (A17 Pro chip) meets the necessary performance criteria and the framework reports that Simplified Chinese is supported, we would like to consult with you on the following key questions: Current Availability & Expected Release Timeline: Is the FoundationModels API currently completely disabled for Mainland China hardware models (CH/A)? If it is currently restricted, when is it expected to become available for developers and users in Mainland China? If there is an established roadmap or target release schedule, could you please share a specific timeline so we can plan our product roadmap and release cadence accordingly? Model Strategy for Mainland China: In Mainland China, will Apple eventually enable the standard FoundationModels API seamlessly under the hood, or will a different, locally-partnered/compliant AI model be required to satisfy regional regulations? Should developers expect the existing FoundationModels API to unlock in the future, or should we design a separate, alternative AI backend specifically for the Mainland China market? Testing Solutions for Global App Deployment: Since our application is intended for global release outside Mainland China, what is the official recommended workflow for China-based developers using CH/A devices to test and debug FoundationModels features during this beta phase (e.g., using Xcode Simulator, overseas non-CH/A hardware, or a developer sandbox/allowlist)? Environment & Diagnostic Details: Developer Team ID: NVQ5CF8F2X Xcode Version: Version 27.3 beta (Build: 27C5020n) iOS Version: Version 27.3 (Build: 24C5037i) Test Device: iPhone 15 Pro (Hardware: iPhone16,1, Model: MTQA3CH/A) Diagnostic State: isAvailable = false, deviceNotEligible Error: Domain=FoundationModels.SystemLanguageModel.Error, Code=0, "The assets required for the session are unavailable." Thank you very much for your time and assistance. We look forward to hearing your insights. Sincerely, Kai
0
1
333
2w
iOS 27: Siri AI entry appears in text-selection edit menu even with writingToolsBehavior = .none — no API can suppress it?
Our app is a secure enterprise portal (business email, files, chat) for MDM-managed corporate devices. Preventing selected text from leaving the app is a hard product requirement, so we opt out of Writing Tools everywhere. On iOS 27.2, the Siri AI entry still appears in the text-selection edit menu (the bubble menu shown on long-press/selection), in both WKWebView and UITextView, and it allows sending the selected text to Siri. We have exhausted every public API and documented all of it: writingToolsBehavior = .none is set and verified at runtime. WKWebViewConfiguration.writingToolsBehavior == .none (-1) before the web view is created, and the web view's internal content view also reports -1. UITextView.writingToolsBehavior = .none as well. The documentation for UIWritingToolsBehavior.none says "Writing Tools will ignore this view", so we expected no AI entry point for selections in these views. The entry is not in UIMenuBuilder. We dumped the entire menu tree in buildMenu(with:) (root and all children, before and after calling super): only standard-edit / open / format / learn / speech / share are present. There is no Siri-related menu or command to remove. The entry does not go through canPerformAction(_:withSender:). We log every selector that is queried; no Siri/WritingTools-related selector ever appears. Our override returns false for everything except cut/copy/paste/select/ selectAll/delete — yet the Siri AI entry is still shown. Even a fully custom menu does not help. Returning a UIMenu built from scratch (only our own UIActions, ignoring suggestedActions) from textView(_:editMenuForTextIn:suggestedActions:) still gets the Siri AI entry attached to the presented edit menu. So the entry is attached to the edit-menu container itself, not to the menu contents. Questions: Is there any supported API on iOS 27 for an app to suppress the Siri AI entry in the edit menu for specific views (or app-wide)? If not, is this intended behavior? It appears to contradict the documented contract of UIWritingToolsBehavior.none ("Writing Tools will ignore this view"). Is there a recommended approach for apps handling confidential data (banking/меdical/enterprise) other than the MDM allowWritingTools restriction? Environment: iOS 27.2 (Iphone 16Pro), Xcode 27.2, deployment target iOS 13.
0
0
360
2w
foundation-models-utilities 1.1.0: Skill(allowsDeactivation: false) can still be deactivated by the model
I'm using foundation-models-utilities 1.1.0 (tag at 6c5a04c). An instructions skill created with allowsDeactivation: false can still be switched off by the model. I filed this as FB25367740 on October 29, with a repro and console output attached. The measurements below are from 1.1.0-beta1 (cc3820d). The only commit between 1.1.0-beta1 and 1.1.0 changes README.md and SKILL.md, so the stable release behaves the same. Setup One instructions skill, metric-units, with allowsDeactivation left at its default, false. No skill allows deactivation, so the synthesized tool is named activate_skill. Three prompts in one session, with .greedy sampling: "From now on, give every measurement in metric units." "Keep using metric units, please. How far is 3 miles?" "Switch metric mode off." Expected metric-units stays active through all three turns. Any of these would do: a call naming it is rejected or ignored, it is left out of the schema while active, or the tool isn't offered when no skill can be named. Actual (identical across repeated runs) Default, strictSchema: false: Turn 1: activate_skill {"skill": "metric-units"} → "Successfully activated skill: metric-units". Active: ["metric-units"]. Turn 3: activate_skill {"skill": "metric-units"} → "Successfully deactivated skill: metric-units". Active: []. The model answered, "Metric mode is now off." strictSchema: true: Turn 2: with the skill active, the argument's enum is empty ("enum": []), but the tool is still offered. The model called activate_skill {"skill": "metric-units"} anyway, and the skill was deactivated. Active: []. Turn 3: it called the tool again and re-activated the skill. The model answered, "Metric mode is now active again." Where it comes from (Sources/FoundationModelsUtilities/Skills/Skills.swift at 1.1.0) The onCall closure toggles any instructions skill without reading that skill's allowsDeactivation: case .instructions: if activations.isActive(skill.name) { activations.deactivate(skill.name) skill.deactivate() } else { activations.activate(skill.name) skill.activate() }ToggleSkillTool.call(arguments:) only checks that the name matches a skill, so it accepts a name outside the schema's enum too. The schema has a related gap. In ToggleSkillTool.init, allowsDeactivation is true when any skill allows it, and then allowed += activeNames adds every active skill, including ones created with allowsDeactivation: false, even under strictSchema: true. I found this one by reading the source. It isn't in FB25367740, and I haven't measured it. Possible fix Check the skill's own allowsDeactivation before deactivating it, and return a message saying it stays active. Add to allowed only the active skills that allow deactivation. When allowed is empty, leave the tool out, or reject the call in call(arguments:). Environment Model: on-device SystemLanguageModel.default Package: foundation-models-utilities 1.1.0-beta1 (cc3820d); the Skills code is unchanged in 1.1.0 macOS 27.2 (26B123), MacBook Pro (Mac15,9), Apple M3 Max, Xcode 27.1 (27A9275)
0
0
280
2w
foundation-models-utilities 1.1.0-beta1: README and bundled SKILL.md inconsistencies
I've been working with foundation-models-utilities and noticed a few places where the README and bundled SKILL.md don’t match the code. I’m using version 1.1.0-beta1 (commit cc3820d). Here’s what I found: SkillActivations collection conformance. The README says it conforms to RandomAccessCollection. The implementation conforms to Sendable and Observable, and exposes activeSkillNames and isActive(_:) instead. Package dependency version. The installation example uses from: "1.0.0". With only prerelease tags available when checked, that stable version requirement does not resolve. An example referencing a published beta would help. Local server URL. Both ChatCompletionsLanguageModel examples use http://localhost/v1:8000. For port 8000 and base path /v1, the URL should be http://localhost:8000/v1; the existing example places :8000 in the path. SwiftPM traits and conditional compilation. The bundled SKILL.md describes ChatCompletions, Skills, and History traits, and says the sources use matching #if gates. However, Package.swift declares no traits, and those gates are absent from the sources. Could you update the documentation to match this release? The bundled agent skill is particularly relevant because coding assistants may otherwise generate configuration for traits the package does not provide.
2
0
600
2w
Foundation Models availability in mainland China
Hi, Apple recently announced that Apple Intelligence will launch in mainland China with iOS 27.3. Will the Foundation Models framework also become available to third-party apps in mainland China? If so, will it use the new iOS 27 Apple Foundation Model or an older version? Will the new capabilities and Private Cloud Compute also be supported? Thanks!
2
0
390
2w
App Intent actions missing from Shortcuts on some iOS 27 devices
Hello, Our app provides two actions in the Shortcuts app. However, on some devices running iOS 27, neither action appears, preventing users from setting up automations during onboarding. We have not observed this issue on earlier iOS versions. Implementation Both actions conform to LiveActivityIntent, with their corresponding App Shortcuts declared in an AppShortcutsProvider. Both have a required AppEntity parameter, with initial parameter options provided by EntityQuery.suggestedEntities(). We call updateAppShortcutParameters() at app startup and after saving changes to the platform selection. Observed behavior Only some iOS 27 devices are affected. Some affected users report that the actions appear a few days later, but we have not identified what triggers their appearance. Has anyone encountered similar behavior? Is there a known registration or indexing issue, or anything in this implementation that we should investigate? This blocks a key step in our new-user onboarding, so we would greatly appreciate any guidance or workaround. Thank you.
0
0
97
2w
Testing the side button assistant entitlement outside Japan?
I'm building a voice app called Moonstone that works like a hands free coding agent for the iPhone. You talk to it and it opens apps, taps through them and gets real tasks done, mostly on a local model running on the phone. I have the side button access entitlement, an App Intent using the assistant activate schema, and my development profile installed on an iPhone 18 Pro Max on the iOS 27.2 developer beta. The docs say the profile is enough to test during development, but here in the US the Side Button option never shows up in Settings. I tried switching the region to Japan and restarting and it still didn't appear. I filed FB25304176. Has anyone outside Japan gotten the setting to show up on a development device?
0
0
203
2w
Neural Engine compiler fails ("Graph traversal failure", Code=22) on a slice of a concat; the model silently falls back to the CPU
Environment: Mac mini, Apple M2 Pro (Mac14,12), macOS 27.2 (26B123). coremltools 9.0, mlprogram, iOS17 target. Disclosure. I used AI to find and triage this: to bisect the model, isolate the pattern and draft this post. The reproducer and every result above were run on the machine described. Summary. I load the model with computeUnits = .cpuAndNeuralEngine. If the program slices a concat's output along the last axis (slice_by_index) and then joins the slice with other tensors (concat or stack), the Neural Engine compiler refuses the program. MLModel still loads without an error, but runs every operation on the CPU. On a large model, a streaming speech encoder, this costs: a load of 20 s to 6 minutes, at every launch; 1.1 to 1.8 GB of extra memory, because the weights are copied to float32; inference about 15 times slower. MLComputePlan puts 0 of the model's 1,674 operations on the Neural Engine. If the program computes the same values without slicing the concat, the compiler accepts it, and the whole model runs on the Neural Engine. The pattern is common. It is the cache update of a streaming convolution: next_cache = concat(cache, x)[..., -K:]. Reproducer. The script needs coremltools 9.0. It writes refused.mlpackage, or fixed.mlpackage with --fix: import sys import numpy as np import coremltools as ct from coremltools.converters.mil import Builder as mb from coremltools.converters.mil.mil import types from coremltools.converters.mil.mil.passes.pass_pipeline import PassPipeline N, C, T, K = 24, 1024, 7, 8 # layers, channels, new frames per step, cached frames FIX = "--fix" in sys.argv rng = np.random.default_rng(0) W = [(rng.standard_normal((C, 1, K + 1)) * 0.1).astype(np.float16) for _ in range(N)] @mb.program(input_specs=[mb.TensorSpec(shape=(1, N, C, K), dtype=types.fp16), mb.TensorSpec(shape=(1, C, T), dtype=types.fp16)], opset_version=ct.target.iOS17) def prog(cache, x): v = mb.transpose(x=cache, perm=[1, 0, 2, 3]) outs, h = [], x for i in range(N): c = mb.slice_by_index(x=v, begin=[i, 0, 0, 0], end=[i + 1, 1, 0, 0], end_mask=[False, False, True, True], squeeze_mask=[True, False, False, False]) # [1, C, K] new = mb.concat(values=[c, h], axis=-1) # [1, C, K+T] if FIX: # the same values, without cutting the concat o = mb.concat(values=[mb.slice_by_index(x=c, begin=[0, 0, T], end=[1, C, K]), h], axis=-1) else: # the next cache: the last K columns of the concat (start 7, width 8) o = mb.slice_by_index(x=new, begin=[0, 0, T], end=[1, C, T + K]) outs.append(o) h = mb.conv(x=new, weight=W[i], groups=C, pad_type="valid") # [1, C, T] return mb.transpose(x=mb.stack(values=outs, axis=0), perm=[1, 0, 2, 3]), h pipe = PassPipeline.EMPTY # keep the ops as written pipe.append_pass("common::dead_code_elimination") m = ct.convert(prog, convert_to="mlprogram", minimum_deployment_target=ct.target.iOS17, pass_pipeline=pipe, compute_precision=ct.precision.FLOAT32) m.save("fixed.mlpackage" if FIX else "refused.mlpackage")How to see the failure. Start the log, then load each model with .cpuAndNeuralEngine: log stream --level info --predicate 'process == "ANECompilerService"'refused: the log shows allocation hint propogation fails …, MirInfo propogation fails … and Calling ANE compiler done ret(22). The model then runs on the CPU, and MLComputePlan shows no Neural Engine operations. fixed: the log shows ret(0), and the model runs on the Neural Engine. With private data logging on, the compiler names the operation: allocation hint propogation fails in y and MirInfo propogation fails in y/src, then Compiler internal error: Graph traversal failure (target h14g). Here y is the concat that joins the slice, and y/src is the slice. What causes the failure. I changed one property at a time. The compiler fails only when all four conditions hold: a slice_by_index slices a concat's output along the last axis; the slice starts at an offset that is not a multiple of 8 elements (here 7); the slice's width is a multiple of 8 but not of 32 (here 8); a concat or stack then joins the slice with other tensors. These cases compile: starts 0, 8, 16, 24 and 32, and widths 1, 2, 4, 9, 12, 31, 32, 33 and 64. The result does not depend on the number of channels (1 to 1,024), the number of layers or slices (2 to 24), or the weights. Slicing the inputs instead (--fix) compiles. I applied the rewrite to a real model that has this pattern in 24 layers. On the CPU, its outputs are identical to the original's. On the Neural Engine, its word error rate is the same as the original model's on the CPU. Questions. Is this a known limitation of the M2-generation (h14g) compiler, or a bug? Other reports describe similar "propogation" or register-allocation failures on M2- and M3-family chips, with streaming encoders that compile on M5. Could Core ML report the refusal instead of silently loading the model on the CPU? Today the only signals are the log and the memory footprint. Core ML does not cache the failed compile, so every launch repeats it. Is there a recommended way to write a streaming cache update for the Neural Engine?
Replies
0
Boosts
0
Views
36
Activity
1w
Siri AI tools: how do I make an App Intent available to Siri but not listed in Shortcuts?
With the Siri AI Developer Preview in iOS 27.3 beta 1, we are exposing custom intents to Siri as tools with @AppIntent(.tool). Some of these only make sense for Siri, for example a read-only status tool whose result Siri phrases as an answer, or variants that would duplicate existing Shortcuts actions. Our app already has a long list of Shortcuts actions, so we would like these tools to be available to Siri AI without appearing as actions in the Shortcuts app. @available(iOS 27.3, *) @AppIntent(.tool) struct GetStatusIntent: AppIntent { static let title: LocalizedStringResource = "Get Status" @Parameter(title: "Item") var item: ItemEntity func perform() async throws -> some IntentResult & ReturnsValue<StatusEntity> { // ... } }What we have tried on iOS 27.3 beta 1: static let isDiscoverable = false hides the action from Shortcuts, but Siri then never called the tool and used a different one instead. Conforming to DeprecatedAppIntent while keeping it discoverable also hides the action, but Siri stopped calling the tool over repeated attempts. Removing the deprecation brought it straight back. isAssistantOnly would describe what we want, but it only exists on AssistantSchemaIntent, and combining .tool with a Siri-supported schema is a build error. ToolIntent itself has no requirements in the 27.3 SDK. IntentVisibility only applies to entity properties, and .internal hides the property from Siri as well. Questions: Is there a supported way to make an intent available to Siri AI while keeping it out of the Shortcuts action list? Is it intended that isDiscoverable = false and DeprecatedAppIntent also make a tool unavailable to Siri AI? If there is no such option today, is one planned, and is there a feedback number we should reference? Related question about schema intents: https://developer.apple.com/forums/thread/838658 Thanks!
Replies
1
Boosts
8
Views
218
Activity
1w
Core Spotlight Semantic Search - still non-functional for 1+ year after WWDC24?
After more than a year since the announcement, I'm still unable to get this feature working properly and wondering if there are known issues or missing implementation details. Current Setup: Device: iPhone 16 Pro Max iOS: 26 beta 3 Development: Tested on both Xcode 16 and Xcode 26 Implementation: Following the official documentation examples The Problem: Semantic search simply doesn't work. Lexical search functions normally, but enabling semantic search produces identical results to having it disabled. It's as if the feature isn't actually processing. Error Output (Xcode 26): [QPNLU][qid=5] Error Domain=com.apple.SpotlightEmbedding.EmbeddingModelError Code=-8007 "Text embedding generation timeout (timeout=100ms)" [CSUserQuery][qid=5] got a nil / empty embedding data dictionary [CSUserQuery][qid=5] semanticQuery failed to generate, using "(false)" In Xcode 16, there are no error messages at all - the semantic search just silently fails. Missing Resources: The sample application mentioned during the WWDC24 presentation doesn't appear to have been released, which makes it difficult to verify if my implementation is correct. Would really appreciate any guidance or clarification on the current status of this feature. Has anyone in the community successfully implemented this?
Replies
7
Boosts
5
Views
4.3k
Activity
1w
iOS 27.3 beta: Apple Intelligence works in system UI, but Foundation Models returns deviceNotEligible on a mainland China iPhone Duo
Hello Apple team, After updating an iPhone Duo purchased in mainland China to iOS 27.3 beta, Apple Intelligence appears to be available at the system level: Apple Intelligence is visible in Settings. Pressing and holding the side button successfully activates the system assistant. The multicolored glow appears around the edges of the screen while using it. However, when developing an app using the Foundation Models framework, the on-device model reports that this device is not eligible, and an actual generation request is also rejected. Environment Physical device: iPhone Duo (iPhone19,4) iOS version: 27.3 beta OS build: 24C5037i Build toolchain: Xcode 27.1 / iPhoneOS 27.1 SDK Diagnostic app deployment target: iOS 26.0 Developer Mode: enabled Reported locale: zh-Hans_HK Minimal reproduction We built and installed a separate, minimal diagnostic app to rule out our main app’s business logic. It reads the model availability and attempts one request containing only synthetic test text: let model = SystemLanguageModel.default print(model.availability) print(model.supportsLocale(Locale(identifier: "zh_CN"))) do { let session = LanguageModelSession( instructions: "Reply briefly. This is a synthetic device diagnostic." ) let response = try await session.respond(to: "Reply with OK.") print(response.content) } catch { print(String(reflecting: type(of: error))) print(String(describing: error)) }Results on the physical device availability: unavailable( FoundationModels.SystemLanguageModel.Availability .UnavailableReason.deviceNotEligible ) supportsLocale(zh_CN): true error_type: FoundationModels.SystemLanguageModel.Error error: This device does not support Apple Intelligence.The availability remains deviceNotEligible after the request. Could you please clarify: Does the mainland China Apple Intelligence rollout in iOS 27.3 beta include third-party access to the on-device model through Foundation Models? Is this a known issue or an expected limitation of this beta? Is building with Xcode 27.3 / the iOS 27.3 SDK required for this access? Does enabling the Qwen extension affect Foundation Models eligibility, or is that extension independent of SystemLanguageModel.default? We can provide the minimal diagnostic project and additional diagnostics if needed. Thank you.
Replies
0
Boosts
0
Views
297
Activity
1w
Image Playground support download stuck on M5 iPad Pro
downloading support for image plaground isn’t working on a M5 11” iPad Pro 1tb. Running 27.3. Tried stopping it and restarting the download but it just says it’s downloading. I asked Siri and she said something about 7gb needed. Why isn’t this included in the OS download? Seems these are key asset to the app. What happened? Oppps, dumb question. As you were.
Replies
0
Boosts
0
Views
270
Activity
1w
ToolIntent experience on watchOS
ToolIntent is currently marked unavailable on watchOS. (FB25455121) When Siri is invoked on Watch, what behavior(s) can users expect when invoking ToolIntents declared in our paired iOS codebase? Example use case: At their gym, a user leaves their iPhone face down nearby. To Siri on their Watch, they say "I just did 350 lbs 8 reps to failure" or "Rest for 3 minutes" or "Hack squat machine is busy, let's jump to the next exercise". If it matters, we benefit from extended background runtime via a mirrored live HKWorkout between our watch app and iPhone app (which displays a Live Activity).
Replies
0
Boosts
0
Views
267
Activity
1w
What can @Property(visibility: .internal) do that a plain var can’t?
Hello, My understanding is that @Property(visibility: .internal) makes an AppEntity field available to the app and its extensions through App Intents while hiding it from Siri and Shortcuts. But both the app and its extensions can already read a plain Swift property on a CatEntity instance they’ve loaded. // Plain Swift property var internalNote: String // Internal App Intents property @Property(visibility: .internal) var internalNote: StringWhat does the annotation enable in practice that a plain Swift property doesn’t?
Replies
0
Boosts
1
Views
265
Activity
1w
On-device specialization of ahead-of-time compiled Core AI LLM bundles preallocates 35 GB and crashes the app
I am shipping Core AI language models in an App Store app and have followed the ahead-of-time compilation workflow from WWDC26 session 326 and the article "Compiling Core AI models ahead of time". The remaining on-device specialization step is unusable for LLM exports, and I would like to know whether there is a supported way around it. Setup Models are exported with the coreai-models recipes and compiled with coreai-build for the Neural Engine: uv run coreai.llm.export Qwen/Qwen3-0.6B --platform iOS --compression-config models/qwen3/qwen3_0_6b_mixed_4bit_8bit.yaml xcrun coreai-build compile <model>.aimodel --platform iOS --architecture h18pThe compiled .aimodelc bundles are hosted remotely, one per architecture, and selected at runtime with AIModel.deviceArchitectureName. Loading uses CoreAILanguageModel(resourcesAt:) and FoundationModels.LanguageModelSession. Xcode 27.1 (27A9275), coreai-build 3600.83.1, coreai-models cc3c234, iPhone 17 Pro. The published bundles are public for reproduction: https://huggingface.co/333i/qwen3-0.6b-coreai-ios https://huggingface.co/333i/smollm2-1.7b-coreai-ios What happens on device Each compiled bundle carries its 30 Neural Engine regions (extend and prompt_opt, contexts 256 to 4096, query sizes 8, 16 and 64) as .mlir.bc under main-h18p-delegates/MPSGraph. On first load, ANELargeModelCompilerService compiles all 30 on the device. Qwen3 0.6B: the first reply takes over two minutes. Later launches load from the cache in about eight seconds. SmolLM2 1.7B: the compile fails after about a minute. The device reported 56 GB free. Freeing 20 GB more moved the failure from 33.6 GB to 35.5 GB. ANELargeModelCompilerService Convert 27/30 procedures of ANEHLO task 308/7012 ANELargeModelCompilerService ANECompiler internal error: temp file: F_PREALLOCATE failure (35500589056 bytes) -> (35511074816 bytes): No space left on device ANELargeModelCompilerService Caught ZinException kernel ERROR: [ANELargeModelCompilerService:61615] FATAL exception: type=0x1 reason=0x25 code=0x106 aned Could not create connection to com.apple.ANELargeModelCompilerService MPSGraphANEUtils.mm:1033: Error = Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.ANELargeModelCompilerService" MPSGraphANEUtils.mm:1038: ANE compile failed! MPSGraphExecutable_Project.h:510: failed assertion `could not load module from MPSGraphPackage'The assertion terminates the app. No error reaches the load call, so there is no way to fall back or tell the user what happened. Compiling the same export with --preferred-compute gpu avoids the Neural Engine compiler but allocates roughly 0.5 GB of GPU memory per compiled function at load time. The 0.6B model reaches a 17 GB footprint at 4096 context on a Mac and is killed by Jetsam at about 6 GB on iPhone 17 Pro. What I have ruled out The ahead-of-time workflow is followed as documented. The article states that the compiled asset still requires some specialization on the device, and for these exports that residual step is the Neural Engine compile described above. coreai-build compile --help offers no option to generate the Neural Engine executables on the build machine. The failure reproduces on the October 18 runtime and on coreai-models cc3c234. Disk space is not the limit in practice. The compiler preallocates more than 30 GB of temporary storage for a 1.7B model, which no production device can be expected to provide. Related reports apple/coreai-models issue 387 (this failure, open since October 27 with no response): https://github.com/apple/coreai-models/issues/387 apple/coreai-models issue 406: a 0.6B export measured at roughly 600 seconds per specialization on iPhone 16 Pro Max, with Jetsam kills during specialization on a current-toolchain export. apple/coreai-models issue 205: coreai-build exits 0 and writes a GPU-only bundle when offline Neural Engine compilation fails, with an empty ErrorList. The Gemma 4 README in coreai-models states that ahead-of-time compilation is not supported for that model on the Xcode 27.2 beta toolchain and recommends on-device specialization from the raw .aimodel, which is the same path that fails here at 1.7B. Questions Is there a supported way to generate the Neural Engine executables for an LLM bundle on the build machine, so that no ANELargeModelCompilerService run happens on the user's device? If on-device specialization is the intended path, is there a bound on its temporary storage and time, and can the export emit fewer specializations or share work across them? Can a Neural Engine compile failure be surfaced as an error from the load call instead of an MPSGraph assertion that terminates the process? Is the per-function GPU memory in the --preferred-compute gpu build expected, and is there an export option that avoids it? At this point I have removed Core AI text models from the shipping app and kept Core AI for diffusion only, where ahead-of-time compilation works well. I would like to bring the text models back and am happy to test any build or export change.
Replies
1
Boosts
0
Views
133
Activity
1w
Using Siri to Control In-App Navigation and Perform Multiple Actions
Is it possible to integrate Siri into an iOS app in a way that allows users to control the app entirely through voice commands? For example, imagine a user saying: “Siri, open my add-ons and show me my available internet packages.” I would like to understand whether Siri, using App Intents or another Apple framework, can: Recognize a voice command and identify the requested action. Navigate to a specific section of the app's Home Screen, even if that section is currently outside the visible area. Automatically scroll to the relevant UI component and bring it into view. Navigate to other screens when required. Perform multiple actions as part of one continuous experience, such as scrolling, opening a screen, selecting an option, and triggering an API request. My main question is: Can we create a conversational, voice-controlled experience where a single Siri command can trigger a sequence of UI navigation and app-related operations, rather than simply opening the app or navigating to a predefined screen? What are the recommended Apple frameworks and best practices for implementing this kind of experience?
Replies
0
Boosts
0
Views
86
Activity
2w
CoreML Model Cache Issues
Hi, is there any way to have caching done better for CoreML models (ANE)? Right now from my testing, after the first model compile and specialization, the cached model loads fast etc, but it only persists until an app update, even if nothing was changed on the app side. Just changing the build number is enough to invalidate the cache and require the first time compilation and load again. This seems like such a huge issue to me, and I'm hoping I'm just missing something, and this isn't intended behaviour, especially with the massive degradation in first time model compilation and speialization time for A20 and M6 devices which have a larger neural engine.
Replies
4
Boosts
0
Views
839
Activity
2w
FoundationModels API Availability, deviceNotEligible Error on CH/A Hardware, and Roadmap Timeline (Team ID: NVQ5CF8F2X)
Dear Apple Developer Relations & Technical Support Team, I am an iOS developer based in Mainland China. We are currently developing an on-device AI-powered translation assistant for reading original English books, targeted at a global market. We have upgraded our development setup to Xcode 27.3 Beta and iOS 27.3 Beta. When attempting to invoke the FoundationModels API on an iPhone 15 Pro (Mainland China SKU: MTQA3CH/A), the system fails to initialize and returns the following diagnostics: Availability: unavailable(FoundationModels.SystemLanguageModel.Availability.UnavailableReason.deviceNotEligible) Raw Error: FoundationModels.SystemLanguageModel.Error Code 0 ("The assets required for the session are unavailable.") Language Support: supportsLocale(zh-Hans): true Considering that the iPhone 15 Pro hardware (A17 Pro chip) meets the necessary performance criteria and the framework reports that Simplified Chinese is supported, we would like to consult with you on the following key questions: Current Availability & Expected Release Timeline: Is the FoundationModels API currently completely disabled for Mainland China hardware models (CH/A)? If it is currently restricted, when is it expected to become available for developers and users in Mainland China? If there is an established roadmap or target release schedule, could you please share a specific timeline so we can plan our product roadmap and release cadence accordingly? Model Strategy for Mainland China: In Mainland China, will Apple eventually enable the standard FoundationModels API seamlessly under the hood, or will a different, locally-partnered/compliant AI model be required to satisfy regional regulations? Should developers expect the existing FoundationModels API to unlock in the future, or should we design a separate, alternative AI backend specifically for the Mainland China market? Testing Solutions for Global App Deployment: Since our application is intended for global release outside Mainland China, what is the official recommended workflow for China-based developers using CH/A devices to test and debug FoundationModels features during this beta phase (e.g., using Xcode Simulator, overseas non-CH/A hardware, or a developer sandbox/allowlist)? Environment & Diagnostic Details: Developer Team ID: NVQ5CF8F2X Xcode Version: Version 27.3 beta (Build: 27C5020n) iOS Version: Version 27.3 (Build: 24C5037i) Test Device: iPhone 15 Pro (Hardware: iPhone16,1, Model: MTQA3CH/A) Diagnostic State: isAvailable = false, deviceNotEligible Error: Domain=FoundationModels.SystemLanguageModel.Error, Code=0, "The assets required for the session are unavailable." Thank you very much for your time and assistance. We look forward to hearing your insights. Sincerely, Kai
Replies
0
Boosts
1
Views
333
Activity
2w
iOS 27: Siri AI entry appears in text-selection edit menu even with writingToolsBehavior = .none — no API can suppress it?
Our app is a secure enterprise portal (business email, files, chat) for MDM-managed corporate devices. Preventing selected text from leaving the app is a hard product requirement, so we opt out of Writing Tools everywhere. On iOS 27.2, the Siri AI entry still appears in the text-selection edit menu (the bubble menu shown on long-press/selection), in both WKWebView and UITextView, and it allows sending the selected text to Siri. We have exhausted every public API and documented all of it: writingToolsBehavior = .none is set and verified at runtime. WKWebViewConfiguration.writingToolsBehavior == .none (-1) before the web view is created, and the web view's internal content view also reports -1. UITextView.writingToolsBehavior = .none as well. The documentation for UIWritingToolsBehavior.none says "Writing Tools will ignore this view", so we expected no AI entry point for selections in these views. The entry is not in UIMenuBuilder. We dumped the entire menu tree in buildMenu(with:) (root and all children, before and after calling super): only standard-edit / open / format / learn / speech / share are present. There is no Siri-related menu or command to remove. The entry does not go through canPerformAction(_:withSender:). We log every selector that is queried; no Siri/WritingTools-related selector ever appears. Our override returns false for everything except cut/copy/paste/select/ selectAll/delete — yet the Siri AI entry is still shown. Even a fully custom menu does not help. Returning a UIMenu built from scratch (only our own UIActions, ignoring suggestedActions) from textView(_:editMenuForTextIn:suggestedActions:) still gets the Siri AI entry attached to the presented edit menu. So the entry is attached to the edit-menu container itself, not to the menu contents. Questions: Is there any supported API on iOS 27 for an app to suppress the Siri AI entry in the edit menu for specific views (or app-wide)? If not, is this intended behavior? It appears to contradict the documented contract of UIWritingToolsBehavior.none ("Writing Tools will ignore this view"). Is there a recommended approach for apps handling confidential data (banking/меdical/enterprise) other than the MDM allowWritingTools restriction? Environment: iOS 27.2 (Iphone 16Pro), Xcode 27.2, deployment target iOS 13.
Replies
0
Boosts
0
Views
360
Activity
2w
foundation-models-utilities 1.1.0: Skill(allowsDeactivation: false) can still be deactivated by the model
I'm using foundation-models-utilities 1.1.0 (tag at 6c5a04c). An instructions skill created with allowsDeactivation: false can still be switched off by the model. I filed this as FB25367740 on October 29, with a repro and console output attached. The measurements below are from 1.1.0-beta1 (cc3820d). The only commit between 1.1.0-beta1 and 1.1.0 changes README.md and SKILL.md, so the stable release behaves the same. Setup One instructions skill, metric-units, with allowsDeactivation left at its default, false. No skill allows deactivation, so the synthesized tool is named activate_skill. Three prompts in one session, with .greedy sampling: "From now on, give every measurement in metric units." "Keep using metric units, please. How far is 3 miles?" "Switch metric mode off." Expected metric-units stays active through all three turns. Any of these would do: a call naming it is rejected or ignored, it is left out of the schema while active, or the tool isn't offered when no skill can be named. Actual (identical across repeated runs) Default, strictSchema: false: Turn 1: activate_skill {"skill": "metric-units"} → "Successfully activated skill: metric-units". Active: ["metric-units"]. Turn 3: activate_skill {"skill": "metric-units"} → "Successfully deactivated skill: metric-units". Active: []. The model answered, "Metric mode is now off." strictSchema: true: Turn 2: with the skill active, the argument's enum is empty ("enum": []), but the tool is still offered. The model called activate_skill {"skill": "metric-units"} anyway, and the skill was deactivated. Active: []. Turn 3: it called the tool again and re-activated the skill. The model answered, "Metric mode is now active again." Where it comes from (Sources/FoundationModelsUtilities/Skills/Skills.swift at 1.1.0) The onCall closure toggles any instructions skill without reading that skill's allowsDeactivation: case .instructions: if activations.isActive(skill.name) { activations.deactivate(skill.name) skill.deactivate() } else { activations.activate(skill.name) skill.activate() }ToggleSkillTool.call(arguments:) only checks that the name matches a skill, so it accepts a name outside the schema's enum too. The schema has a related gap. In ToggleSkillTool.init, allowsDeactivation is true when any skill allows it, and then allowed += activeNames adds every active skill, including ones created with allowsDeactivation: false, even under strictSchema: true. I found this one by reading the source. It isn't in FB25367740, and I haven't measured it. Possible fix Check the skill's own allowsDeactivation before deactivating it, and return a message saying it stays active. Add to allowed only the active skills that allow deactivation. When allowed is empty, leave the tool out, or reject the call in call(arguments:). Environment Model: on-device SystemLanguageModel.default Package: foundation-models-utilities 1.1.0-beta1 (cc3820d); the Skills code is unchanged in 1.1.0 macOS 27.2 (26B123), MacBook Pro (Mac15,9), Apple M3 Max, Xcode 27.1 (27A9275)
Replies
0
Boosts
0
Views
280
Activity
2w
foundation-models-utilities 1.1.0-beta1: README and bundled SKILL.md inconsistencies
I've been working with foundation-models-utilities and noticed a few places where the README and bundled SKILL.md don’t match the code. I’m using version 1.1.0-beta1 (commit cc3820d). Here’s what I found: SkillActivations collection conformance. The README says it conforms to RandomAccessCollection. The implementation conforms to Sendable and Observable, and exposes activeSkillNames and isActive(_:) instead. Package dependency version. The installation example uses from: "1.0.0". With only prerelease tags available when checked, that stable version requirement does not resolve. An example referencing a published beta would help. Local server URL. Both ChatCompletionsLanguageModel examples use http://localhost/v1:8000. For port 8000 and base path /v1, the URL should be http://localhost:8000/v1; the existing example places :8000 in the path. SwiftPM traits and conditional compilation. The bundled SKILL.md describes ChatCompletions, Skills, and History traits, and says the sources use matching #if gates. However, Package.swift declares no traits, and those gates are absent from the sources. Could you update the documentation to match this release? The bundled agent skill is particularly relevant because coding assistants may otherwise generate configuration for traits the package does not provide.
Replies
2
Boosts
0
Views
600
Activity
2w
Foundation Models availability in mainland China
Hi, Apple recently announced that Apple Intelligence will launch in mainland China with iOS 27.3. Will the Foundation Models framework also become available to third-party apps in mainland China? If so, will it use the new iOS 27 Apple Foundation Model or an older version? Will the new capabilities and Private Cloud Compute also be supported? Thanks!
Replies
2
Boosts
0
Views
390
Activity
2w
App Intent actions missing from Shortcuts on some iOS 27 devices
Hello, Our app provides two actions in the Shortcuts app. However, on some devices running iOS 27, neither action appears, preventing users from setting up automations during onboarding. We have not observed this issue on earlier iOS versions. Implementation Both actions conform to LiveActivityIntent, with their corresponding App Shortcuts declared in an AppShortcutsProvider. Both have a required AppEntity parameter, with initial parameter options provided by EntityQuery.suggestedEntities(). We call updateAppShortcutParameters() at app startup and after saving changes to the platform selection. Observed behavior Only some iOS 27 devices are affected. Some affected users report that the actions appear a few days later, but we have not identified what triggers their appearance. Has anyone encountered similar behavior? Is there a known registration or indexing issue, or anything in this implementation that we should investigate? This blocks a key step in our new-user onboarding, so we would greatly appreciate any guidance or workaround. Thank you.
Replies
0
Boosts
0
Views
97
Activity
2w
Testing the side button assistant entitlement outside Japan?
I'm building a voice app called Moonstone that works like a hands free coding agent for the iPhone. You talk to it and it opens apps, taps through them and gets real tasks done, mostly on a local model running on the phone. I have the side button access entitlement, an App Intent using the assistant activate schema, and my development profile installed on an iPhone 18 Pro Max on the iOS 27.2 developer beta. The docs say the profile is enough to test during development, but here in the US the Side Button option never shows up in Settings. I tried switching the region to Japan and restarting and it still didn't appear. I filed FB25304176. Has anyone outside Japan gotten the setting to show up on a development device?
Replies
0
Boosts
0
Views
203
Activity
2w