wwdc20-10035

Discuss WWDC20 Session 10035 - Widgets Code-along, part 2: Alternate timelines

Posts under wwdc20-10035 tag

11 results found
Post marked as solved
315 Views

WidgetKit - No intent in timeline

I'm trying to create a widget with IntentConfiguration but always get the same error "[widget] No intent in timeline(for:with:completion:)" I even tried to download the sample code for building widgets from https://developer.apple.com/documentation/widgetkit/building_widgets_using_widgetkit_and_swiftui and I'm getting the same result. CharacterDetailExtension[35095:948968] [widget] No intent in timeline(for:with:completion:) Any hint what could be wrong in the IntentConfiguration?
Asked
Last updated .
Post marked as unsolved
107 Views

Reload Widgets when device unlock

HealthKit data not available when device is locked. is there any way to reload data when device unlocked? In application, done with background refresh of data, but due to data not accessible when device is locked, need some way to reload all timelines when device got unlocked so it has most recent data to show on widget.
Asked
Last updated .
Post marked as unsolved
94 Views

widget entension

关于 widget entension ,我按照官方demo去实际添加了 widget extension,模拟器上运行后,能在屏幕上看到widget卡片样式,但是,点击左上角添加时,列表里没有demo项呢,我是按照官方视频搞的,视频里就有,为啥我这没有呢
Asked
Last updated .
Post marked as solved
740 Views

IntentTimelineProvider does not appear to be used

I am getting the following error message after making updates for intents: CharacterDetailExtension[44128:2330561] [widget] No intent in timeline(for:with:completion:) I placed breakpoints in both functions that are part of the IntentTimelineProvider protocol: snapshot and timeline. From what I can tell, neither of these functions is getting executed. The breakpoints are never touched. And the icon on my screen is white. I am using the simulator as shown in the video, and so that may be the issue. I'll put the beta ios14 on a test device later. But am I missing something?
Asked
Last updated .
Post marked as solved
259 Views

CharacterSelectionIntent not available in scope

Following the code-along from part 1 and continued using the same code for part 2. During the intent configuration I noticed that Izzy uses CharacterSelectionIntent to refer to the intent we created (Part 1 comes with no intent) but I don't seem to be able to access that or any other variable that represents the intent. The error is the following: "Cannot find type 'CharacterSelectionIntent' in scope" I opened the part 3 code downloaded from the Apple Forums and the same error keeps popping out. Is it another thing not included in beta 1?
Asked
by Micrograx.
Last updated .
Post marked as unsolved
275 Views

widgetUrl to Main App Question

Hey All I have a question about the widget url to deep link or goto a specific view in my main app once the widget is tapped. Is this URL passed in the App Delegate ? Then i control which viewcontroller to goto ? Im a little confused , I currently have a ObjC App, and the widget itself is working great , im just curious how the "hand off" between the widget and the main app works. Im new to the URL portion. And ideas or sample (even pseudo) code would be great !
Asked
Last updated .
Post marked as unsolved
127 Views

widgetURL causes my widget to be white instead of filled in with content.

var body: some View {     switch family {     case .systemSmall:       ZStack {         AvatarView(entry.character)           .foregroundColor(.white)       }       .background(Color.gameBackground)       .widgetURL(entry.character.url) With that last modifier, I get a white widget in the preview instead of the actual content. Is anyone else seeing this?
Asked
by snackdog.
Last updated .
Post marked as solved
87 Views

Can't find Widget in jiggle menu

Following along with the WidgetKit code-along, I can load the Widget on the home screen of my simulator. However, when I enter the jiggle menu and try to add it, I cannot see the Emoji Rangers Widget. Is there some option on the simulator? Do we have to run this on device?
Asked
by ChrisWBBC.
Last updated .
Post marked as unsolved
117 Views

Don't know what to pass in configuration.

In PlaceHolderView the code below needs a configuration to be passed while initializing SimpleEntry struct.      EmojiRangerWidgetEntryView(entry: SimpleEntry(date: Date(), configuration: , character: .panda)) I tried removing the configuration property from the struct but that renders a blank view in the Canvas. Below is the auto-generated code of SimpleEntry except for the character property. struct SimpleEntry: TimelineEntry {   public let date: Date   public let configuration: ConfigurationIntent   let character: CharacterDetail }
Asked
Last updated .