Posts under Machine Learning & AI topic

Post

Replies

Boosts

Views

Activity

Foundation Model tool calling giving system error in iOS27 beta 5
After updating my iOS and xcode to latest iOS 27 beta5 and xcode 27 beta5 all the system language model session calls with tool calls inclusion throwing Unrecognized system-instruction prefix ID: com.apple.fm_api.tool_calls_override error. The same code was working perfectly in iOS27 beta 4. Even the apple sample project OrigamiCraftingADynamicTutorialForAppleIntelligence failing with the same error when tool calls invoked. Anybody else facing similar issue or any workaround for this issue? sample code: struct GetRecordNotesTool: Tool { let name = "getRecordNotes" let description = "Fetches internal notes and returns Note_Title and Note_Content for up to 10 notes." @Generable struct Arguments { @Guide(description: "The API name of the module, e.g. Companies or Contacts") var module_api_name: String @Guide(description: "The unique record ID to fetch notes for") var record_id: String } func call(arguments: Arguments) async throws -> String { return "Fetched content" } }
1
0
222
1h
Supported end-to-end testing route for EU-based developers targeting Siri AI on iOS 27?
Apple's 8 June 2026 announcement states that developers in the EU will not be able to test or use the new Siri AI features in their apps for iOS 27, iPadOS 27 or watchOS 27. I am an EU-based developer building apps for users in multiple markets. App Intents Testing, simulator checks and unit tests can validate parts of an implementation, but they do not appear to replace end-to-end validation of Siri AI behaviour on supported iPhone and iPad hardware. What is Apple's supported route for an EU-based developer to validate the following for users in supported markets? • intent discovery and invocation • parameter resolution and follow-up interaction • error handling and confirmation flows • Siri's presentation and completion of an action • behaviour on supported physical devices Is an official remote-device environment, controlled developer testing mode or another Apple-supported arrangement available or planned? I am not asking for a way to bypass regional restrictions. I am looking for documented, compliant testing guidance for developers serving a global App Store. I have filed Feedback Assistant report FB24276767 about this testing-access issue. Apple source: https://www.apple.com/newsroom/2026/06/due-to-dma-siri-ai-delayed-in-eu-for-ios-27-and-ipados-27/
0
0
212
13h
iPhone 16 Pro failing to install new Siri Beta
I am currently on Apple's Dev Beta V4 for iOS 27. The first version I installed was the Dev Beta V2, I am desperate to try out the new Siri AI Beta, but it's just not installing for me. I have the ability to "turn siri off" then "on again" and find I get the 2024 Apple Intelligence version fine. But if I choose to try out the new AI Beta, I'm left with "Adding support for Siri is in progress. Siri will be unavailable until the update is complete." It's been in that state for over 48 hours in Beta 4 and I'm left with the OLD OLD Siri globe from pre-Apple intelligence. Am I being too keen and just not leaving it long enough? Or is there a genuine issue at Apple's end, in regard to getting the new Siri to actually fully install?
16
0
3.8k
14h
Advice on Referencing Previous Prompts / Responses
When using Private Cloud Compute, I want to be able to submit more than one prompt per LanguageModelSession, ideally using the prompt and response from the first interaction to inform a second interaction. How can I reference this first prompt and response when making a subsequent prompt in a session? I have tried plain language like "current data" and "previous prompt" but it does not seem to understand.
1
0
228
1d
How are you iterating on Foundation Models prompts before building the app workflow?
While building with Apple's Foundation Models, I kept running into a workflow problem before the app code itself. The hard part was not only calling LanguageModelSession. It was figuring out the shape of the interaction: What should be in the system prompt? What should stay in the user input? What output is actually usable by the app? How much instruction is too much? How do I test the same prompt repeatedly without creating another small Xcode project? I ended up building a small macOS tool for myself, LocalLM Lab, mainly to speed up that loop. The first use case was a Prompt Playground: system prompt, user input, model output, and a repeatable way to compare results before moving the workflow into app code. The current version also experiments with connector-style context, such as system clock, weather, reminders/calendar, contacts, and a scoped filesystem folder. That has made the prompt design problem more interesting, because the question becomes: what context should the model see, and how should the app frame that context so the output is useful? I am curious how other developers are handling this while building with Foundation Models. Are you mostly iterating inside Xcode playgrounds? Are you building small internal test harnesses? Are you separating system prompts and user inputs during testing? How are you evaluating whether the output is reliable enough for the app workflow? For reference, this is the tool I have been using for my own experiments: https://thisbrain.ai/locallm I would be especially interested in any patterns people have found for designing and testing prompts before committing them to app code.
4
0
524
1d
Can I prevent Siri from "seeing" specific parts of my app?
Let's say my app is a password or other type of secret manager, which means it can display highly sensitive data to the user. If Siri summarize whats on screen, it would then be able to "see" that sensitive data and transmit it off device in a way the user might not expect nor want. Is there a way that I can prevent this by marking specific views in an app as sensitive, or detect if Siri is analyzing the contents of the apps screen? The .privacySensitive() modifier and @Environment(\.isSceneCaptured) environment variable do not seem to apply in this case.
0
0
136
1d
VNDetectBarcodesRequest fails on every frame: "Could not build inference plan - ANECF error: failed to load ANE model .../mrcdetector.H17.espresso.hwx"
On iPhone 16e running iOS 26, we have now lost barcode detection through two independent APIs. Other device models in the same fleet, on the same app build and the same iOS version, are unaffected. Background: the original failure (AVCaptureMetadataOutput) Our retail app scans EAN-13, Code 128 and ITF barcodes. It originally used AVCaptureMetadataOutput with metadataObjectTypes set accordingly. After the update to iOS 26, this stopped working on iPhone 16e. The behaviour was completely silent: the capture session reported isRunning == true, the camera preview stayed live and correctly exposed, no interruption or runtime-error notifications were posted — but metadataOutput(_:didOutput:from:) simply never fired again, for any barcode. There was no error of any kind to go on. Restarting the app did not help. Only a full device reboot restored detection. Because the metadata path performs detection in the media daemon rather than in our process, we moved detection into the app to work around it. The current failure (Vision) Frames now come from an AVCaptureVideoDataOutput (preset .hd1280x720, .up orientation) and are analyzed in-process: let request = VNDetectBarcodesRequest() request.symbologies = [...] let handler = VNImageRequestHandler(cvPixelBuffer: pixelBuffer, orientation: .up, options: [:]) try handler.perform([request]) On the same devices, handler.perform() now throws for every analyzed frame: Error Domain=com.apple.Vision Code=9 "Could not build inference plan - ANECF error: failed to load ANE model file:///System/Library/Frameworks/Vision.framework/ mrcdetector.H17.espresso.hwx Error=createProgramInstanceForModel:modelToken: modelFilePath:qos:isPreCompiled:enablePowerSaving:skipPreparePhase:statsMask: memoryPoolID:enableLateLatch:modelIdentityStr:owningPid:cacheUrlIdentifier: aotCacheUrlIdentifier:optOutOfModelMemoryUnwiring:error:: Program load failure (0x50004) (DESIGN)" So the second approach fails as well — but loudly, and one layer down. The failing model is a system model shipped inside Vision.framework; we load no Core ML model of our own. Shared characteristics Both failures behave identically in the ways that matter: Same device model (iPhone 16e), starting with iOS 26 Camera pipeline healthy throughout: frames keep arriving continuously (verified by a watchdog on the sample buffer delegate), preview live, no AVCaptureSessionWasInterrupted and no AVCaptureSessionRuntimeError Detection never recovers on its own An app restart does not help; only a device reboot does Over one workday we recorded ~65,000 consecutive Vision failures across four devices, with zero successful detections in between. This makes us suspect both symptoms share a root cause below the two APIs, rather than being two unrelated bugs. What we tried We found thread 761095, where the same error signature (Code=9, "Could not build inference plan - ANECF error", "(DESIGN)") was reported on visionOS 2.0 beta for a different system model, and where the suggested workaround was to restrict the request to CPU/GPU via setComputeDevice(_:for:). We implemented that as a runtime fallback: let devices = try request.supportedComputeStageDevices[.main] ?? [] // pick .gpu, else .cpu request.setComputeDevice(device, for: .main) We have not yet been able to confirm on an affected device whether this actually bypasses the failing path, since we cannot reproduce the state on demand. Questions Is this a known issue on iOS 26 / iPhone 16e? Could the silent AVCaptureMetadataOutput failure and this ANE model load failure share a common cause? Is restricting the compute stage to CPU/GPU a supported workaround for VNDetectBarcodesRequest, or does the barcode detector always require the ANE? Is there any way to recover the ANE state from within the app, so users do not have to reboot the device? Is there anything specific we should capture in a Feedback Assistant report to make this actionable? We can reproduce it in the field but not on demand.
1
0
396
1d
Custom AppSchema domains
Apple's strict contracts for App schema domains are great if you have something which fits into that domain. There are endless options with AppSchema domains outside that of what apple have created. Does anyone know if apple will open the door to custom AppSchema domains? This would be a "game-changer". Is there any insight on what the future holds?
1
0
942
4d
Foundation Models are broken in iOS 27 Beta
Hi guys, I'm testing the Foundation Models Framework with the on-device model in iOS 27 (beta 4) and macOS 27 (beta 4) and is completely failing to respond. There are many errors. For starters, the model doesn't respond to prompts directly, you need to specify instructions, otherwise it refuses to provide an answer. It is always looking for tools, even when no tool has been provided, and returns an error saying that it couldn't find the tool. Then, when it produces a response, it shows all the thinking process first, which completely ruins the response. Most of the time, the response begins with all the JSON code. And when I try to have a long conversation, it just says "I cannot write content or generate text." I wonder if someone is experiencing the same issues or maybe the way to implement this model changed and I'm missing something? Here is a screenshot of one of my interactions when I asked the model to describe a unicorn. It tried to access a tool that doesn't exist. (the app just prints the value of the content property) Here is the code. It is performing a simple request. struct ContentView: View { @State private var response = "" var body: some View { VStack { Button("Send") { let prompt = "Write a paragraph describing a unicorn" let session = LanguageModelSession { "Respond to the user's request. Never acknowledge the request, add preamble, or comment on what you are about to write." } if !session.isResponding { Task { do { let answer = try await session.respond(to: prompt) response = answer.content } catch { response = "Error accessing the model: \(error)" } } } } .buttonStyle(.borderedProminent) Text(response) .font(Font.system(size: 18)) .padding() Spacer() } .padding() } }
5
0
1.4k
6d
Use of SpotlightSearchTool() returns "Model Catalog error: Error Domain=com.apple.UnifiedAssetFramework Code=5000" , although model is available
On macOS Golden Gate Developer Beta 4 the following code: import CoreSpotlight import FoundationModels let tool = SpotlightSearchTool() let session = LanguageModelSession(tools: [tool]) let response = try await session.respond(to: "What hikes have I gone on?") , returns the following error: Model Catalog error: Error Domain=com.apple.UnifiedAssetFramework Code=5000 "There are no underlying assets (neither atomic instance nor asset roots) for consistency token for asset set com.apple.modelcatalog" UserInfo={NSLocalizedFailureReason=There are no underlying assets (neither atomic instance nor asset roots) for consistency token for asset set com.apple.modelcatalog} , although the model is available in general and can return responses without using the tool. The code: print(SystemLanguageModel.default.availability) returns 'available'. What am I doing wrong?
9
0
946
1w
Is there any way to re-enable App Shortcuts Siri opt-in on watchOS after it has been declined?
On watchOS, once the "Turn on [App] shortcuts with Siri?" prompt has been declined for an app, is there a user-facing way to turn it back on? On iOS I found the per-app Siri toggle, and re-enabling it restored voice invocation immediately. I cannot find any equivalent on watchOS, in the watch Shortcuts app, in watch Settings, or in the paired iPhone's Watch app. If one exists I would appreciate a pointer. If it does not, I would like to know whether that is expected. What I am seeing I have an iOS app with a companion watchOS app. Each declares its own AppShortcutsProvider and App Intent. Modern App Intents only, no SiriKit, no Intents extension. On one Apple Watch, saying the trigger phrase transcribes correctly on screen, then falls through to a generic Maps business search. The intent is never invoked. On that same watch the App Shortcut appears in the watch Shortcuts app and runs correctly when tapped, and Siri is otherwise healthy. The same phrase works on the paired iPhone. Why I believe the app is fine On a second iPhone and Apple Watch on a different Apple Account, the phrase spoken to the watch returned my intent's own dialog from perform(). Two control apps also behave correctly, including one with an iOS host plus embedded companion watch app matching my production structure, which prompted and worked on both devices. Reading Metadata.appintents/extract.actionsdata from the built watch app shows the provider registered and all phrase templates well formed. The state survives deleting the app. I deleted it from both devices, power cycled both, and reinstalled. The iPhone worked immediately without re-prompting. The watch continued to fail without prompting. Both retained their prior opt-in state. The app's bundle identifiers changed during a rename several months ago. I believe the prompt appeared on the watch then and was dismissed. Environment Apple Watch Ultra, watchOS 26.6. iPhone on iOS 18.6. Xcode 26.1.1. Deployment targets iOS 18.6 / watchOS 11.6. Companion watch app, WKRunsIndependentlyOfCompanionApp = NO. Already ruled out on device, each with a clean install and watch restart: CFBundleSpokenName, one word and spaced Watch PRODUCT_NAME / CFBundleName matched to the spoken app name Removing updateAppShortcutParameters() from the watch App.init() Adding the com.apple.developer.siri entitlement to the watch target Phrase collision between phone and watch providers, a watch-only phrase also failed Siri domain collision on the trigger words, a neutral phrase also failed Intent identifier collisions between the phone and watch bundles A brand new, uniquely named intent with canonical syntax and no gating was also ignored Questions Is there a user-facing setting on watchOS, or in the paired iPhone's Watch app, to re-enable App Shortcuts for a specific app after the prompt has been declined? If not, is there any supported recovery short of erasing the watch and setting it up as new? Restoring from backup appears to bring the state back. Is there any API for an app to detect that its App Shortcuts opt-in is off, so it can show guidance instead of a silently dead feature? INPreferences.siriAuthorizationStatus() is not a valid proxy, it reports authorized on the affected device. Happy to provide a sysdiagnose with the App Intents logging profile, or either control project.
2
0
531
1w
Generation Error
So I'm having an issue with the FoundationModels framework but idk if this is just my feeling or not, the issue comes up after I updated my Mac into 26.6 the code was very simple actually: #Playground { let model = SystemLanguageModel.default let session = LanguageModelSession(model: model) print(model.availability) var query = "How to hide button" Task { do { let response = try await session.respond(to: query) print(response.content) } catch { print("\(error)") } } } the code works before I updated the version, but then after I updated the version it says: Error Domain=FoundationModels.LanguageModelSession.GenerationError Code=-1 "The operation couldn’t be completed. (FoundationModels.LanguageModelError error -1.)" UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=FoundationModels.LanguageModelError Code=-1 "(null)" UserInfo={NSMultipleUnderlyingErrorsKey=(\n "Error Domain=ModelManagerServices.ModelManagerError Code=1026 \"(null)\" UserInfo={NSMultipleUnderlyingErrorsKey=(\n)}"\n)}" ), NSLocalizedDescription=The operation couldn’t be completed. (FoundationModels.LanguageModelError error -1.)} this is runned in Xcode 26.6, additional information I have also coder 27 beta 4 installed in my Mac, is this problem occurring because the Xcode 26.6 and Xcode 27 beta 4?? can u guys help me
2
0
679
1w
Fused Metal Kernels for Linear Recurrences in MLX
I’ve been developing mlx-recurrence, a plug-in framework of fused Metal GPU kernels for linear recurrences on Apple silicon—roughly analogous to flash linear attention for MLX. Sequential recurrences are difficult for MLX to fuse automatically. Architectures such as state-space models, gated linear attention, and diagonal RNNs ordinarily require a loop across the sequence length. When that loop is implemented in Python, a sequence of length L can require L separate Python-to-Metal dispatches. These kernels instead execute the entire recurrence in a single Metal dispatch. The training path uses segment checkpointing with recomputation during the backward pass. In validated M3 Max tests, the checkpoint-and-recompute kernels reduced peak recurrent-state memory by approximately 12–18× at the kernel level and lowered total training peak memory from 23.88 GB to 10.34 GB. At the same batch size, end-to-end training throughput improved by roughly 1.4×, while individual fused forward-and-backward kernels ran approximately 1.5–1.9× faster than the original full-state implementations. Results will vary with recurrence type, sequence length, state dimensions, batch size, datatype, model architecture, and hardware. Current kernels: ssd_scan Mamba-2-style, head-wise SSD selective scan. Intended for Mamba-2 and other SSM hybrid architectures. State shape: [B, H, Dh, N] gla_scan Gated Linear Attention with a scalar forget gate and outer-product write. Intended for GLA and linear-attention hybrid architectures. State shape: [B, H, Dh, Dh] rglru_scan RG-LRU diagonal recurrence. Intended for Griffin and RecurrentGemma-style architectures. State shape: [B, D] rotlru_scan Rotational LRU using a complex-diagonal recurrence, a magnitude gate, and a per-step rotation of two-dimensional channel pairs. Intended for complex-LRU and S4-style oscillatory memory architectures. State shape: [B, D], represented as interleaved channel pairs. Each kernel is implemented as a self-contained plug-in on a shared chassis located at: mlx_recurrence._chassis The chassis provides: Segment checkpoint-and-recompute infrastructure Shape and argument validation VJP integration Forward and gradient parity-test helpers Common recurrence plug-in handling Adding another recurrence therefore requires implementing its Metal forward and backward source pair and connecting its VJP. The checkpointing, validation, and testing infrastructure does not need to be rebuilt for each operator. The original version 0.1 kernels remain available under: mlx_recurrence.legacy They are also re-exported at the package’s top level for backward compatibility. I’m interested in feedback from developers working with MLX or custom Metal compute kernels, particularly around: Preferred APIs for packaging reusable MLX Metal extensions Threadgroup and memory-layout strategies across Apple GPU generations Numerical stability expectations for long recurrent sequences Benchmarking fused scans against MLX-native implementations Additional recurrent operators that would be valuable to support I would also be interested to know whether others are developing similar fused recurrence primitives for MLX and whether a shared interface for these operations would be useful. My setup is a M3 MAX Macbook Pro with 36GB Ram and I am running on macOS 26.4.1 (25E253). https://github.com/D-CSIL/mlx-recurrence
0
0
73
1w
Xcode treats a `.llmasset` bundle as individual `.aimodel` files to compile, instead of copying it as-is
I have a Core AI model export — a bundle folder (.llmasset, containing multiple .aimodel subfolders plus metadata/tokenizer resources) — added to my app target as a folder reference. Rather than treating the bundle as one opaque resource and copying it into the app bundle as-is (the way .xcassets, .bundle, or any other folder reference behaves), Xcode reaches into it, finds the individual .aimodel subfolders, and adds each one to Compile Sources. When it compiles them there, it's for my build machine's specific chip only — I can't find any setting (Build Settings, scheme, target picker) to compile for multiple architectures/platforms, the way a universal binary would work. Question: Is there a way to make Xcode treat a .llmasset bundle as an atomic resource — copied wholesale, not decomposed into individual .aimodel compile targets? Or is reaching into the bundle and AOT-compiling its components for the active build architecture the intended behavior here, and if so, what's the recommended way to make sure the result works across the actual range of devices the app ships to?
1
0
213
1w
Will Siri AI be able to copy text content of whats on screen in Notes/Files/Photos?
Let's say I'm in Notes, or in Pages, or in Files or Live Text if I'm in Photos... will Siri AI be able to COPY the text for me if I ask it to do so? If you have new Siri AI installed, or are DTS Engineer at Apple I'd appreciate a yes/no? Critical for text editing, working with AI output, and general modern work requirements. Presently I have to press the "share" button then select Copy from the Share Sheet, OR in Pages I have to select EXPORT from the More Menu and choose Plain Text to get the contents. Thank you. Be well.
0
0
309
1w
Guidance Needed on App Entities, Intents, and the New Siri
I'm trying to get some clarity on how the new Siri deals with IndexedEntities and whether it's worth adopting, considering our app does not fit into any of the predefined domain schemas. In running some tests with the TravelTracking sample app, it seems the only way I can get Siri to show any of the referenced entities is by using the exact phrasing (or extremely close to it) in one of the donated shortcuts. If I ask Siri to "Find closest landmark in TravelTracking" produces a result from the App in the form of an app snippet. But, if I then ask it "Text the description to Jane", it seeds the text with something like, "Niagara Falls is located in North America", instead of what's in the description field of the entity. General questions about the indexed data fail to show any results at all in Siri. For example: "Show me some landmarks from TravelTracking" or "Find Mount Fuji in TravelTracking" produce no results, even though the landmarks are indexed. My original assumption was that indexing data from your app would make it available to Siri, but it only seems to show up in on-device search and not in conversation with Siri itself. So is it the case that such data is only available through a Siri conversation if either you can adopt a domain schema or create a shortcut and use very close to the exact phraseology? And in the case of the latter, you can't really act on the returned entities because basically all you get is what is shown in a snippet? Maybe the on-screen intelligence picks up something here (seems to), but nothing deeper, even if it is defined in the entity. I've put in a feedback request (FB23796681) for a general database domain with schema for common database operations. Perhaps something like this and way to describe record types to aid in understanding from the LLM would go a long way toward making Siri more flexible for agentic use? I can get Siri to do a lot of the things that were shown at WWDC, but that tends to make you think you can do similar things with other types of apps and when you can't because of the domain limitations, it's very frustrating and feels limiting. It seems the domain types fit the apps Apple ships with the OS (Mail, Photos, Notes, etc), but not other types of apps that don't fit that criteria. If I'm missing something here, any guidance would be appreciated.
1
0
589
1w
Foundation Model tool calling giving system error in iOS27 beta 5
After updating my iOS and xcode to latest iOS 27 beta5 and xcode 27 beta5 all the system language model session calls with tool calls inclusion throwing Unrecognized system-instruction prefix ID: com.apple.fm_api.tool_calls_override error. The same code was working perfectly in iOS27 beta 4. Even the apple sample project OrigamiCraftingADynamicTutorialForAppleIntelligence failing with the same error when tool calls invoked. Anybody else facing similar issue or any workaround for this issue? sample code: struct GetRecordNotesTool: Tool { let name = "getRecordNotes" let description = "Fetches internal notes and returns Note_Title and Note_Content for up to 10 notes." @Generable struct Arguments { @Guide(description: "The API name of the module, e.g. Companies or Contacts") var module_api_name: String @Guide(description: "The unique record ID to fetch notes for") var record_id: String } func call(arguments: Arguments) async throws -> String { return "Fetched content" } }
Replies
1
Boosts
0
Views
222
Activity
1h
Supported end-to-end testing route for EU-based developers targeting Siri AI on iOS 27?
Apple's 8 June 2026 announcement states that developers in the EU will not be able to test or use the new Siri AI features in their apps for iOS 27, iPadOS 27 or watchOS 27. I am an EU-based developer building apps for users in multiple markets. App Intents Testing, simulator checks and unit tests can validate parts of an implementation, but they do not appear to replace end-to-end validation of Siri AI behaviour on supported iPhone and iPad hardware. What is Apple's supported route for an EU-based developer to validate the following for users in supported markets? • intent discovery and invocation • parameter resolution and follow-up interaction • error handling and confirmation flows • Siri's presentation and completion of an action • behaviour on supported physical devices Is an official remote-device environment, controlled developer testing mode or another Apple-supported arrangement available or planned? I am not asking for a way to bypass regional restrictions. I am looking for documented, compliant testing guidance for developers serving a global App Store. I have filed Feedback Assistant report FB24276767 about this testing-access issue. Apple source: https://www.apple.com/newsroom/2026/06/due-to-dma-siri-ai-delayed-in-eu-for-ios-27-and-ipados-27/
Replies
0
Boosts
0
Views
212
Activity
13h
iPhone 16 Pro failing to install new Siri Beta
I am currently on Apple's Dev Beta V4 for iOS 27. The first version I installed was the Dev Beta V2, I am desperate to try out the new Siri AI Beta, but it's just not installing for me. I have the ability to "turn siri off" then "on again" and find I get the 2024 Apple Intelligence version fine. But if I choose to try out the new AI Beta, I'm left with "Adding support for Siri is in progress. Siri will be unavailable until the update is complete." It's been in that state for over 48 hours in Beta 4 and I'm left with the OLD OLD Siri globe from pre-Apple intelligence. Am I being too keen and just not leaving it long enough? Or is there a genuine issue at Apple's end, in regard to getting the new Siri to actually fully install?
Replies
16
Boosts
0
Views
3.8k
Activity
14h
Advice on Referencing Previous Prompts / Responses
When using Private Cloud Compute, I want to be able to submit more than one prompt per LanguageModelSession, ideally using the prompt and response from the first interaction to inform a second interaction. How can I reference this first prompt and response when making a subsequent prompt in a session? I have tried plain language like "current data" and "previous prompt" but it does not seem to understand.
Replies
1
Boosts
0
Views
228
Activity
1d
How are you iterating on Foundation Models prompts before building the app workflow?
While building with Apple's Foundation Models, I kept running into a workflow problem before the app code itself. The hard part was not only calling LanguageModelSession. It was figuring out the shape of the interaction: What should be in the system prompt? What should stay in the user input? What output is actually usable by the app? How much instruction is too much? How do I test the same prompt repeatedly without creating another small Xcode project? I ended up building a small macOS tool for myself, LocalLM Lab, mainly to speed up that loop. The first use case was a Prompt Playground: system prompt, user input, model output, and a repeatable way to compare results before moving the workflow into app code. The current version also experiments with connector-style context, such as system clock, weather, reminders/calendar, contacts, and a scoped filesystem folder. That has made the prompt design problem more interesting, because the question becomes: what context should the model see, and how should the app frame that context so the output is useful? I am curious how other developers are handling this while building with Foundation Models. Are you mostly iterating inside Xcode playgrounds? Are you building small internal test harnesses? Are you separating system prompts and user inputs during testing? How are you evaluating whether the output is reliable enough for the app workflow? For reference, this is the tool I have been using for my own experiments: https://thisbrain.ai/locallm I would be especially interested in any patterns people have found for designing and testing prompts before committing them to app code.
Replies
4
Boosts
0
Views
524
Activity
1d
Can I prevent Siri from "seeing" specific parts of my app?
Let's say my app is a password or other type of secret manager, which means it can display highly sensitive data to the user. If Siri summarize whats on screen, it would then be able to "see" that sensitive data and transmit it off device in a way the user might not expect nor want. Is there a way that I can prevent this by marking specific views in an app as sensitive, or detect if Siri is analyzing the contents of the apps screen? The .privacySensitive() modifier and @Environment(\.isSceneCaptured) environment variable do not seem to apply in this case.
Replies
0
Boosts
0
Views
136
Activity
1d
VNDetectBarcodesRequest fails on every frame: "Could not build inference plan - ANECF error: failed to load ANE model .../mrcdetector.H17.espresso.hwx"
On iPhone 16e running iOS 26, we have now lost barcode detection through two independent APIs. Other device models in the same fleet, on the same app build and the same iOS version, are unaffected. Background: the original failure (AVCaptureMetadataOutput) Our retail app scans EAN-13, Code 128 and ITF barcodes. It originally used AVCaptureMetadataOutput with metadataObjectTypes set accordingly. After the update to iOS 26, this stopped working on iPhone 16e. The behaviour was completely silent: the capture session reported isRunning == true, the camera preview stayed live and correctly exposed, no interruption or runtime-error notifications were posted — but metadataOutput(_:didOutput:from:) simply never fired again, for any barcode. There was no error of any kind to go on. Restarting the app did not help. Only a full device reboot restored detection. Because the metadata path performs detection in the media daemon rather than in our process, we moved detection into the app to work around it. The current failure (Vision) Frames now come from an AVCaptureVideoDataOutput (preset .hd1280x720, .up orientation) and are analyzed in-process: let request = VNDetectBarcodesRequest() request.symbologies = [...] let handler = VNImageRequestHandler(cvPixelBuffer: pixelBuffer, orientation: .up, options: [:]) try handler.perform([request]) On the same devices, handler.perform() now throws for every analyzed frame: Error Domain=com.apple.Vision Code=9 "Could not build inference plan - ANECF error: failed to load ANE model file:///System/Library/Frameworks/Vision.framework/ mrcdetector.H17.espresso.hwx Error=createProgramInstanceForModel:modelToken: modelFilePath:qos:isPreCompiled:enablePowerSaving:skipPreparePhase:statsMask: memoryPoolID:enableLateLatch:modelIdentityStr:owningPid:cacheUrlIdentifier: aotCacheUrlIdentifier:optOutOfModelMemoryUnwiring:error:: Program load failure (0x50004) (DESIGN)" So the second approach fails as well — but loudly, and one layer down. The failing model is a system model shipped inside Vision.framework; we load no Core ML model of our own. Shared characteristics Both failures behave identically in the ways that matter: Same device model (iPhone 16e), starting with iOS 26 Camera pipeline healthy throughout: frames keep arriving continuously (verified by a watchdog on the sample buffer delegate), preview live, no AVCaptureSessionWasInterrupted and no AVCaptureSessionRuntimeError Detection never recovers on its own An app restart does not help; only a device reboot does Over one workday we recorded ~65,000 consecutive Vision failures across four devices, with zero successful detections in between. This makes us suspect both symptoms share a root cause below the two APIs, rather than being two unrelated bugs. What we tried We found thread 761095, where the same error signature (Code=9, "Could not build inference plan - ANECF error", "(DESIGN)") was reported on visionOS 2.0 beta for a different system model, and where the suggested workaround was to restrict the request to CPU/GPU via setComputeDevice(_:for:). We implemented that as a runtime fallback: let devices = try request.supportedComputeStageDevices[.main] ?? [] // pick .gpu, else .cpu request.setComputeDevice(device, for: .main) We have not yet been able to confirm on an affected device whether this actually bypasses the failing path, since we cannot reproduce the state on demand. Questions Is this a known issue on iOS 26 / iPhone 16e? Could the silent AVCaptureMetadataOutput failure and this ANE model load failure share a common cause? Is restricting the compute stage to CPU/GPU a supported workaround for VNDetectBarcodesRequest, or does the barcode detector always require the ANE? Is there any way to recover the ANE state from within the app, so users do not have to reboot the device? Is there anything specific we should capture in a Feedback Assistant report to make this actionable? We can reproduce it in the field but not on demand.
Replies
1
Boosts
0
Views
396
Activity
1d
Custom AppSchema domains
Apple's strict contracts for App schema domains are great if you have something which fits into that domain. There are endless options with AppSchema domains outside that of what apple have created. Does anyone know if apple will open the door to custom AppSchema domains? This would be a "game-changer". Is there any insight on what the future holds?
Replies
1
Boosts
0
Views
942
Activity
4d
MLX support on swift playground
i cant use mlx on swift for some reason, i would like for them to add the support to add it as a package
Replies
1
Boosts
0
Views
913
Activity
4d
Foundation Models are broken in iOS 27 Beta
Hi guys, I'm testing the Foundation Models Framework with the on-device model in iOS 27 (beta 4) and macOS 27 (beta 4) and is completely failing to respond. There are many errors. For starters, the model doesn't respond to prompts directly, you need to specify instructions, otherwise it refuses to provide an answer. It is always looking for tools, even when no tool has been provided, and returns an error saying that it couldn't find the tool. Then, when it produces a response, it shows all the thinking process first, which completely ruins the response. Most of the time, the response begins with all the JSON code. And when I try to have a long conversation, it just says "I cannot write content or generate text." I wonder if someone is experiencing the same issues or maybe the way to implement this model changed and I'm missing something? Here is a screenshot of one of my interactions when I asked the model to describe a unicorn. It tried to access a tool that doesn't exist. (the app just prints the value of the content property) Here is the code. It is performing a simple request. struct ContentView: View { @State private var response = "" var body: some View { VStack { Button("Send") { let prompt = "Write a paragraph describing a unicorn" let session = LanguageModelSession { "Respond to the user's request. Never acknowledge the request, add preamble, or comment on what you are about to write." } if !session.isResponding { Task { do { let answer = try await session.respond(to: prompt) response = answer.content } catch { response = "Error accessing the model: \(error)" } } } } .buttonStyle(.borderedProminent) Text(response) .font(Font.system(size: 18)) .padding() Spacer() } .padding() } }
Replies
5
Boosts
0
Views
1.4k
Activity
6d
Use of SpotlightSearchTool() returns "Model Catalog error: Error Domain=com.apple.UnifiedAssetFramework Code=5000" , although model is available
On macOS Golden Gate Developer Beta 4 the following code: import CoreSpotlight import FoundationModels let tool = SpotlightSearchTool() let session = LanguageModelSession(tools: [tool]) let response = try await session.respond(to: "What hikes have I gone on?") , returns the following error: Model Catalog error: Error Domain=com.apple.UnifiedAssetFramework Code=5000 "There are no underlying assets (neither atomic instance nor asset roots) for consistency token for asset set com.apple.modelcatalog" UserInfo={NSLocalizedFailureReason=There are no underlying assets (neither atomic instance nor asset roots) for consistency token for asset set com.apple.modelcatalog} , although the model is available in general and can return responses without using the tool. The code: print(SystemLanguageModel.default.availability) returns 'available'. What am I doing wrong?
Replies
9
Boosts
0
Views
946
Activity
1w
Is there any way to re-enable App Shortcuts Siri opt-in on watchOS after it has been declined?
On watchOS, once the "Turn on [App] shortcuts with Siri?" prompt has been declined for an app, is there a user-facing way to turn it back on? On iOS I found the per-app Siri toggle, and re-enabling it restored voice invocation immediately. I cannot find any equivalent on watchOS, in the watch Shortcuts app, in watch Settings, or in the paired iPhone's Watch app. If one exists I would appreciate a pointer. If it does not, I would like to know whether that is expected. What I am seeing I have an iOS app with a companion watchOS app. Each declares its own AppShortcutsProvider and App Intent. Modern App Intents only, no SiriKit, no Intents extension. On one Apple Watch, saying the trigger phrase transcribes correctly on screen, then falls through to a generic Maps business search. The intent is never invoked. On that same watch the App Shortcut appears in the watch Shortcuts app and runs correctly when tapped, and Siri is otherwise healthy. The same phrase works on the paired iPhone. Why I believe the app is fine On a second iPhone and Apple Watch on a different Apple Account, the phrase spoken to the watch returned my intent's own dialog from perform(). Two control apps also behave correctly, including one with an iOS host plus embedded companion watch app matching my production structure, which prompted and worked on both devices. Reading Metadata.appintents/extract.actionsdata from the built watch app shows the provider registered and all phrase templates well formed. The state survives deleting the app. I deleted it from both devices, power cycled both, and reinstalled. The iPhone worked immediately without re-prompting. The watch continued to fail without prompting. Both retained their prior opt-in state. The app's bundle identifiers changed during a rename several months ago. I believe the prompt appeared on the watch then and was dismissed. Environment Apple Watch Ultra, watchOS 26.6. iPhone on iOS 18.6. Xcode 26.1.1. Deployment targets iOS 18.6 / watchOS 11.6. Companion watch app, WKRunsIndependentlyOfCompanionApp = NO. Already ruled out on device, each with a clean install and watch restart: CFBundleSpokenName, one word and spaced Watch PRODUCT_NAME / CFBundleName matched to the spoken app name Removing updateAppShortcutParameters() from the watch App.init() Adding the com.apple.developer.siri entitlement to the watch target Phrase collision between phone and watch providers, a watch-only phrase also failed Siri domain collision on the trigger words, a neutral phrase also failed Intent identifier collisions between the phone and watch bundles A brand new, uniquely named intent with canonical syntax and no gating was also ignored Questions Is there a user-facing setting on watchOS, or in the paired iPhone's Watch app, to re-enable App Shortcuts for a specific app after the prompt has been declined? If not, is there any supported recovery short of erasing the watch and setting it up as new? Restoring from backup appears to bring the state back. Is there any API for an app to detect that its App Shortcuts opt-in is off, so it can show guidance instead of a silently dead feature? INPreferences.siriAuthorizationStatus() is not a valid proxy, it reports authorized on the affected device. Happy to provide a sysdiagnose with the App Intents logging profile, or either control project.
Replies
2
Boosts
0
Views
531
Activity
1w
Generation Error
So I'm having an issue with the FoundationModels framework but idk if this is just my feeling or not, the issue comes up after I updated my Mac into 26.6 the code was very simple actually: #Playground { let model = SystemLanguageModel.default let session = LanguageModelSession(model: model) print(model.availability) var query = "How to hide button" Task { do { let response = try await session.respond(to: query) print(response.content) } catch { print("\(error)") } } } the code works before I updated the version, but then after I updated the version it says: Error Domain=FoundationModels.LanguageModelSession.GenerationError Code=-1 "The operation couldn’t be completed. (FoundationModels.LanguageModelError error -1.)" UserInfo={NSMultipleUnderlyingErrorsKey=( "Error Domain=FoundationModels.LanguageModelError Code=-1 "(null)" UserInfo={NSMultipleUnderlyingErrorsKey=(\n "Error Domain=ModelManagerServices.ModelManagerError Code=1026 \"(null)\" UserInfo={NSMultipleUnderlyingErrorsKey=(\n)}"\n)}" ), NSLocalizedDescription=The operation couldn’t be completed. (FoundationModels.LanguageModelError error -1.)} this is runned in Xcode 26.6, additional information I have also coder 27 beta 4 installed in my Mac, is this problem occurring because the Xcode 26.6 and Xcode 27 beta 4?? can u guys help me
Replies
2
Boosts
0
Views
679
Activity
1w
Fused Metal Kernels for Linear Recurrences in MLX
I’ve been developing mlx-recurrence, a plug-in framework of fused Metal GPU kernels for linear recurrences on Apple silicon—roughly analogous to flash linear attention for MLX. Sequential recurrences are difficult for MLX to fuse automatically. Architectures such as state-space models, gated linear attention, and diagonal RNNs ordinarily require a loop across the sequence length. When that loop is implemented in Python, a sequence of length L can require L separate Python-to-Metal dispatches. These kernels instead execute the entire recurrence in a single Metal dispatch. The training path uses segment checkpointing with recomputation during the backward pass. In validated M3 Max tests, the checkpoint-and-recompute kernels reduced peak recurrent-state memory by approximately 12–18× at the kernel level and lowered total training peak memory from 23.88 GB to 10.34 GB. At the same batch size, end-to-end training throughput improved by roughly 1.4×, while individual fused forward-and-backward kernels ran approximately 1.5–1.9× faster than the original full-state implementations. Results will vary with recurrence type, sequence length, state dimensions, batch size, datatype, model architecture, and hardware. Current kernels: ssd_scan Mamba-2-style, head-wise SSD selective scan. Intended for Mamba-2 and other SSM hybrid architectures. State shape: [B, H, Dh, N] gla_scan Gated Linear Attention with a scalar forget gate and outer-product write. Intended for GLA and linear-attention hybrid architectures. State shape: [B, H, Dh, Dh] rglru_scan RG-LRU diagonal recurrence. Intended for Griffin and RecurrentGemma-style architectures. State shape: [B, D] rotlru_scan Rotational LRU using a complex-diagonal recurrence, a magnitude gate, and a per-step rotation of two-dimensional channel pairs. Intended for complex-LRU and S4-style oscillatory memory architectures. State shape: [B, D], represented as interleaved channel pairs. Each kernel is implemented as a self-contained plug-in on a shared chassis located at: mlx_recurrence._chassis The chassis provides: Segment checkpoint-and-recompute infrastructure Shape and argument validation VJP integration Forward and gradient parity-test helpers Common recurrence plug-in handling Adding another recurrence therefore requires implementing its Metal forward and backward source pair and connecting its VJP. The checkpointing, validation, and testing infrastructure does not need to be rebuilt for each operator. The original version 0.1 kernels remain available under: mlx_recurrence.legacy They are also re-exported at the package’s top level for backward compatibility. I’m interested in feedback from developers working with MLX or custom Metal compute kernels, particularly around: Preferred APIs for packaging reusable MLX Metal extensions Threadgroup and memory-layout strategies across Apple GPU generations Numerical stability expectations for long recurrent sequences Benchmarking fused scans against MLX-native implementations Additional recurrent operators that would be valuable to support I would also be interested to know whether others are developing similar fused recurrence primitives for MLX and whether a shared interface for these operations would be useful. My setup is a M3 MAX Macbook Pro with 36GB Ram and I am running on macOS 26.4.1 (25E253). https://github.com/D-CSIL/mlx-recurrence
Replies
0
Boosts
0
Views
73
Activity
1w
Xcode treats a `.llmasset` bundle as individual `.aimodel` files to compile, instead of copying it as-is
I have a Core AI model export — a bundle folder (.llmasset, containing multiple .aimodel subfolders plus metadata/tokenizer resources) — added to my app target as a folder reference. Rather than treating the bundle as one opaque resource and copying it into the app bundle as-is (the way .xcassets, .bundle, or any other folder reference behaves), Xcode reaches into it, finds the individual .aimodel subfolders, and adds each one to Compile Sources. When it compiles them there, it's for my build machine's specific chip only — I can't find any setting (Build Settings, scheme, target picker) to compile for multiple architectures/platforms, the way a universal binary would work. Question: Is there a way to make Xcode treat a .llmasset bundle as an atomic resource — copied wholesale, not decomposed into individual .aimodel compile targets? Or is reaching into the bundle and AOT-compiling its components for the active build architecture the intended behavior here, and if so, what's the recommended way to make sure the result works across the actual range of devices the app ships to?
Replies
1
Boosts
0
Views
213
Activity
1w
How’s everyone’s OS27 SiriAI dev experience going so far?
Anyone able to get some neat SiriAI experiences working? Anything that makes you think “man I hope other developers do this in their apps too!”? (I’m willing!)
Replies
0
Boosts
0
Views
102
Activity
1w
siri Ai capability to close convo is annoying
so i just had 2 convo closed because somehow the message i made was unrelated
Replies
0
Boosts
0
Views
110
Activity
1w
Will Siri AI be able to copy text content of whats on screen in Notes/Files/Photos?
Let's say I'm in Notes, or in Pages, or in Files or Live Text if I'm in Photos... will Siri AI be able to COPY the text for me if I ask it to do so? If you have new Siri AI installed, or are DTS Engineer at Apple I'd appreciate a yes/no? Critical for text editing, working with AI output, and general modern work requirements. Presently I have to press the "share" button then select Copy from the Share Sheet, OR in Pages I have to select EXPORT from the More Menu and choose Plain Text to get the contents. Thank you. Be well.
Replies
0
Boosts
0
Views
309
Activity
1w
Guidance Needed on App Entities, Intents, and the New Siri
I'm trying to get some clarity on how the new Siri deals with IndexedEntities and whether it's worth adopting, considering our app does not fit into any of the predefined domain schemas. In running some tests with the TravelTracking sample app, it seems the only way I can get Siri to show any of the referenced entities is by using the exact phrasing (or extremely close to it) in one of the donated shortcuts. If I ask Siri to "Find closest landmark in TravelTracking" produces a result from the App in the form of an app snippet. But, if I then ask it "Text the description to Jane", it seeds the text with something like, "Niagara Falls is located in North America", instead of what's in the description field of the entity. General questions about the indexed data fail to show any results at all in Siri. For example: "Show me some landmarks from TravelTracking" or "Find Mount Fuji in TravelTracking" produce no results, even though the landmarks are indexed. My original assumption was that indexing data from your app would make it available to Siri, but it only seems to show up in on-device search and not in conversation with Siri itself. So is it the case that such data is only available through a Siri conversation if either you can adopt a domain schema or create a shortcut and use very close to the exact phraseology? And in the case of the latter, you can't really act on the returned entities because basically all you get is what is shown in a snippet? Maybe the on-screen intelligence picks up something here (seems to), but nothing deeper, even if it is defined in the entity. I've put in a feedback request (FB23796681) for a general database domain with schema for common database operations. Perhaps something like this and way to describe record types to aid in understanding from the LLM would go a long way toward making Siri more flexible for agentic use? I can get Siri to do a lot of the things that were shown at WWDC, but that tends to make you think you can do similar things with other types of apps and when you can't because of the domain limitations, it's very frustrating and feels limiting. It seems the domain types fit the apps Apple ships with the OS (Mail, Photos, Notes, etc), but not other types of apps that don't fit that criteria. If I'm missing something here, any guidance would be appreciated.
Replies
1
Boosts
0
Views
589
Activity
1w
Where is my new siri??
still no sign of the new siri no app no nothing im on the ios 27 beta 2 and iphone 15 pro max what is this apple
Replies
1
Boosts
0
Views
1.4k
Activity
1w