Post not yet marked as solved
In the Configuration Intent with dynamic values, there is an option to allow the user to select multiple values. In my use-case, the widget can handle the display of up to 3 values, but no more. Is there a way to tell the system to only allow selection of 1, 2 or 3 values?
Post not yet marked as solved
I'm not sure how to properly set the relevance duration field. My expectation is that a relevance for a timeline entry would be valid until the next timeline entry takes over, but that doesn't seem to be the case.
Let's say my widget contains info about an upcoming event, and the event is in 2 days. My code calculates a relevance score from 1-100, where 1 is two weeks away and 100 is at the moment the event starts. The goal would be to set the relevance so that it slowly increases as the event gets closer.
How often should I update the timeline entry with a new relevance? And if I update the timeline with a new entry every 4 hours let's say, do I make my relevance duration 4 hours? Or something shorter? Or longer?
Post not yet marked as solved
In the Configure and link your app clips WWDC session, a situation is described where the same App Clip can handle viewing the menu and placing an order, and also reserving a table.
Wouldn't it make sense to deliver this as two separate App Clip binaries, so the device wouldn't have to download all the code and assets for both experiences when they only need one?
I've got Siri Shortcuts implemented on iOS 12 by donating custom intentions. They show up (with the developer settings turned on) right away on the lock screen as expected, and they launch the app.I can't seem to get them to show up on the watch app now, and the WWDC videos are very light on actual code samples. I'm taking my intent subclasses and generating relevant shortcuts from them, but no matter what they won't show up in the Siri Watch Face. let resultsIntent = SeeResultsIntent()
let resultsShortcut = INRelevantShortcut(shortcut: INShortcut(intent: resultsIntent)!)
resultsShortcut.relevanceProviders = [INDateRelevanceProvider(start: Date().dateByAdding(minutes: 5), end: Date().dateByAdding(days: 1))]
INRelevantShortcutStore.default.setRelevantShortcuts([resultsShortcut]) { error in
if let error = error {
NSLog("Error setting relevant shortcuts: \(error)")
} else {
NSLog("Siri watch face shortcuts loaded")
}
I've tried running this same code on the iOS app and on the watch app extension, doesn't seem to matter. How can I debug this? How can I test this and verify they're being recorded? Do the settings in the iOS Developer menu about showing donated intents affect the Siri watch face as well? Where do I go from here?