I have a widget that runs well on iOS 18. It is configurable and implements AppIntentTimelineProvider on the Provider. On iOS 17 it will call the placeholder method 7 times and not call the timeline method. The configuration intent implements WidgetConfigurationIntent.
I've looked through the console logs and saw "ApplicationExtension record not found" but I'm not sure where to go from there. Why would the same widget work fine on iOS 18 and not 17? If I implement TimelineProvider and use a StaticConfiguration it works on iOS 17.
Any help / guidance would be appreciated.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am working on a widget that allows the user to specify a list of items.
Each item is an AppEntity and has an id, a type and a name. In the DisplayRepresentation I have and icon / image for each type. So when I tap on the specified items option a list of user specified items comes up with the option to search, select, deselect items. This works nicely. I sort them suggested entities by type then name so the list is predictable. How would like to be able to have a group / type header for each type of item. However, I don't know how to do that with the AppEntities. Help would be appreciated.
I noticed that HomeKit takes a different approach. They have a list of items at the bottom labeled "Choose Scene Or Accessory". You can move the items up / down in the list, you can delete, and add items. When you tap "Add an item" in the list it goes to a search screen where the items are grouped by the room and have the individual items beneath them. I don't like that you have to select one item at a time but I love having the headings for the rooms. The question here is how did they do that? Is there sample code somewhere that does something similar.
Is anyone familiar with AppIntents and their usage?
I have an AppIntent defined in my widget extension.
I have the same AppIntent defined in the app marked as ForegroundContinuableIntent.
If I add the intent on a SwiftUI button and tap the Button it correctly resolves the app's version of the intent and performs that intent.
However, what I really want to do is perform the AppIntent manually as the timeline updates but not more often than every hour (i.e. >= 1 hour).
It's easy enough to handle the timing in the timeline. However, I do not know how to resolve the intent such that it calls the app's version of the intent (i.e. the same way that a Button does). If I just call perform it will run the version in the widget extension.
The end goal is to minimally / periodically sync with the app.
Thanks in advance for any help / advice on this.
Topic:
UI Frameworks
SubTopic:
SwiftUI
We have a widget bundle with multiple widgets.
I'm adding a widget that is interactive (iOS 17 and higher).
Our widget code is in a static library that gets linked into the widget extension target in our main app Xcode project.
I have SwiftUI buttons constructed with the intent constructor in our UI
See https://developer.apple.com/documentation/swiftui/button/init(intent:label:)
When I press the button the timeline refreshes (conforming to TimelineProvider) but the perform method doesn't seem to be called.
I've seen multiple pieces of advice and none of them seem to work.
I've tried on a physical device and a simulator.
I've tried adding an AppIntentsPackage.
I've tried including the AppIntent code in the app and the widget.
I've tried setting the openAppWhenRun to true and false and not setting it at all.
I've tried simplifying the intent to just printing out a line to the console and returning a result.
At this point I have no idea how to debug this and I don't know what else to try.
I appreciate any helpful advice at this point.
We want to be able to use our own prompt / coaching for RoomPlan
I see that I can override the following method to see the RoomCaptureSession.Instruction and then add or our UI to coach the customer
func captureSession(_ session: RoomCaptureSession, didProvide instruction: RoomCaptureSession.Instruction) {
Logger.log(.info, category: .roomplan, message: "RoomCaptureSession.Instruction(\(instruction))")
// Show coaching prompts
}
However, I don't know how to remove the coaching UI provided by the OS.
If I disable coaching
sessionConfig = RoomCaptureSession.Configuration()
sessionConfig.isCoachingEnabled = false
Then the callback above was not being called.
I really want a willProvide method that I can return 'false' to say that I want to give my own UI instead of the UI provided by RoomPlan.
Is there a way to provide my own ui for these RoomCaptureSession.Instructions?
Thanks in advance