Posts under Machine Learning & AI topic

Post

Replies

Boosts

Views

Activity

Large memory consumption when running Core ML model on A13 GPU
We recently had to change our MLModel's architecture to include custom layers, which means the model can't run on the Neural Engine anymore. After the change, we observed a lot of crashes being reported on A13 devices. It turns out that the memory consumption when running the prediction with the new model on the GPU is much higher than before, when it was running on the Neural Engine. Before, the peak memory load was ~350 MB, now it spikes over 2 GB, leading to a crash most of the time. This only seems to happen on the A13. When forcing the model to only run on the CPU, the memory consumption is still high, but the same as running the old model on the CPU (~750 MB peak). All tested on iOS 16.1.2. We profiled the process in Instruments and found that there are a lot of memory buffers allocated by Core ML that are not freed after the prediction. The allocation stack trace for those buffers is the following: We ran the same model on a different device and found the same buffers in Instruments, but there they are only 4 KB in size. It seems, Core ML is somehow massively over-allocating memory when run on the A13 GPU. So far we limit the model to only run on CPU for those devices, but this is far from ideal. Is there any other model setting or workaround that we can use to avoid this issue?
3
2
2.4k
1w
App Intents Phone Schema Domain - .phone.startCall does not invoke perform()
We're implementing the App Intents Phone schema domain in our app to enable Siri to initiate calls to our contact entities via our voip. We've implemented a .phone.startCall intent and registered our entities as .phone.phonePerson. The intent provides both the required destination and audioVisualMode parameters, and the perform() method is implemented to handle the call. However, the perform() method is never invoked. Instead, Siri either: Says that the phone number is not linked, or Announces that it is calling, but our app intent is never executed. Anybody implemented this Phone schema domain and it s working successfully ? Sample Code: struct StartCallIntent: AudioRecordingIntent, AudioPlaybackIntent { var destination: CallDestination var audioVisualMode: CallAVMode init(contact: ContactEntity, mode: CallAVMode = .audio) { self.destination = .phonePerson(contact) self.audioVisualMode = mode } func perform() async throws -> some IntentResult { print("Call Initiating to contact") return .result() } @AppEnum(schema: .phone.audioVisualMode) enum CallAVMode: String, CaseIterable { case audio case video } @UnionValue enum CallDestination: Sendable { case phonePerson(ContactEntity) case group([ContactEntity]) } @AppEntity(schema: .phone.phonePerson) struct ContactEntity: IndexedEntity { static var defaultQuery = ContactEntityQuery() let id: UUID var person: IntentPerson }
3
0
833
1w
iOS 27 beta 3/4: Siri AI never enrolls
Device: iPhone 15 Pro iOS: 27.0 beta 4 (same issue on beta 3) Related Feedback: FB23788932, FB23961529 (both marked "More than 10 similar reports", still Open) Siri AI / Apple Intelligence never activate. Extensive testing rules out account/region as the cause — this looks like a broken asset delivery / enrollment pipeline. Symptoms: Console (subsystem com.apple.GenerativeModels) shows repeated calls: isUseCaseAccessNotGrantedSecure: user=501, input=["com.apple.Siri.EnhancedSiriDisablement"] isUseCaseAccessNotGrantedSecure: returning granted (false); no pendingEnrollment for any of [...] ["com.apple.Siri.EnhancedSiriDisablement"] -> false This is consistent across hundreds of calls — the system never attempts enrollment, it just returns false immediately, every time. Settings > General > iPhone Storage shows 3.38GB already allocated to "Apple Intelligence," but the feature never activates — suggesting an incomplete/corrupted asset set rather than missing data entirely. Toggling Wi-Fi off prompts a ~9.5GB "intelligence tools" download. Confirming it produces no progress and no result. Siri language pack downloads get stuck at 100% and never proceed to activation. Search and Siri Suggestions indexing (Settings > Siri & Search) initially shows no percentage, disappears, then reappears days later with a percentage stuck for 24+ hours despite "Last updated: X minutes ago" continuing to refresh — suggesting the background worker is alive but stuck, possibly hitting the same broken asset service. Region-dependent behavior (most useful clue): in a region NOT eligible for Siri AI (Ukraine), legacy Siri (old interface) responds normally to "Hey Siri." In a region eligible for Siri AI (US — tested with a brand-new Apple Account, region set to US, no data restored from backup), "Hey Siri" activates (wake word detection works) but the request hangs indefinitely with no response, and legacy Siri does not answer either. This suggests the system correctly detects eligibility, but there is no fallback to the legacy Siri response pipeline when the region is eligible yet the new Foundation Models assets fail to finish downloading/activating. Already tried (no effect on any of these): Reset Network Settings Reset All Settings Multiple restarts, multiple Wi-Fi networks, cellular data Changing device Language & Region to US Fresh Apple Account created with US region, Payment Method: None, signed in clean (no backup restore) — identical isUseCaseAccessNotGrantedSecure: false result, legacy Siri also silent under this account Steps to reproduce: Update iPhone 15 Pro to iOS 27 beta 3 or 4 via Software Update (not clean install). Settings > Apple Intelligence & Siri — no functional enrollment progress. Toggle Wi-Fi off — download prompt appears, confirming does nothing. Say "Hey Siri" — activates, no response. Has anyone else on iPhone 15 Pro hit this specific isUseCaseAccessNotGrantedSecure / no pendingEnrollment pattern? Any word on whether this is a known/tracked issue for beta 5?
0
0
735
2w
Siri AI broken
Hi everyone, I’m testing the latest iOS 27 beta and I’ve noticed an issue with the new Siri. When I ask very simple questions that should be handled locally or through basic reasoning, Siri consistently responds with: “Uh oh, something went wrong.” For example, asking: “When is the next Friday the 13th?” results in the error message instead of an answer. I’ve reproduced this multiple times and it seems to happen with other straightforward informational queries as well. I’ve already tried restarting the device and checking my network connection, but the issue persists. Has anyone else experienced this behavior with the new Siri in the iOS 27 beta? If so, were you able to find a workaround or identify what’s causing it? Any help or confirmation would be greatly appreciated. Thanks!
9
0
1.5k
2w
Supporting iOS 27 app entity schemas and maintaining backwards compatability
We have an app that supports iOS 18+ We have a couple of AppEntity(s) that we are keen to make work with the new schemas along with several AppIntent(s). We cannot increase our floor to iOS 27 for obvious reasons. All the documentation suggests using the macros, e.g. @AppEntity(schema: .audio.song) struct SongEntity { ... } This refuses to compile below iOS 26. It's possible to add availability checks, e.g. @available(anyAppleOS 27, *) @AppEntity(schema: .audio.song) struct SongEntity { ... } But then the whole entity becomes unavailable on pre-27 OSes. So I tried moving the macro onto an extension, e.g. struct SongEntity { ... } @available(anyAppleOS 27, *) @AppEntity(schema: .audio.song) extension SongEntity { ... } But this results in a compiler error: 'extension' macro cannot be attached to extension (extension of 'SongEntity') One other option is to create a new entity with a totally different name and mark it as isAssistantOnly but this has a lot of quite negative downstream effects that make it unworkable. For example: a lot of code duplication duplication in search indexes if we index both sets of entities awkwardness trying to use NSUserActivity when we have 2 different entity types pain in downstream AppIntent arguments which would require duplicating every AppIntent which has more cascading effects The same issues are present in AppIntent schemas too where even trying to add the most basic @AppIntent(schema: .system.open) to our existing OpenIntent doesn't seem possible for all the same reasons. I am really struggling with how to structure code so we can support schemas, currently I don't really see a path forward here until our floor raises to iOS 27. Is there a way to make this work nicely with the current APIs? What are others doing here? How can apps can ship in September and support both this and pre iOS 27 cleanly? Thinking about solutions here, my ideal would be that the macros are improved to either: be able to be applied to an extension rather than the structure itself. expand in such a way that they still build the core AppEntity / AppIntent on pre 27 OSes but then add the iOS 27 schema additions behind @available internally so they can be used with older targets as essentially no-ops on the current definitions.
3
1
1.1k
2w
Core ML memory usage is dramatically higher with an Xcode 27 build on iOS 27
I’m seeing a major change in reported memory usage (and eventual termination due to memory pressure) when running a Core ML workload built with Xcode 27 on iOS/iPadOS 27. The source code, model files, and MLModelConfiguration are unchanged. Only the Xcode/SDK version used to build the app differs. On the same iPad running iPadOS 27: Xcode 26 build: model loading and prediction complete normally, with a relatively small reported application footprint. Xcode 27 build: the application footprint grows continuously as models are loaded and can exceed 5 GB. The app is eventually terminated unless models are unloaded very aggressively or the increased-memory-limit entitlement is used. I also tested an Xcode 27 build on a device running iOS 26. Its reported peak was only around 300 MB. This suggests the change requires both an Xcode 27-linked binary and the iOS 27 runtime. The workload consists of several compiled Core ML models using .cpuAndNeuralEngine. Loading models sequentially instead of concurrently does not materially change the final footprint. Releasing each MLModel after use does reduce it, so this appears to be model or Neural Engine residency being charged to the application rather than a conventional heap leak. I noticed that the iOS 27 release notes mention Neural Engine memory now being attributed to the application instead of the system. However, I’m unclear about the practical consequences of that change. If the same Neural Engine resources were already physically resident on iOS 26, I would have expected them to contribute to system memory pressure even when they were not attributed directly to the application. Instead, the older configuration runs comfortably, while the Xcode 27/iOS 27 combination approaches or crosses the application’s per-process memory limit. A few additional observations: The problem is more likely to occur after Core ML has already compiled and specialized the models. Cached model loading is much faster and the footprint grows quickly. The first uncached run can survive model preparation because specialization spaces the loads farther apart. Under Instruments, the app often does not terminate, presumably because profiling slows the workload enough to change the peak. os_proc_available_memory() decreases in line with the newly reported footprint. With the increased-memory-limit entitlement, the workload completes, but the reported footprint still reaches several gigabytes. Has anyone else observed a large Core ML memory increase specifically with an Xcode 27 build running on iOS 27? In particular, I’m trying to understand: Is this purely a change in how existing Neural Engine memory is accounted for, or does the new runtime also retain or allocate more memory? Is the new accounting used for the application’s jetsam/per-process memory limit? Is this behavior intentionally gated by the linked SDK version? That would explain why an Xcode 26 build behaves differently on the same iOS 27 device. Should applications now treat the Neural Engine residency of every loaded MLModel as part of their process-memory budget and unload models accordingly? Are there recommended APIs or Core ML loading strategies for controlling this residency? Any confirmation that others are seeing the same Xcode 27/iOS 27 behavior—or clarification of the intended memory-accounting model—would be very helpful.
0
0
297
2w
Supporting legacy INAddTasksIntent and the new .reminders.createReminder App Intent schema
We have a list app that implements INAddTasksIntent so users can add items to our app with Siri. We're now working on implementing an App Intent for the .reminders.createReminder schema for iOS 27. Our app still supports iOS 18, so it implements both INAddTasksIntent and the .reminders.createReminder schema. Observed behavior (iOS 27 beta 4): When we say "Siri, add eggs to my grocery list in AppName", Siri routes the request to the legacy INAddTasksIntent handler in our SiriKit extension. Our new CreateReminderIntent is never invoked. I confirmed this with breakpoints and logging in both handlers. The CreateReminderIntent does seem to be set up correctly, because it appears in the Shortcuts app and I can invoke it via AppIntentsTesting. Also, after using the above phrase, I was able to say "Siri, add cookies to my grocery list" and the item got added to my app via the INAddTasksIntent, even though I didn't specify the app name in the request. This also worked with a version of our app that does not contain CreateReminderIntent running on iOS 26.5. Isn't the app name normally required for INAddTasksIntent to be invoked? Questions: Is Siri activating the INAddTasksIntent instead of the new CreateReminderIntent expected behavior? Are users on iOS 27 going to have a worse experience adding items to our app with Siri if we support both INAddTasksIntent and the new CreateReminderIntent? If so, how do you recommend we proceed? Thank you for any guidance you can provide.
2
0
216
2w
Siri Ai iPhone 12
I wanted to activate the new Siri AI on my iPhone 12 running iOS 27 Developer Beta 4. I knew it didn't support Apple Intelligence features, but I switched the language to English anyway—and then I ran into this bug: I went into the Siri tab and saw this.
0
0
163
2w
Siri Ai iPhone 12
I wanted to activate the new Siri AI on my iPhone 12 running iOS 27 Developer Beta 4. I knew it didn't support Apple Intelligence features, but I switched the language to English anyway—and then I ran into this bug: I went into the Siri tab and saw this.
0
0
186
2w
Suggestion for the SiriAI in European Union
As a user from Bulgaria, I would also like to suggest a possible approach that could benefit both Apple and users in the European Union. Even if the new AI-powered Siri becomes available in the EU in the future, it is unlikely to support every European language immediately. For example, Siri AI does not currently support Bulgarian, which means many users like me would still be unable to use its full capabilities in our native language. Because of this, I believe users should have the option to choose their preferred AI assistant as the system assistant—for example Siri, ChatGPT, Gemini, or another approved assistant. From my perspective, this could also align well with the goals of the Digital Markets Act (DMA). If Siri in the EU is required to have the same level of system access and permissions as third-party assistants, then all assistants would operate under the same rules, with the same privacy protections and the same limitations regarding access to system resources. This would create a level playing field while still allowing users to decide which assistant best meets their needs. For users like me, this would be especially valuable because I could choose an assistant that supports Bulgarian, while still enjoying the privacy and security standards that Apple is known for. I understand that this is only one possible approach, and there may be technical or regulatory challenges that I am not aware of. Nevertheless, I believe giving users more choice could be beneficial for both Apple and its customers across the European Union. I would be interested in hearing what other developers and Apple engineers think about this idea.
0
0
174
2w
Questions for Apple Support / Apple Vision Team
Dear Apple Support, I would like to report a long-standing issue affecting Khmer text recognition in Live Text (Vision Framework/OCR). Based on my testing, this issue has persisted for more than two years, from iOS 17 through iOS 27 Beta 3, and is also reproducible on iPadOS and macOS. I would appreciate clarification on the following questions: Is Apple aware of an issue where Live Text (OCR/Text Recognition) incorrectly recognizes Khmer script as Thai script, causing copied text to become Thai characters instead of Khmer? Has this issue been officially logged as a bug within the Vision Framework or Live Text team? Since this behavior has remained reproducible from iOS 17 to iOS 27 Beta 3, why has it not yet been resolved? Is the problem caused by: automatic language detection, the OCR recognition model, the Vision Framework, or another component of Apple's AI pipeline? Does Apple currently have a dedicated OCR and language recognition model for the Khmer script, or is Khmer being inferred through another language model? Is there an estimated timeline for improving Khmer OCR and preventing Khmer text from being misidentified as Thai? Can Apple confirm whether this issue affects all products using Vision Framework, including: Live Text Photos Preview Screenshot OCR APIs provided to third-party developers? How can Apple work with the Khmer technology community to improve OCR accuracy and language support for Khmer? This issue is more than a simple OCR bug. When Khmer text is automatically converted into Thai characters, users lose access to the original text, developers receive incorrect OCR output, and it negatively impacts the digital representation of the Khmer language. For reference, I have documented the issue in detail here: https://app.notion.com/p/Inaccurate-OCR-Language-Inference-Khmer-Script-Misidentified-as-Thai-in-Vision-Framework-2d8a24f4ee6680fcbc49d989f8bb606f I hope Apple can investigate this issue and prioritize improving Khmer language support across Vision Framework and Live Text. Thank you.
7
19
941
3w
Hiding unsupported parameters of a schema-conforming intent from Shortcuts
I've adopted the .reminders.createReminder schema so users can create reminders in my app via Siri and Apple Intelligence. My app only supports a subset of the schema (title, list, and note), but the macro requires me to declare all the other parameters (e.g. isFlagged, tags), so I declare them and ignore them in perform(). The problem: in the Shortcuts app, every declared parameter shows up as an editable field, so it looks like my app supports flags, tags, etc when it doesn't, and the values are silently ignored if the user sets them. Is there a supported way to keep parameters my app can't fulfill from appearing in Shortcuts while still conforming to the schema? The best workaround I've found is to mark the schema intent isAssistantOnly = true (which hides it from Shortcuts while keeping it available to Siri/Apple Intelligence), and then use AppShortcutsProvider to provide a separate non-schema AppIntent that exposes just title/list/note to Shortcuts. However, the docs describe isAssistantOnly as a migration aid that's only intended to be enabled temporarily while migrating an existing intent to an app schema intent. Questions: Is that a supported use of the isAssistantOnly property? Is there a way to mark individual parameters as unsupported so they do not appear in Shortcuts? Is there another recommended approach when an app can only fulfill part of a schema? Thank you!
0
0
233
3w
Pls give me new siri
Hi, so I just installed the 27 iOS beta and I use an iPad 4th generation or 10th and it was like a long time to start the update, but I’m OK with it. I just wanted to the Apple know if y’all could please give me the new Siri because last time when Apple Intelligence came I tried to install that update and it didn’t let me so I’m not forcing you that you’ll need to give it to me right now, but I was just seeing if y’all could please give it to me because I really need it. I don’t really need it, but I just want to test it out and for smarter use thank you Apple. If you have any questions, just text me on iMessage or reply to me by mail. Anything that you can do possibly but please approve me thank you.
3
2
383
3w
Foundation Models, image input and locating things within an image
I'm trying to use Foundation Models to identify the things in an image. That part is easy and is working well. I'd like to also know where in the image the things are. This is where I'm hitting a wall. For example, if there's an image of a horse and a cow, I'd like to be told (even approximate) coordinates of where in the image the horse is and where the cow is. Bounding boxes are fine for my needs. (Any coordinate system will work because it's easy enough to convert from one to another) The LanguageModelSession consistently lists the items in the image and gives me bounding boxes for their location that are reasonable approximations of where the images are in relation to one another, but it will (usually, not always) completely fail at explaining where the objects are in relation to the image as a whole, which is what I need. What's more, the failures are not consistent. Sometimes it will tell me that all the images are in the top half of the image. Other times, it will blow up the location of one or more objects in the image to multiples of their actual size. I've tried asking the LanguageModelSession to output the locations in various coordinate systems: raw pixel numbers normalized position (0 ... 1) integer percent position (0% ... 100%) a few different attempts at "soft location" systems where I just ask the LLM to tell me if the objects are in the top left corner or in the center for instance Of these, the "soft location" gives more consistent answers, but nothing that is complete enough to be usable. Asking for raw pixels gives answers that are ALMOST usable, but the position rectangles it gives are often off by one or two times the width or height of the object or suffer from the issue of "bunching" all the rectangles into the top of the image. I believe that part of the problem I'm having is that FoundationModels must downsample the image before processing. It appears that it's downsampling to 896px for the longest dimension of the image. Even accounting for this, though, I get strange output. Yes, I have considered using VisionKit's GenerateObjectnessBasedSaliencyImageRequest. It works well for another part of my project, but it doesn't fit exactly the particular need that I have here. It gives me locations of objects but not what they are. FoundationModels gives me what objects are in the image but not their locations. It may be that FoundationModels just isn't going to give me an accurate enough location for the objects in the image. It's a LLM, not a ML model, after all. If that's the case, I'd appreciate if someone would verify that so I can stop barking up this tree. It just seems like it should be possible, and I keep getting results that are almost accurate enough to be useful to me. Any help at all would be appreciated. Below are the instructions and prompt I'm using. let session = LanguageModelSession( instructions: """ You describe images to help another AI model identify and label distinct objects. Identify the distinct foreground subjects — objects, animals, people, or things that stand out as individual items someone would point to and name. Be specific (e.g. "a black and white cow", "a red coffee mug", "a wooden chair"). For each subject, provide a tight bounding box as pixel coordinates: - topLeft: upper-left corner of the box (x from left edge, y from top edge) - bottomRight: lower-right corner (x and y must be larger than topLeft's) - (0, 0) is the top-left pixel; x increases rightward, y increases downward - the exact pixel dimensions of each image are stated in the prompt you receive Also note background objects — items visible in the scene but not the main focus. Describe the setting — the background environment (surface, room, landscape, or space). Do not merge subjects and setting. A cow standing in a field has the cow as a subject and the field as the setting — not both as subjects. """ ) let prompt = Prompt { "Describe this \(imageWidth)×\(imageHeight) image. Bounding box coordinates are in pixels: (0,0) is top-left, (\(imageWidth),\(imageHeight)) is bottom-right." Attachment(modelImage.cgImage, orientation: modelImage.orientation) }
1
0
242
3w
Issue: Inflexible API Versioning Logic in Foundation Models framework utilities
In the Foundation Models framework utilities package, the private method buildURLRequest in ChatCompletionsLanguageModel handles the construction of OpenAI-compatible API URLs: private func buildURLRequest(for request: ChatCompletionRequest) throws -> URLRequest { let isVersioned = baseURL.pathComponents.contains("v1") let endpoint = isVersioned ? "/chat/completions" : "/v1/chat/completions" let url = baseURL.appendingPathComponent(endpoint) ... } Problem The current implementation hardcodes "v1" to determine if the baseURL already includes a version. This limits compatibility with API providers using alternative versioning schemes. For instance, Volcengine Ark uses "v3" in its Base URL, making it difficult to seamlessly integrate their services. #Playground { let baseURL = URL(string: "https://ark.cn-beijing.volces.com/api/v3")! let modelName = "doubao-seed-2-0-mini-260428" let headers: [String : String] = [ "Authorization" : "Bearer \(apiKey)" ] let model = ChatCompletionsLanguageModel(name: modelName, url: baseURL, additionalHeaders: headers) let session = LanguageModelSession(model: model) do { let result = try await session.respond(to: "Hello").content } catch { print(error.localizedDescription) // HTTP error with status code 404: } } #Playground { let baseURL = URL(string: "https://ark.cn-beijing.volces.com/api/v3/responses")! let modelName = "doubao-seed-2-0-mini-260428" let headers: [String : String] = [ "Authorization" : "Bearer \(apiKey)" ] let model = ChatCompletionsLanguageModel(name: modelName, url: baseURL, additionalHeaders: headers) let session = LanguageModelSession(model: model) do { let result = try await session.respond(to: "Hello").content } catch { print(error.localizedDescription) /* HTTP error with status code 404: {"error":{"code":"InvalidAction","message":"The specified action is invalid: /api/v3/responses/v1/chat/completions Request id: 021784381168842fdfd2e3c33d5b6eddad55ac385080e727cab08","param":"","type":"NotFound"}} */ } } Suggested Solution To better accommodate different versioning conventions (e.g., v2, v3), we can leverage Swift's modern Regex (#/v\d+/#) to dynamically detect the version pattern in the path components. Here is a recommended update for the isVersioned check: let isVersioned = baseURL.pathComponents.contains { component in component.wholeMatch(of: #/v\d+/#) != nil }
2
0
263
3w
Is `.appEntityIdentifier` + `Transferable` the intended way to let Siri send an on-screen image to another app? (iOS 27)
I'm trying to make a third-party app's on-screen image available to Siri / Apple Intelligence so the user can say something like "send this to " and have the image handed off. And I'd like to confirm whether I'm using the intended mechanism or whether this particular case just isn't supported yet. What I'm trying to do My app shows a single image (it owns no photo library, the image is an in-app render). I want the user to be able to reference it as "this" and have Siri move it to another app. What I implemented (following Making onscreen content available to Siri and Apple Intelligence and WWDC26 240/343) A plain AppEntity with a stable id, conforming to Transferable, annotated on the image view with the iOS 27 .appEntityIdentifier(_:) modifier: struct OnScreenImageEntity: AppEntity, Transferable { static let typeDisplayRepresentation = TypeDisplayRepresentation(name: "On-Screen Image") static let defaultQuery = Query() let id: String static var transferRepresentation: some TransferRepresentation { DataRepresentation(exportedContentType: .plainText) { … } // distinctive text DataRepresentation(exportedContentType: .png) { … } // the image } struct Query: EntityQuery { func entities(for ids: [String]) async throws -> [OnScreenImageEntity] { logger.notice("entities(for:) CALLED \(ids)") // <- never fires return ids.filter { store.isCurrent($0) }.map(OnScreenImageEntity.init) } } } // on the view: Image(uiImage: image) .appEntityIdentifier(EntityIdentifier(for: OnScreenImageEntity.self, identifier: id)) What I observe (iOS 27 Beta 3, device) "Describe this image" / "Create a note for this" appear to use an automatic screenshot — the responses reference my app's UI chrome, and EntityQuery.entities(for:) is never called, so my entity's Transferable is not involved at all. "Send this to " doesn't attach the image; Siri says something like "I can't attach the image directly from your screen," which again sounds like a screen grab. entities(for:) is not called. The only flow that resolves my entity is the ChatGPT hand-off: asking Siri about the on-screen content calls entities(for:) (several times). But even there it stalls — Siri responds "could not clarify what you mean by 'about this'… document, image, or topic?", and no Transferable representation is ever read (my export closures never run). So the entity resolves, yet the content is never actually transferred. The older NSUserActivity.appEntityIdentifier route was never consumed at all; only the iOS 27 .appEntityIdentifier(_:) view modifier produced any resolution, and only in the ChatGPT flow above. I also understand from WWDC26 240/343 that the cross-app content move is built on IntentValueRepresentation (entity ↔ a system value type like IntentPerson), which the recipient imports via IntentValueQuery / IntentValueRepresentation(importing:). Since there doesn't seem to be a system value type for an arbitrary image (and IntentFile isn't one), I'm not sure an image entity can participate in that transfer at all. My questions Is .appEntityIdentifier(_:) the intended way to expose a single on-screen item in iOS 27? It only resolves my entity in the ChatGPT hand-off, and even then the Transferable is never read — under what conditions is the resolved entity's Transferable actually consumed? Are on-screen content requests ("describe this", "create a note for this") ever meant to use an app-provided AppEntity + Transferable, or are they always served by screen capture? (For me they never call entities(for:).) Is there a supported path for Siri to send an image from a third-party app's on-screen content to another app? If the transfer requires IntentValueRepresentation and there's no image system value, is a Transferable image representation ever consumed for this — and if so, how is it triggered? If this is simply not supported for image content yet, that's useful to know too, I just want to make sure I'm not missing a required piece (a schema conformance, an eligibility flag, a different annotation API, etc.). I have a minimal sample project that reproduces this (single annotated image, no photo library, logs to a subsystem so you can see entities(for:) never being called) and filed it as Feedback FB23813341 — happy to share details. Thanks!
4
3
413
3w
Use ShowInAppSearchResultsIntent with custom Parameters
I’m currently using ShowInAppSearchResultsIntent to open the app in a selectable view with the search results. The user can choose which view to pick via a @Parameter. Though with iOS 27 I can’t compile this intent anymore, because of this error: 'ShowInAppSearchResultsIntent' must only have a 'criteria' parameter What is the best practice to offer the same selection of the search view with iOS 27 and newer then? My Code import AppIntents @AppIntent(schema: .system.search) struct SearchAppIntent: ShowInAppSearchResultsIntent { static let searchScopes: [StringSearchScope] = [.general] var criteria: StringSearchCriteria // MARK: Parameters @Parameter(default: .loans) var target: SearchView? // MARK: Action Text static var parameterSummary: some ParameterSummary { Summary("Search \(\.$criteria) in \(\.$target)", table: "Shortcuts") } // MARK: Action @MainActor func perform() async throws -> some IntentResult { switch target { case .general, nil: // Open app search tab NavigationManager.shared.openAppSearch(with: criteria.term) case .contacts: // Open contacts tab NavigationManager.shared.openContactsSearch(with: criteria.term) } return .result() } }
4
0
424
3w
qwen3.5 free offline plugin for xcode
I can't figure how to install it Here's google post: You can use the following free options directly inside Xcode 27:1. Built-in On-Device Predictive Code CompletionApple provides a free on-device, on-chip model that runs entirely locally on your Mac.Cost: 100% Free (no internet connection or subscription required).How it works: It uses Apple Silicon to predict and autocomplete your Swift code instantly as you type.Setup: Go to Xcode > Settings > Intelligence and ensure local code completion is toggled on.2. Free-Tier Cloud Models (ChatGPT, Claude, & Gemini)Xcode 27 explicitly features a native two-tier intelligence system. For simple completions, it uses your local chip. For complex planning, multi-turn conversations, and writing autonomous unit tests, it integrates directly with cloud providers. You can utilize the free tiers of these services:Anthropic Claude: You can generate a free API key from the Anthropic Developer Console to power Xcode 27’s coding agents.OpenAI ChatGPT: You can hook Xcode directly into OpenAI's free-tier API allowance.Google Gemini: Xcode 27 natively supports Google's ecosystem, allowing you to use a free Gemini API key.Setup: Navigate to Xcode > Settings > Intelligence, select your cloud provider, and paste your free API key.3. Fully Local Open-Weight Models via OllamaIf you want to handle complex agent tasks without data leaving your Mac, you can connect Xcode 27 to local open-source models. This requires an Apple Silicon Mac.Recommended Models: qwen2.5-coder (highly recommended for Swift and SwiftUI) or llama3-coder.Setup:Download and run Ollama.Pull the model via your Mac terminal (ollama run qwen2.5-coder).Use an Xcode 27 compatible local-host bridge tool or local API endpoint under the "Custom Provider" option in Xcode's Intelligence settings to link Ollama's local port (localhost:11434) straight into your workspace.Xcode 27 Agent SkillsWhen using these models in Xcode 27, they will automatically ingest Apple's native Agent Skills (like the SwiftUI Specialist Skill). This means even a generic free model will receive Apple's optimized context rules to write better, modern Swift 6 code.Are you looking to use the model mostly for inline code autocompletion or for the new conversational agent features (like having the AI autonomously write tests and fix bugs in your workspace)? I can walk you through the exact setup steps for either.19 sitesXcode 27 Beta Release Notes | Apple Developer DocumentationOverview. Xcode 27 beta includes Swift 6.4 and SDKs for iOS 27, iPadOS 27, tvOS 27, macOS 27, and visionOS 27. Xcode 27 beta suppo...Apple DeveloperInside Apple Intelligence and Xcode: Special Presentation | WWDC26so today we're going to build something fun live on stage together but first can we'll give you a quick tour of Xcode. 27. all rig...49sYouTube·Apple DeveloperSwiftUI Best Practices, straight from Apple's Xcode 27 Agent SkillSwiftUI Best Practices, straight from Apple's Xcode 27 Agent Skill. Xcode 27 launched during WWDC 2026 and includes Apple's SwiftU...SwiftLeeShow all
2
0
505
3w
Large memory consumption when running Core ML model on A13 GPU
We recently had to change our MLModel's architecture to include custom layers, which means the model can't run on the Neural Engine anymore. After the change, we observed a lot of crashes being reported on A13 devices. It turns out that the memory consumption when running the prediction with the new model on the GPU is much higher than before, when it was running on the Neural Engine. Before, the peak memory load was ~350 MB, now it spikes over 2 GB, leading to a crash most of the time. This only seems to happen on the A13. When forcing the model to only run on the CPU, the memory consumption is still high, but the same as running the old model on the CPU (~750 MB peak). All tested on iOS 16.1.2. We profiled the process in Instruments and found that there are a lot of memory buffers allocated by Core ML that are not freed after the prediction. The allocation stack trace for those buffers is the following: We ran the same model on a different device and found the same buffers in Instruments, but there they are only 4 KB in size. It seems, Core ML is somehow massively over-allocating memory when run on the A13 GPU. So far we limit the model to only run on CPU for those devices, but this is far from ideal. Is there any other model setting or workaround that we can use to avoid this issue?
Replies
3
Boosts
2
Views
2.4k
Activity
1w
App Intents Phone Schema Domain - .phone.startCall does not invoke perform()
We're implementing the App Intents Phone schema domain in our app to enable Siri to initiate calls to our contact entities via our voip. We've implemented a .phone.startCall intent and registered our entities as .phone.phonePerson. The intent provides both the required destination and audioVisualMode parameters, and the perform() method is implemented to handle the call. However, the perform() method is never invoked. Instead, Siri either: Says that the phone number is not linked, or Announces that it is calling, but our app intent is never executed. Anybody implemented this Phone schema domain and it s working successfully ? Sample Code: struct StartCallIntent: AudioRecordingIntent, AudioPlaybackIntent { var destination: CallDestination var audioVisualMode: CallAVMode init(contact: ContactEntity, mode: CallAVMode = .audio) { self.destination = .phonePerson(contact) self.audioVisualMode = mode } func perform() async throws -> some IntentResult { print("Call Initiating to contact") return .result() } @AppEnum(schema: .phone.audioVisualMode) enum CallAVMode: String, CaseIterable { case audio case video } @UnionValue enum CallDestination: Sendable { case phonePerson(ContactEntity) case group([ContactEntity]) } @AppEntity(schema: .phone.phonePerson) struct ContactEntity: IndexedEntity { static var defaultQuery = ContactEntityQuery() let id: UUID var person: IntentPerson }
Replies
3
Boosts
0
Views
833
Activity
1w
iOS 27 beta 3/4: Siri AI never enrolls
Device: iPhone 15 Pro iOS: 27.0 beta 4 (same issue on beta 3) Related Feedback: FB23788932, FB23961529 (both marked "More than 10 similar reports", still Open) Siri AI / Apple Intelligence never activate. Extensive testing rules out account/region as the cause — this looks like a broken asset delivery / enrollment pipeline. Symptoms: Console (subsystem com.apple.GenerativeModels) shows repeated calls: isUseCaseAccessNotGrantedSecure: user=501, input=["com.apple.Siri.EnhancedSiriDisablement"] isUseCaseAccessNotGrantedSecure: returning granted (false); no pendingEnrollment for any of [...] ["com.apple.Siri.EnhancedSiriDisablement"] -> false This is consistent across hundreds of calls — the system never attempts enrollment, it just returns false immediately, every time. Settings > General > iPhone Storage shows 3.38GB already allocated to "Apple Intelligence," but the feature never activates — suggesting an incomplete/corrupted asset set rather than missing data entirely. Toggling Wi-Fi off prompts a ~9.5GB "intelligence tools" download. Confirming it produces no progress and no result. Siri language pack downloads get stuck at 100% and never proceed to activation. Search and Siri Suggestions indexing (Settings > Siri & Search) initially shows no percentage, disappears, then reappears days later with a percentage stuck for 24+ hours despite "Last updated: X minutes ago" continuing to refresh — suggesting the background worker is alive but stuck, possibly hitting the same broken asset service. Region-dependent behavior (most useful clue): in a region NOT eligible for Siri AI (Ukraine), legacy Siri (old interface) responds normally to "Hey Siri." In a region eligible for Siri AI (US — tested with a brand-new Apple Account, region set to US, no data restored from backup), "Hey Siri" activates (wake word detection works) but the request hangs indefinitely with no response, and legacy Siri does not answer either. This suggests the system correctly detects eligibility, but there is no fallback to the legacy Siri response pipeline when the region is eligible yet the new Foundation Models assets fail to finish downloading/activating. Already tried (no effect on any of these): Reset Network Settings Reset All Settings Multiple restarts, multiple Wi-Fi networks, cellular data Changing device Language & Region to US Fresh Apple Account created with US region, Payment Method: None, signed in clean (no backup restore) — identical isUseCaseAccessNotGrantedSecure: false result, legacy Siri also silent under this account Steps to reproduce: Update iPhone 15 Pro to iOS 27 beta 3 or 4 via Software Update (not clean install). Settings > Apple Intelligence & Siri — no functional enrollment progress. Toggle Wi-Fi off — download prompt appears, confirming does nothing. Say "Hey Siri" — activates, no response. Has anyone else on iPhone 15 Pro hit this specific isUseCaseAccessNotGrantedSecure / no pendingEnrollment pattern? Any word on whether this is a known/tracked issue for beta 5?
Replies
0
Boosts
0
Views
735
Activity
2w
Different architecture M-chip connected over RDMA for inference
Can anyone please tell if a M5 Pro Macbook Pro can connect to a M3 ultra Mac studio over thunderbolt 5 using RDMA for LLM inference? Thanks
Replies
1
Boosts
0
Views
446
Activity
2w
Siri AI broken
Hi everyone, I’m testing the latest iOS 27 beta and I’ve noticed an issue with the new Siri. When I ask very simple questions that should be handled locally or through basic reasoning, Siri consistently responds with: “Uh oh, something went wrong.” For example, asking: “When is the next Friday the 13th?” results in the error message instead of an answer. I’ve reproduced this multiple times and it seems to happen with other straightforward informational queries as well. I’ve already tried restarting the device and checking my network connection, but the issue persists. Has anyone else experienced this behavior with the new Siri in the iOS 27 beta? If so, were you able to find a workaround or identify what’s causing it? Any help or confirmation would be greatly appreciated. Thanks!
Replies
9
Boosts
0
Views
1.5k
Activity
2w
Supporting iOS 27 app entity schemas and maintaining backwards compatability
We have an app that supports iOS 18+ We have a couple of AppEntity(s) that we are keen to make work with the new schemas along with several AppIntent(s). We cannot increase our floor to iOS 27 for obvious reasons. All the documentation suggests using the macros, e.g. @AppEntity(schema: .audio.song) struct SongEntity { ... } This refuses to compile below iOS 26. It's possible to add availability checks, e.g. @available(anyAppleOS 27, *) @AppEntity(schema: .audio.song) struct SongEntity { ... } But then the whole entity becomes unavailable on pre-27 OSes. So I tried moving the macro onto an extension, e.g. struct SongEntity { ... } @available(anyAppleOS 27, *) @AppEntity(schema: .audio.song) extension SongEntity { ... } But this results in a compiler error: 'extension' macro cannot be attached to extension (extension of 'SongEntity') One other option is to create a new entity with a totally different name and mark it as isAssistantOnly but this has a lot of quite negative downstream effects that make it unworkable. For example: a lot of code duplication duplication in search indexes if we index both sets of entities awkwardness trying to use NSUserActivity when we have 2 different entity types pain in downstream AppIntent arguments which would require duplicating every AppIntent which has more cascading effects The same issues are present in AppIntent schemas too where even trying to add the most basic @AppIntent(schema: .system.open) to our existing OpenIntent doesn't seem possible for all the same reasons. I am really struggling with how to structure code so we can support schemas, currently I don't really see a path forward here until our floor raises to iOS 27. Is there a way to make this work nicely with the current APIs? What are others doing here? How can apps can ship in September and support both this and pre iOS 27 cleanly? Thinking about solutions here, my ideal would be that the macros are improved to either: be able to be applied to an extension rather than the structure itself. expand in such a way that they still build the core AppEntity / AppIntent on pre 27 OSes but then add the iOS 27 schema additions behind @available internally so they can be used with older targets as essentially no-ops on the current definitions.
Replies
3
Boosts
1
Views
1.1k
Activity
2w
Core ML memory usage is dramatically higher with an Xcode 27 build on iOS 27
I’m seeing a major change in reported memory usage (and eventual termination due to memory pressure) when running a Core ML workload built with Xcode 27 on iOS/iPadOS 27. The source code, model files, and MLModelConfiguration are unchanged. Only the Xcode/SDK version used to build the app differs. On the same iPad running iPadOS 27: Xcode 26 build: model loading and prediction complete normally, with a relatively small reported application footprint. Xcode 27 build: the application footprint grows continuously as models are loaded and can exceed 5 GB. The app is eventually terminated unless models are unloaded very aggressively or the increased-memory-limit entitlement is used. I also tested an Xcode 27 build on a device running iOS 26. Its reported peak was only around 300 MB. This suggests the change requires both an Xcode 27-linked binary and the iOS 27 runtime. The workload consists of several compiled Core ML models using .cpuAndNeuralEngine. Loading models sequentially instead of concurrently does not materially change the final footprint. Releasing each MLModel after use does reduce it, so this appears to be model or Neural Engine residency being charged to the application rather than a conventional heap leak. I noticed that the iOS 27 release notes mention Neural Engine memory now being attributed to the application instead of the system. However, I’m unclear about the practical consequences of that change. If the same Neural Engine resources were already physically resident on iOS 26, I would have expected them to contribute to system memory pressure even when they were not attributed directly to the application. Instead, the older configuration runs comfortably, while the Xcode 27/iOS 27 combination approaches or crosses the application’s per-process memory limit. A few additional observations: The problem is more likely to occur after Core ML has already compiled and specialized the models. Cached model loading is much faster and the footprint grows quickly. The first uncached run can survive model preparation because specialization spaces the loads farther apart. Under Instruments, the app often does not terminate, presumably because profiling slows the workload enough to change the peak. os_proc_available_memory() decreases in line with the newly reported footprint. With the increased-memory-limit entitlement, the workload completes, but the reported footprint still reaches several gigabytes. Has anyone else observed a large Core ML memory increase specifically with an Xcode 27 build running on iOS 27? In particular, I’m trying to understand: Is this purely a change in how existing Neural Engine memory is accounted for, or does the new runtime also retain or allocate more memory? Is the new accounting used for the application’s jetsam/per-process memory limit? Is this behavior intentionally gated by the linked SDK version? That would explain why an Xcode 26 build behaves differently on the same iOS 27 device. Should applications now treat the Neural Engine residency of every loaded MLModel as part of their process-memory budget and unload models accordingly? Are there recommended APIs or Core ML loading strategies for controlling this residency? Any confirmation that others are seeing the same Xcode 27/iOS 27 behavior—or clarification of the intended memory-accounting model—would be very helpful.
Replies
0
Boosts
0
Views
297
Activity
2w
Supporting legacy INAddTasksIntent and the new .reminders.createReminder App Intent schema
We have a list app that implements INAddTasksIntent so users can add items to our app with Siri. We're now working on implementing an App Intent for the .reminders.createReminder schema for iOS 27. Our app still supports iOS 18, so it implements both INAddTasksIntent and the .reminders.createReminder schema. Observed behavior (iOS 27 beta 4): When we say "Siri, add eggs to my grocery list in AppName", Siri routes the request to the legacy INAddTasksIntent handler in our SiriKit extension. Our new CreateReminderIntent is never invoked. I confirmed this with breakpoints and logging in both handlers. The CreateReminderIntent does seem to be set up correctly, because it appears in the Shortcuts app and I can invoke it via AppIntentsTesting. Also, after using the above phrase, I was able to say "Siri, add cookies to my grocery list" and the item got added to my app via the INAddTasksIntent, even though I didn't specify the app name in the request. This also worked with a version of our app that does not contain CreateReminderIntent running on iOS 26.5. Isn't the app name normally required for INAddTasksIntent to be invoked? Questions: Is Siri activating the INAddTasksIntent instead of the new CreateReminderIntent expected behavior? Are users on iOS 27 going to have a worse experience adding items to our app with Siri if we support both INAddTasksIntent and the new CreateReminderIntent? If so, how do you recommend we proceed? Thank you for any guidance you can provide.
Replies
2
Boosts
0
Views
216
Activity
2w
Siri Ai iPhone 12
I wanted to activate the new Siri AI on my iPhone 12 running iOS 27 Developer Beta 4. I knew it didn't support Apple Intelligence features, but I switched the language to English anyway—and then I ran into this bug: I went into the Siri tab and saw this.
Replies
0
Boosts
0
Views
163
Activity
2w
Siri Ai iPhone 12
I wanted to activate the new Siri AI on my iPhone 12 running iOS 27 Developer Beta 4. I knew it didn't support Apple Intelligence features, but I switched the language to English anyway—and then I ran into this bug: I went into the Siri tab and saw this.
Replies
0
Boosts
0
Views
186
Activity
2w
Suggestion for the SiriAI in European Union
As a user from Bulgaria, I would also like to suggest a possible approach that could benefit both Apple and users in the European Union. Even if the new AI-powered Siri becomes available in the EU in the future, it is unlikely to support every European language immediately. For example, Siri AI does not currently support Bulgarian, which means many users like me would still be unable to use its full capabilities in our native language. Because of this, I believe users should have the option to choose their preferred AI assistant as the system assistant—for example Siri, ChatGPT, Gemini, or another approved assistant. From my perspective, this could also align well with the goals of the Digital Markets Act (DMA). If Siri in the EU is required to have the same level of system access and permissions as third-party assistants, then all assistants would operate under the same rules, with the same privacy protections and the same limitations regarding access to system resources. This would create a level playing field while still allowing users to decide which assistant best meets their needs. For users like me, this would be especially valuable because I could choose an assistant that supports Bulgarian, while still enjoying the privacy and security standards that Apple is known for. I understand that this is only one possible approach, and there may be technical or regulatory challenges that I am not aware of. Nevertheless, I believe giving users more choice could be beneficial for both Apple and its customers across the European Union. I would be interested in hearing what other developers and Apple engineers think about this idea.
Replies
0
Boosts
0
Views
174
Activity
2w
Apple inteligente
Gerstart Apple inteligente
Replies
1
Boosts
0
Views
244
Activity
3w
Questions for Apple Support / Apple Vision Team
Dear Apple Support, I would like to report a long-standing issue affecting Khmer text recognition in Live Text (Vision Framework/OCR). Based on my testing, this issue has persisted for more than two years, from iOS 17 through iOS 27 Beta 3, and is also reproducible on iPadOS and macOS. I would appreciate clarification on the following questions: Is Apple aware of an issue where Live Text (OCR/Text Recognition) incorrectly recognizes Khmer script as Thai script, causing copied text to become Thai characters instead of Khmer? Has this issue been officially logged as a bug within the Vision Framework or Live Text team? Since this behavior has remained reproducible from iOS 17 to iOS 27 Beta 3, why has it not yet been resolved? Is the problem caused by: automatic language detection, the OCR recognition model, the Vision Framework, or another component of Apple's AI pipeline? Does Apple currently have a dedicated OCR and language recognition model for the Khmer script, or is Khmer being inferred through another language model? Is there an estimated timeline for improving Khmer OCR and preventing Khmer text from being misidentified as Thai? Can Apple confirm whether this issue affects all products using Vision Framework, including: Live Text Photos Preview Screenshot OCR APIs provided to third-party developers? How can Apple work with the Khmer technology community to improve OCR accuracy and language support for Khmer? This issue is more than a simple OCR bug. When Khmer text is automatically converted into Thai characters, users lose access to the original text, developers receive incorrect OCR output, and it negatively impacts the digital representation of the Khmer language. For reference, I have documented the issue in detail here: https://app.notion.com/p/Inaccurate-OCR-Language-Inference-Khmer-Script-Misidentified-as-Thai-in-Vision-Framework-2d8a24f4ee6680fcbc49d989f8bb606f I hope Apple can investigate this issue and prioritize improving Khmer language support across Vision Framework and Live Text. Thank you.
Replies
7
Boosts
19
Views
941
Activity
3w
Hiding unsupported parameters of a schema-conforming intent from Shortcuts
I've adopted the .reminders.createReminder schema so users can create reminders in my app via Siri and Apple Intelligence. My app only supports a subset of the schema (title, list, and note), but the macro requires me to declare all the other parameters (e.g. isFlagged, tags), so I declare them and ignore them in perform(). The problem: in the Shortcuts app, every declared parameter shows up as an editable field, so it looks like my app supports flags, tags, etc when it doesn't, and the values are silently ignored if the user sets them. Is there a supported way to keep parameters my app can't fulfill from appearing in Shortcuts while still conforming to the schema? The best workaround I've found is to mark the schema intent isAssistantOnly = true (which hides it from Shortcuts while keeping it available to Siri/Apple Intelligence), and then use AppShortcutsProvider to provide a separate non-schema AppIntent that exposes just title/list/note to Shortcuts. However, the docs describe isAssistantOnly as a migration aid that's only intended to be enabled temporarily while migrating an existing intent to an app schema intent. Questions: Is that a supported use of the isAssistantOnly property? Is there a way to mark individual parameters as unsupported so they do not appear in Shortcuts? Is there another recommended approach when an app can only fulfill part of a schema? Thank you!
Replies
0
Boosts
0
Views
233
Activity
3w
Pls give me new siri
Hi, so I just installed the 27 iOS beta and I use an iPad 4th generation or 10th and it was like a long time to start the update, but I’m OK with it. I just wanted to the Apple know if y’all could please give me the new Siri because last time when Apple Intelligence came I tried to install that update and it didn’t let me so I’m not forcing you that you’ll need to give it to me right now, but I was just seeing if y’all could please give it to me because I really need it. I don’t really need it, but I just want to test it out and for smarter use thank you Apple. If you have any questions, just text me on iMessage or reply to me by mail. Anything that you can do possibly but please approve me thank you.
Replies
3
Boosts
2
Views
383
Activity
3w
Foundation Models, image input and locating things within an image
I'm trying to use Foundation Models to identify the things in an image. That part is easy and is working well. I'd like to also know where in the image the things are. This is where I'm hitting a wall. For example, if there's an image of a horse and a cow, I'd like to be told (even approximate) coordinates of where in the image the horse is and where the cow is. Bounding boxes are fine for my needs. (Any coordinate system will work because it's easy enough to convert from one to another) The LanguageModelSession consistently lists the items in the image and gives me bounding boxes for their location that are reasonable approximations of where the images are in relation to one another, but it will (usually, not always) completely fail at explaining where the objects are in relation to the image as a whole, which is what I need. What's more, the failures are not consistent. Sometimes it will tell me that all the images are in the top half of the image. Other times, it will blow up the location of one or more objects in the image to multiples of their actual size. I've tried asking the LanguageModelSession to output the locations in various coordinate systems: raw pixel numbers normalized position (0 ... 1) integer percent position (0% ... 100%) a few different attempts at "soft location" systems where I just ask the LLM to tell me if the objects are in the top left corner or in the center for instance Of these, the "soft location" gives more consistent answers, but nothing that is complete enough to be usable. Asking for raw pixels gives answers that are ALMOST usable, but the position rectangles it gives are often off by one or two times the width or height of the object or suffer from the issue of "bunching" all the rectangles into the top of the image. I believe that part of the problem I'm having is that FoundationModels must downsample the image before processing. It appears that it's downsampling to 896px for the longest dimension of the image. Even accounting for this, though, I get strange output. Yes, I have considered using VisionKit's GenerateObjectnessBasedSaliencyImageRequest. It works well for another part of my project, but it doesn't fit exactly the particular need that I have here. It gives me locations of objects but not what they are. FoundationModels gives me what objects are in the image but not their locations. It may be that FoundationModels just isn't going to give me an accurate enough location for the objects in the image. It's a LLM, not a ML model, after all. If that's the case, I'd appreciate if someone would verify that so I can stop barking up this tree. It just seems like it should be possible, and I keep getting results that are almost accurate enough to be useful to me. Any help at all would be appreciated. Below are the instructions and prompt I'm using. let session = LanguageModelSession( instructions: """ You describe images to help another AI model identify and label distinct objects. Identify the distinct foreground subjects — objects, animals, people, or things that stand out as individual items someone would point to and name. Be specific (e.g. "a black and white cow", "a red coffee mug", "a wooden chair"). For each subject, provide a tight bounding box as pixel coordinates: - topLeft: upper-left corner of the box (x from left edge, y from top edge) - bottomRight: lower-right corner (x and y must be larger than topLeft's) - (0, 0) is the top-left pixel; x increases rightward, y increases downward - the exact pixel dimensions of each image are stated in the prompt you receive Also note background objects — items visible in the scene but not the main focus. Describe the setting — the background environment (surface, room, landscape, or space). Do not merge subjects and setting. A cow standing in a field has the cow as a subject and the field as the setting — not both as subjects. """ ) let prompt = Prompt { "Describe this \(imageWidth)×\(imageHeight) image. Bounding box coordinates are in pixels: (0,0) is top-left, (\(imageWidth),\(imageHeight)) is bottom-right." Attachment(modelImage.cgImage, orientation: modelImage.orientation) }
Replies
1
Boosts
0
Views
242
Activity
3w
Issue: Inflexible API Versioning Logic in Foundation Models framework utilities
In the Foundation Models framework utilities package, the private method buildURLRequest in ChatCompletionsLanguageModel handles the construction of OpenAI-compatible API URLs: private func buildURLRequest(for request: ChatCompletionRequest) throws -> URLRequest { let isVersioned = baseURL.pathComponents.contains("v1") let endpoint = isVersioned ? "/chat/completions" : "/v1/chat/completions" let url = baseURL.appendingPathComponent(endpoint) ... } Problem The current implementation hardcodes "v1" to determine if the baseURL already includes a version. This limits compatibility with API providers using alternative versioning schemes. For instance, Volcengine Ark uses "v3" in its Base URL, making it difficult to seamlessly integrate their services. #Playground { let baseURL = URL(string: "https://ark.cn-beijing.volces.com/api/v3")! let modelName = "doubao-seed-2-0-mini-260428" let headers: [String : String] = [ "Authorization" : "Bearer \(apiKey)" ] let model = ChatCompletionsLanguageModel(name: modelName, url: baseURL, additionalHeaders: headers) let session = LanguageModelSession(model: model) do { let result = try await session.respond(to: "Hello").content } catch { print(error.localizedDescription) // HTTP error with status code 404: } } #Playground { let baseURL = URL(string: "https://ark.cn-beijing.volces.com/api/v3/responses")! let modelName = "doubao-seed-2-0-mini-260428" let headers: [String : String] = [ "Authorization" : "Bearer \(apiKey)" ] let model = ChatCompletionsLanguageModel(name: modelName, url: baseURL, additionalHeaders: headers) let session = LanguageModelSession(model: model) do { let result = try await session.respond(to: "Hello").content } catch { print(error.localizedDescription) /* HTTP error with status code 404: {"error":{"code":"InvalidAction","message":"The specified action is invalid: /api/v3/responses/v1/chat/completions Request id: 021784381168842fdfd2e3c33d5b6eddad55ac385080e727cab08","param":"","type":"NotFound"}} */ } } Suggested Solution To better accommodate different versioning conventions (e.g., v2, v3), we can leverage Swift's modern Regex (#/v\d+/#) to dynamically detect the version pattern in the path components. Here is a recommended update for the isVersioned check: let isVersioned = baseURL.pathComponents.contains { component in component.wholeMatch(of: #/v\d+/#) != nil }
Replies
2
Boosts
0
Views
263
Activity
3w
Is `.appEntityIdentifier` + `Transferable` the intended way to let Siri send an on-screen image to another app? (iOS 27)
I'm trying to make a third-party app's on-screen image available to Siri / Apple Intelligence so the user can say something like "send this to " and have the image handed off. And I'd like to confirm whether I'm using the intended mechanism or whether this particular case just isn't supported yet. What I'm trying to do My app shows a single image (it owns no photo library, the image is an in-app render). I want the user to be able to reference it as "this" and have Siri move it to another app. What I implemented (following Making onscreen content available to Siri and Apple Intelligence and WWDC26 240/343) A plain AppEntity with a stable id, conforming to Transferable, annotated on the image view with the iOS 27 .appEntityIdentifier(_:) modifier: struct OnScreenImageEntity: AppEntity, Transferable { static let typeDisplayRepresentation = TypeDisplayRepresentation(name: "On-Screen Image") static let defaultQuery = Query() let id: String static var transferRepresentation: some TransferRepresentation { DataRepresentation(exportedContentType: .plainText) { … } // distinctive text DataRepresentation(exportedContentType: .png) { … } // the image } struct Query: EntityQuery { func entities(for ids: [String]) async throws -> [OnScreenImageEntity] { logger.notice("entities(for:) CALLED \(ids)") // <- never fires return ids.filter { store.isCurrent($0) }.map(OnScreenImageEntity.init) } } } // on the view: Image(uiImage: image) .appEntityIdentifier(EntityIdentifier(for: OnScreenImageEntity.self, identifier: id)) What I observe (iOS 27 Beta 3, device) "Describe this image" / "Create a note for this" appear to use an automatic screenshot — the responses reference my app's UI chrome, and EntityQuery.entities(for:) is never called, so my entity's Transferable is not involved at all. "Send this to " doesn't attach the image; Siri says something like "I can't attach the image directly from your screen," which again sounds like a screen grab. entities(for:) is not called. The only flow that resolves my entity is the ChatGPT hand-off: asking Siri about the on-screen content calls entities(for:) (several times). But even there it stalls — Siri responds "could not clarify what you mean by 'about this'… document, image, or topic?", and no Transferable representation is ever read (my export closures never run). So the entity resolves, yet the content is never actually transferred. The older NSUserActivity.appEntityIdentifier route was never consumed at all; only the iOS 27 .appEntityIdentifier(_:) view modifier produced any resolution, and only in the ChatGPT flow above. I also understand from WWDC26 240/343 that the cross-app content move is built on IntentValueRepresentation (entity ↔ a system value type like IntentPerson), which the recipient imports via IntentValueQuery / IntentValueRepresentation(importing:). Since there doesn't seem to be a system value type for an arbitrary image (and IntentFile isn't one), I'm not sure an image entity can participate in that transfer at all. My questions Is .appEntityIdentifier(_:) the intended way to expose a single on-screen item in iOS 27? It only resolves my entity in the ChatGPT hand-off, and even then the Transferable is never read — under what conditions is the resolved entity's Transferable actually consumed? Are on-screen content requests ("describe this", "create a note for this") ever meant to use an app-provided AppEntity + Transferable, or are they always served by screen capture? (For me they never call entities(for:).) Is there a supported path for Siri to send an image from a third-party app's on-screen content to another app? If the transfer requires IntentValueRepresentation and there's no image system value, is a Transferable image representation ever consumed for this — and if so, how is it triggered? If this is simply not supported for image content yet, that's useful to know too, I just want to make sure I'm not missing a required piece (a schema conformance, an eligibility flag, a different annotation API, etc.). I have a minimal sample project that reproduces this (single annotated image, no photo library, logs to a subsystem so you can see entities(for:) never being called) and filed it as Feedback FB23813341 — happy to share details. Thanks!
Replies
4
Boosts
3
Views
413
Activity
3w
Use ShowInAppSearchResultsIntent with custom Parameters
I’m currently using ShowInAppSearchResultsIntent to open the app in a selectable view with the search results. The user can choose which view to pick via a @Parameter. Though with iOS 27 I can’t compile this intent anymore, because of this error: 'ShowInAppSearchResultsIntent' must only have a 'criteria' parameter What is the best practice to offer the same selection of the search view with iOS 27 and newer then? My Code import AppIntents @AppIntent(schema: .system.search) struct SearchAppIntent: ShowInAppSearchResultsIntent { static let searchScopes: [StringSearchScope] = [.general] var criteria: StringSearchCriteria // MARK: Parameters @Parameter(default: .loans) var target: SearchView? // MARK: Action Text static var parameterSummary: some ParameterSummary { Summary("Search \(\.$criteria) in \(\.$target)", table: "Shortcuts") } // MARK: Action @MainActor func perform() async throws -> some IntentResult { switch target { case .general, nil: // Open app search tab NavigationManager.shared.openAppSearch(with: criteria.term) case .contacts: // Open contacts tab NavigationManager.shared.openContactsSearch(with: criteria.term) } return .result() } }
Replies
4
Boosts
0
Views
424
Activity
3w
qwen3.5 free offline plugin for xcode
I can't figure how to install it Here's google post: You can use the following free options directly inside Xcode 27:1. Built-in On-Device Predictive Code CompletionApple provides a free on-device, on-chip model that runs entirely locally on your Mac.Cost: 100% Free (no internet connection or subscription required).How it works: It uses Apple Silicon to predict and autocomplete your Swift code instantly as you type.Setup: Go to Xcode > Settings > Intelligence and ensure local code completion is toggled on.2. Free-Tier Cloud Models (ChatGPT, Claude, & Gemini)Xcode 27 explicitly features a native two-tier intelligence system. For simple completions, it uses your local chip. For complex planning, multi-turn conversations, and writing autonomous unit tests, it integrates directly with cloud providers. You can utilize the free tiers of these services:Anthropic Claude: You can generate a free API key from the Anthropic Developer Console to power Xcode 27’s coding agents.OpenAI ChatGPT: You can hook Xcode directly into OpenAI's free-tier API allowance.Google Gemini: Xcode 27 natively supports Google's ecosystem, allowing you to use a free Gemini API key.Setup: Navigate to Xcode > Settings > Intelligence, select your cloud provider, and paste your free API key.3. Fully Local Open-Weight Models via OllamaIf you want to handle complex agent tasks without data leaving your Mac, you can connect Xcode 27 to local open-source models. This requires an Apple Silicon Mac.Recommended Models: qwen2.5-coder (highly recommended for Swift and SwiftUI) or llama3-coder.Setup:Download and run Ollama.Pull the model via your Mac terminal (ollama run qwen2.5-coder).Use an Xcode 27 compatible local-host bridge tool or local API endpoint under the "Custom Provider" option in Xcode's Intelligence settings to link Ollama's local port (localhost:11434) straight into your workspace.Xcode 27 Agent SkillsWhen using these models in Xcode 27, they will automatically ingest Apple's native Agent Skills (like the SwiftUI Specialist Skill). This means even a generic free model will receive Apple's optimized context rules to write better, modern Swift 6 code.Are you looking to use the model mostly for inline code autocompletion or for the new conversational agent features (like having the AI autonomously write tests and fix bugs in your workspace)? I can walk you through the exact setup steps for either.19 sitesXcode 27 Beta Release Notes | Apple Developer DocumentationOverview. Xcode 27 beta includes Swift 6.4 and SDKs for iOS 27, iPadOS 27, tvOS 27, macOS 27, and visionOS 27. Xcode 27 beta suppo...Apple DeveloperInside Apple Intelligence and Xcode: Special Presentation | WWDC26so today we're going to build something fun live on stage together but first can we'll give you a quick tour of Xcode. 27. all rig...49sYouTube·Apple DeveloperSwiftUI Best Practices, straight from Apple's Xcode 27 Agent SkillSwiftUI Best Practices, straight from Apple's Xcode 27 Agent Skill. Xcode 27 launched during WWDC 2026 and includes Apple's SwiftU...SwiftLeeShow all
Replies
2
Boosts
0
Views
505
Activity
3w