My app uses Core Data and has enabled App Groups for data sharing between the App and Widget.
In my app, there's a Core Data entity called Task. As per the documentation's suggestion, I've separately implemented a TaskData struct that conforms to AppEntity. I've also implemented TaskDataQuery: EntityQuery, which includes a method called suggestedEntities. This method fetches all Tasks from the main context and uses Task.toTaskData.
Following the documentation, I've implemented the corresponding WidgetConfigurationIntent, which holds:
@Parameter(title: "Task") var task: TaskData
as well as the corresponding AppIntentTimelineProvider to implement the provider.
I haven't encountered any retrieval issues on the simulator; everything works perfectly.
However, the problem arises when I deploy to a physical device. Users report that their widgets can't retrieve any data. Specifically, when users long-press the widget to set up a task, it remains in a Loading state, unable to fetch any Core Data.
I've looked through some resources, and it seems this might be a common issue with iOS 17?
How can I resolve this issue? Has anyone encountered this or can offer any suggestions? This has been troubling me for several days now, and it's causing my product to continually lose users. I'm really upset about it.
Any advice is welcome.