Posts under Machine Learning & AI topic

Post

Replies

Boosts

Views

Activity

How to obtain more value out of a generic "FoundationModels.LanguageModelError error -1"
I created a tiny sample: provided a session with a tiny tool to tell the date and time to the model. Asked the model to stream response to "What time is it" and just get this error: The operation couldn’t be completed. (FoundationModels.LanguageModelError error -1.) There is no relevant output on Xcode console. And profiling with the new Foundation Models instrument brings zero more insight into the issue. I know it could be many things, but it there may be more information the tools could surface in debug?
4
0
72
5d
Cannot pattern match LanguageModelError from a response stream
The LanguageModelSession.GenerationErrors seems to be deprecated in favor of LanguageModelError for the most part. Now... when iterating through the ResponseStream<String> of a LanguageModelSession.streamResponse(to:options:), with a good old for await, the async iterator .next() can throws. Leaving aside that it is not very conspicuous at the call site it will throw... in the do/catch, the error thrown does not see to be able to be pattern matched to the new LanguageModelError with something like catch let error as LanguageModelError. It was able to patten match the GenerationErrors before just fine, so may be an oversight/bug?
3
0
83
5d
App Intent photos createAssets can't receive user selected files
When implementing @AppIntent(schema: .photos.createAssets) in my app I can accept files to import as assets into my app. Therefore I would expect be able to use this in Shortcuts and pass in a selected file to my createAssets intent. For example using the Files app Select Files action and pass the selected files on to my photos.createAssets action. However doesn't seem to be possible in any way. The only thing I can do in Shortcuts is select a file for the create assets action at the time I make the shortcut. Which removes all flexibility. Is this a bug or a missing feature? Or am I missing something how to set this up correctly? I've been testing this with the new "Integrating your photo app with Apple Intelligence" Apple Sample and it's not working with that in any way. FB23066510
1
0
38
5d
Nearly 70 hours on Siri waitlist
Downloaded the moment WWDC presentation ended at 11a PT. Phone 17 Air, English (US) Plugged in over (3) nights Still indexing Rebooted 5+ times Still waitlisted. The only feature anyone cares about is gated. So much for “available immediately“. Losing trust with Apple fast here.
0
0
192
5d
App Intents + Siri AI
Hey, Running iOS 27 beta and have App Intents working in the shortcuts app. When I ask the exact query via Siri it seems to say it can't do that and asks me to open the app to do it manually. Is this expected behaviour? A bug? Anything I need to double check? The app doesn't map to a schema directly.
0
2
69
6d
Sandbox-Bypassing IPC between App Intents and Launchd Daemons on macOS
We are designing a macOS utility that runs a local background agent via launchd (managing a local SQLite database and Unix socket). We want to expose controls (start/stop, status checks, CLI command invocation) to Siri via the App Intents framework. Since App Intents typically execute within a sandboxed App Extension or a sandboxed App wrapper container: What is the recommended IPC mechanism (e.g., Unix domain sockets, local HTTP/TCP ports, XPC) to securely communicate between a sandboxed App Intent extension and a non-sandboxed launchd helper daemon on macOS? Are there specific Entitlements (com.apple.security.temporary-exception.files.absolute-path.read-write or network exceptions) required to allow App Intents to talk to local UNIX sockets or loopback interfaces (127.0.0.1) without triggering sandbox violations? Can an App Intent directly invoke a helper command-line tool or launch a plist-configured service without bringing up the main application UI?
2
0
79
6d
Meal nutrition data/Siri AI and iOS27 vision framework
I'm an app developer with an interest in nutrition data. While watching the Keynote segment on Monday, there was a brief section about Siri AI and iOS 27 Vision framework being used to scan a meal with an iPhone camera and display the meal nutritional content. I have two questions: Do the displayed data include GI (glycemic index) and/or GL (glycemic load)? and Are these nutrition data surfaced anywhere, especially in HealthKit, or — if not — will Apple make a public API available so developers can use these data directly in iOS27 apps?
3
0
94
6d
How can I get Siri to recognize "43rd and Broadway"?
Hi all, This is a simplification of an AppIntent where I need my phrases to recognize three "regions" and a specific set of numbers associated with those regions. I am having trouble defining the AppEntity and associated AppShortcut phrases that works well with Siri, which is having trouble extracting numbers for some reason... Now the example: Imagine my app provides information surrounding Starbucks establishments on three major thoroughfares in NYC, such as: Broadway & 26, 40, 43, 54, 63, 75, 86, 95 Madison & 44, 50, 84, 96 Lexington & 43, 48, 55, 63, 67, 77, 85, 96 I need AppEntities, AppShortcuts, and friends that best work with Siri when launched with phrases such as: "Show 'example' for Madison and 50th in \(.applicationName)", "Show 'example' on 43rd and Broadway in \(.applicationName)", Long story short, Siri is picking up my phrases well, but then asking me to answer whether the value is 44, 50, 84, or 96, instead of just hearing that I said: "Madison and 50th" I've defined streets like this: public let nycStreetDisplayRepresentations: [DisplayRepresentation] = [ DisplayRepresentation(title: "26", synonyms: ["twenty six", "twenty sixth"]), DisplayRepresentation(title: "40", synonyms: ["forty", "fortieth"]), DisplayRepresentation(title: "43", synonyms: ["forty three", "forty third"]), DisplayRepresentation(title: "48", synonyms: ["forty eight", "forty eighth"]), DisplayRepresentation(title: "50", synonyms: ["fifty", "fiftieth"]), DisplayRepresentation(title: "54", synonyms: ["fifty four", "fifty fourth"]), DisplayRepresentation(title: "55", synonyms: ["fifty five", "fifty fifth", "five five"]), DisplayRepresentation(title: "63", synonyms: ["sixty three", "sixty third"]), DisplayRepresentation(title: "67", synonyms: ["sixty seven", "sixty seventh"]), DisplayRepresentation(title: "75", synonyms: ["seventy five", "seventy fifth"]), DisplayRepresentation(title: "77", synonyms: ["seventy seven", "seventy seventh", "seven seven"]), DisplayRepresentation(title: "84", synonyms: ["eighty four", "eighty fourth"]), DisplayRepresentation(title: "85", synonyms: ["eighty five", "eighty fifth"]), DisplayRepresentation(title: "86", synonyms: ["eighty six", "eighty sixth"]), DisplayRepresentation(title: "95", synonyms: ["ninety five", "ninety fifth"]), DisplayRepresentation(title: "96", synonyms: ["ninety six", "ninety sixth"]) ] And an entity like this: public struct MadisonThings: AppEntity, Identifiable { public let id: Int public var displayRepresentation: DisplayRepresentation { nycStreetDisplayRepresentations[id-1] } public static var typeDisplayRepresentation = TypeDisplayRepresentation( name: "Madison" , synonyms: ["Madison Ave"] ) public static var defaultQuery = MadisonTHingsQuery() } An EntityQuery: public struct MadisonThingsQuery: EntityQuery, EntityStringQuery { ...attempts to find synonyms in the phrase } Intent: public struct ShowMadisonThingsIntent: AppIntent { { @Parameter( title: "Street Number", description: "The street number (e.g., 5, 12, 44)" ) var streetNumber: MadisonThings // I have also tried just plain 'int' to no avail } And finally the shortcuts: static var appShortcuts: [AppShortcut] { return [ AppShortcut( intent: ShowMadisonThingsIntent(), phrases: [ "Show example for Madison and \(\.$streetNumber) in \(.applicationName)", "Show example on \(\.$streetNumber) in \(.applicationName)", ... This should be very simple, I think, and I've tried multiple ways of extracting numbers from my speech, but for some reason this is not working well at all. Thanks for your help!
3
0
122
6d
Can I import images into my app with App Intent Schemas?
I'm trying to create an App Intent that takes in an image and copies it to a destination within my app. Sure, this can be done with shortcuts, but that's lame, I want siri to grab an image off the screen and invoke the action! Without an app schema, it doesn't seem like siri can tell what's possible in the app, so I'm trying to find a schema that fits? I've started trying to do this with the photos.addAssetsToAlbum App Intent schema, but it doesn't seem like Siri is onboard with the concept. It's replied many times that it is unable to add things to my App and that I should try via other means like opening my app and importing directly. Should be I be trying this with a different intent schema? I was thinking about files.open, but documentation says that Schema is not available to Siri.
3
0
67
6d
Semantic Voice Search and Natural Language Parameter Resolution
How does next-gen Siri handle semantic or semantic-adjacent parameter resolution when using EntityQuery? For example, if a user says 'Siri, show memory tags related to auth errors' and the exact tag is auth-handler-failure: Does the App Intents framework support passing the raw query string (from natural language) directly to our search/recall logic within the intent, or does it try to map it strictly to pre-registered AppEntity lists? How do we configure an AppEntity to support synonyms or regex-like string match resolution directly within Siri's offline/online parsing?
1
0
66
6d
WebKit interop with AppIntents
Is there any new functionality in WebKit for bridging WebViews with the AppIntents framework? For example, is there a simple way to create an IndexedEntity whose content is provided by a WKWebView? Also, if I use appEntityIdentifer in a View that contains a WKWebView, will Siri see the web view’s content?
2
1
62
6d
Adopting AppEntity schemas
I'm trying to get my head around adopting AppEntity schemas. Is it OK to shoehorn a closely-related concept from our apps into AppEntity schemas, even if they'r not a perfect fit? For e.g. I have 'tasks' in my app, that are related to a 'person' entity. Would it work to adopt a schema like @AppEntity(schema: .reminders.reminder) struct TaskEntity: IndexedEntity { var personForTask: PersonEntity ... fill in other required fields } Most of the fields are optional or arrays, so it could work, but one of the required fields seems to be var list: ListEntity, so I would have to conform to that in some way. Similarly, I would want to adopt the .reminders.createReminder @AppIntent for my app, even though I won't be able to support all the parameters that it can support. Would that be OK as well?
1
0
62
6d
Photos grid layout for .photos.asset entities in Spotlight
When using the .photos.asset schema for an AppEntity conforming to IndexedEntity, is there a way to trigger the rich grid layout in Spotlight results that native apps like Photos and Messages currently utilize?
Replies
1
Boosts
0
Views
56
Activity
5d
Indexing and Siri wait list
I’m going on 2 1/2 days waiting on the indexing and still on the wait list is there something I am missing or should I just wait it out
Replies
2
Boosts
0
Views
63
Activity
5d
How to obtain more value out of a generic "FoundationModels.LanguageModelError error -1"
I created a tiny sample: provided a session with a tiny tool to tell the date and time to the model. Asked the model to stream response to "What time is it" and just get this error: The operation couldn’t be completed. (FoundationModels.LanguageModelError error -1.) There is no relevant output on Xcode console. And profiling with the new Foundation Models instrument brings zero more insight into the issue. I know it could be many things, but it there may be more information the tools could surface in debug?
Replies
4
Boosts
0
Views
72
Activity
5d
Cannot pattern match LanguageModelError from a response stream
The LanguageModelSession.GenerationErrors seems to be deprecated in favor of LanguageModelError for the most part. Now... when iterating through the ResponseStream<String> of a LanguageModelSession.streamResponse(to:options:), with a good old for await, the async iterator .next() can throws. Leaving aside that it is not very conspicuous at the call site it will throw... in the do/catch, the error thrown does not see to be able to be pattern matched to the new LanguageModelError with something like catch let error as LanguageModelError. It was able to patten match the GenerationErrors before just fine, so may be an oversight/bug?
Replies
3
Boosts
0
Views
83
Activity
5d
App Intent photos createAssets can't receive user selected files
When implementing @AppIntent(schema: .photos.createAssets) in my app I can accept files to import as assets into my app. Therefore I would expect be able to use this in Shortcuts and pass in a selected file to my createAssets intent. For example using the Files app Select Files action and pass the selected files on to my photos.createAssets action. However doesn't seem to be possible in any way. The only thing I can do in Shortcuts is select a file for the create assets action at the time I make the shortcut. Which removes all flexibility. Is this a bug or a missing feature? Or am I missing something how to set this up correctly? I've been testing this with the new "Integrating your photo app with Apple Intelligence" Apple Sample and it's not working with that in any way. FB23066510
Replies
1
Boosts
0
Views
38
Activity
5d
Nearly 70 hours on Siri waitlist
Downloaded the moment WWDC presentation ended at 11a PT. Phone 17 Air, English (US) Plugged in over (3) nights Still indexing Rebooted 5+ times Still waitlisted. The only feature anyone cares about is gated. So much for “available immediately“. Losing trust with Apple fast here.
Replies
0
Boosts
0
Views
192
Activity
5d
App Intents + Siri AI
Hey, Running iOS 27 beta and have App Intents working in the shortcuts app. When I ask the exact query via Siri it seems to say it can't do that and asks me to open the app to do it manually. Is this expected behaviour? A bug? Anything I need to double check? The app doesn't map to a schema directly.
Replies
0
Boosts
2
Views
69
Activity
6d
Sandboxed network permissions on macOS
Are there specific Entitlements (com.apple.security.temporary-exception.files.absolute-path.read-write or network exceptions) required to allow App Intents to talk to local UNIX sockets or loopback interfaces (127.0.0.1) without triggering sandbox violations?
Replies
0
Boosts
0
Views
37
Activity
6d
Dynamic Runtime App Shortcuts
Can App Shortcuts (and their trigger phrases) be generated or translated dynamically at runtime based on user-defined configurations (e.g. download-on-demand language models or custom voice aliases), or must all voice shortcuts and translations be statically declared in the application's compiled String Catalogs (.xcstrings)?
Replies
0
Boosts
2
Views
66
Activity
6d
Voice-Streaming & Text-to-Speech (TTS) Latency
How does the App Intents framework support streaming spoken voice (TTS) output for long-form text responses? Is there an API (such as an asynchronous sequence or buffer stream) that allows Siri to begin speaking a response while the underlying AI engine is still generating the remainder of the text?
Replies
0
Boosts
0
Views
43
Activity
6d
Sandbox-Bypassing IPC between App Intents and Launchd Daemons on macOS
We are designing a macOS utility that runs a local background agent via launchd (managing a local SQLite database and Unix socket). We want to expose controls (start/stop, status checks, CLI command invocation) to Siri via the App Intents framework. Since App Intents typically execute within a sandboxed App Extension or a sandboxed App wrapper container: What is the recommended IPC mechanism (e.g., Unix domain sockets, local HTTP/TCP ports, XPC) to securely communicate between a sandboxed App Intent extension and a non-sandboxed launchd helper daemon on macOS? Are there specific Entitlements (com.apple.security.temporary-exception.files.absolute-path.read-write or network exceptions) required to allow App Intents to talk to local UNIX sockets or loopback interfaces (127.0.0.1) without triggering sandbox violations? Can an App Intent directly invoke a helper command-line tool or launch a plist-configured service without bringing up the main application UI?
Replies
2
Boosts
0
Views
79
Activity
6d
Shortcut-specific domains?
Under the App Schemas list, some of the entries are listed under "Shortcut-specific domains" (like Books and Journaling). What's the difference? Will those domains not be used with Siri AI?
Replies
1
Boosts
0
Views
59
Activity
6d
Deployment & Entitlements
Does the Foundation Models framework support notarized, non-App Store apps on macOS, and are there specific entitlements required to access on-device system models in that environment?
Replies
1
Boosts
1
Views
47
Activity
6d
Meal nutrition data/Siri AI and iOS27 vision framework
I'm an app developer with an interest in nutrition data. While watching the Keynote segment on Monday, there was a brief section about Siri AI and iOS 27 Vision framework being used to scan a meal with an iPhone camera and display the meal nutritional content. I have two questions: Do the displayed data include GI (glycemic index) and/or GL (glycemic load)? and Are these nutrition data surfaced anywhere, especially in HealthKit, or — if not — will Apple make a public API available so developers can use these data directly in iOS27 apps?
Replies
3
Boosts
0
Views
94
Activity
6d
How can I get Siri to recognize "43rd and Broadway"?
Hi all, This is a simplification of an AppIntent where I need my phrases to recognize three "regions" and a specific set of numbers associated with those regions. I am having trouble defining the AppEntity and associated AppShortcut phrases that works well with Siri, which is having trouble extracting numbers for some reason... Now the example: Imagine my app provides information surrounding Starbucks establishments on three major thoroughfares in NYC, such as: Broadway & 26, 40, 43, 54, 63, 75, 86, 95 Madison & 44, 50, 84, 96 Lexington & 43, 48, 55, 63, 67, 77, 85, 96 I need AppEntities, AppShortcuts, and friends that best work with Siri when launched with phrases such as: "Show 'example' for Madison and 50th in \(.applicationName)", "Show 'example' on 43rd and Broadway in \(.applicationName)", Long story short, Siri is picking up my phrases well, but then asking me to answer whether the value is 44, 50, 84, or 96, instead of just hearing that I said: "Madison and 50th" I've defined streets like this: public let nycStreetDisplayRepresentations: [DisplayRepresentation] = [ DisplayRepresentation(title: "26", synonyms: ["twenty six", "twenty sixth"]), DisplayRepresentation(title: "40", synonyms: ["forty", "fortieth"]), DisplayRepresentation(title: "43", synonyms: ["forty three", "forty third"]), DisplayRepresentation(title: "48", synonyms: ["forty eight", "forty eighth"]), DisplayRepresentation(title: "50", synonyms: ["fifty", "fiftieth"]), DisplayRepresentation(title: "54", synonyms: ["fifty four", "fifty fourth"]), DisplayRepresentation(title: "55", synonyms: ["fifty five", "fifty fifth", "five five"]), DisplayRepresentation(title: "63", synonyms: ["sixty three", "sixty third"]), DisplayRepresentation(title: "67", synonyms: ["sixty seven", "sixty seventh"]), DisplayRepresentation(title: "75", synonyms: ["seventy five", "seventy fifth"]), DisplayRepresentation(title: "77", synonyms: ["seventy seven", "seventy seventh", "seven seven"]), DisplayRepresentation(title: "84", synonyms: ["eighty four", "eighty fourth"]), DisplayRepresentation(title: "85", synonyms: ["eighty five", "eighty fifth"]), DisplayRepresentation(title: "86", synonyms: ["eighty six", "eighty sixth"]), DisplayRepresentation(title: "95", synonyms: ["ninety five", "ninety fifth"]), DisplayRepresentation(title: "96", synonyms: ["ninety six", "ninety sixth"]) ] And an entity like this: public struct MadisonThings: AppEntity, Identifiable { public let id: Int public var displayRepresentation: DisplayRepresentation { nycStreetDisplayRepresentations[id-1] } public static var typeDisplayRepresentation = TypeDisplayRepresentation( name: "Madison" , synonyms: ["Madison Ave"] ) public static var defaultQuery = MadisonTHingsQuery() } An EntityQuery: public struct MadisonThingsQuery: EntityQuery, EntityStringQuery { ...attempts to find synonyms in the phrase } Intent: public struct ShowMadisonThingsIntent: AppIntent { { @Parameter( title: "Street Number", description: "The street number (e.g., 5, 12, 44)" ) var streetNumber: MadisonThings // I have also tried just plain 'int' to no avail } And finally the shortcuts: static var appShortcuts: [AppShortcut] { return [ AppShortcut( intent: ShowMadisonThingsIntent(), phrases: [ "Show example for Madison and \(\.$streetNumber) in \(.applicationName)", "Show example on \(\.$streetNumber) in \(.applicationName)", ... This should be very simple, I think, and I've tried multiple ways of extracting numbers from my speech, but for some reason this is not working well at all. Thanks for your help!
Replies
3
Boosts
0
Views
122
Activity
6d
Can I import images into my app with App Intent Schemas?
I'm trying to create an App Intent that takes in an image and copies it to a destination within my app. Sure, this can be done with shortcuts, but that's lame, I want siri to grab an image off the screen and invoke the action! Without an app schema, it doesn't seem like siri can tell what's possible in the app, so I'm trying to find a schema that fits? I've started trying to do this with the photos.addAssetsToAlbum App Intent schema, but it doesn't seem like Siri is onboard with the concept. It's replied many times that it is unable to add things to my App and that I should try via other means like opening my app and importing directly. Should be I be trying this with a different intent schema? I was thinking about files.open, but documentation says that Schema is not available to Siri.
Replies
3
Boosts
0
Views
67
Activity
6d
Integrating Siri with AppIntent that doesn't fit a pre-defined schema/domain
I have an app that controls speakers. Among others it has an action to change various settings. The intent has three parameters, setting, value (dependent on the setting selected) and speaker. Is it possible for Siri to understand phrases such as 'Turn On Night Mode in Bedroom' or 'Set Bass to 2 in Bedroom'?
Replies
1
Boosts
0
Views
80
Activity
6d
Semantic Voice Search and Natural Language Parameter Resolution
How does next-gen Siri handle semantic or semantic-adjacent parameter resolution when using EntityQuery? For example, if a user says 'Siri, show memory tags related to auth errors' and the exact tag is auth-handler-failure: Does the App Intents framework support passing the raw query string (from natural language) directly to our search/recall logic within the intent, or does it try to map it strictly to pre-registered AppEntity lists? How do we configure an AppEntity to support synonyms or regex-like string match resolution directly within Siri's offline/online parsing?
Replies
1
Boosts
0
Views
66
Activity
6d
WebKit interop with AppIntents
Is there any new functionality in WebKit for bridging WebViews with the AppIntents framework? For example, is there a simple way to create an IndexedEntity whose content is provided by a WKWebView? Also, if I use appEntityIdentifer in a View that contains a WKWebView, will Siri see the web view’s content?
Replies
2
Boosts
1
Views
62
Activity
6d
Adopting AppEntity schemas
I'm trying to get my head around adopting AppEntity schemas. Is it OK to shoehorn a closely-related concept from our apps into AppEntity schemas, even if they'r not a perfect fit? For e.g. I have 'tasks' in my app, that are related to a 'person' entity. Would it work to adopt a schema like @AppEntity(schema: .reminders.reminder) struct TaskEntity: IndexedEntity { var personForTask: PersonEntity ... fill in other required fields } Most of the fields are optional or arrays, so it could work, but one of the required fields seems to be var list: ListEntity, so I would have to conform to that in some way. Similarly, I would want to adopt the .reminders.createReminder @AppIntent for my app, even though I won't be able to support all the parameters that it can support. Would that be OK as well?
Replies
1
Boosts
0
Views
62
Activity
6d