Complications and widgets: Reloaded

RSS for tag

Discuss the WWDC22 Session Complications and widgets: Reloaded

Posts under wwdc2022-10050 tag

16 Posts

Post

Replies

Boosts

Views

Activity

I'm confused about WatchKit and WidgetKit and Watch Apps... Help!
Sorry for the length of this post, and all the questions. I have an iOS app written in Objective-C (too big to convert to Swift right now), and I successfully added a WatchKit app and WatchKit Extension some years ago. I also added Home Screen widgets when iOS 14 was released. With the iOS 16 betas I'd like to support Lock Screen widgets, and have also decided to move the WatchKit app/extension to SwiftUI. User journey: MyApp is launched and an item with an image is created. This item is stored in Core Data and its image is stored in a directory in the app's documents directory. A version of it is stored in NSUserDefaults in a shared app group. The user adds a Home Screen widget to show that item. Its data is pulled from the defaults, and the image is loaded from the document's directory. The user installs the Watch app and launches it. The Watch app looks inside the user defaults to retrieve the item. The iOS app sends the image to the Watch and the Watch app stores it locally (it's a small image, taking up barely a few Kb). This all works fine right now. Currently I have these targets: MyApp = main iOS app. MyApp WatchKit = Watch app storyboards and asset catalogs. MyApp WatchKit Extension = code to update the Watch interface. MyApp Widget = Home Screen widgets. MyApp IntentHandler = dynamic intents handler for the Home Screen widgets. Q1. Where do I put the code for the Lock Screen widgets? I figure these go into the My App Widget target because they're widgets and appear on the iPhone? In this video (https://developer.apple.com/videos/play/wwdc2022/10050) at 07:00 it tells you to duplicate the existing Widget target, change the bundle, change it to run on watchOS and embed it in your existing Watch App. As my original Watch App is written in Objective-C (MyApp WatchKit Extension, above) I can't/shouldn't do that, so... Q2. I think I have to create a new MyApp Watch App target, and perform the video steps on that target? I can create the views for that app, no problem. Most people update to the latest watchOS, and it's only now that watchOS 9 won't support Watch Series 3. Q3. Do I need to keep MyApp WatchKit and MyApp WatchKit Extension around? I can support older versions of watchOS if it helps my users, but they'll probably want to use the new version of watchOS, right? Can you install both versions of the app on your Watch (with watchOS 9), or does the new Swift app override the old WatchKit extension? Q4. Once I've designed the new Watch App's views in SwiftUI to replace the old WatchKit extension, where do I put the code for the complications that are being replaced? The WWDC 2022 videos (above, and a couple linked to on that page) have confused me a bit. Do I put complications views in the new MyApp Watch App target along with the other views that replace the old Watch app, or in MyApp Widget? Q5. The MyApp Widget target contains a bunch of code (WidgetUtils.swift) that populates the Home Screen widgets (and the new Lock Screen widgets), and it would fit right into the new MyApp Watch App target. Can I share that code between the two app targets just by adding WidgetUtils.swift to both target's membership? MyApp sends small images to the current MyApp WatchKit Extension. There's no code in the existing WidgetUtils.swift to handle file transfers because the images for the Home Screen widgets are pulled from the iOS app, so I need to write that in Swift for the new MyApp Watch App. The logic is already there in the old target, but I can't see any sort of equivalent to the WatchKit extension delegate where I currently handle the file transfers. Q6. Where does that go in MyApp Watch App? The existing MyApp WatchKit Extension occasionally asks MyApp for some new data. This is all done in the extension delegate which wakes up the iOS app and updates the NSUserDefaults which the extension then reads from. Q7. How do you do that in MyApp Watch App? Don't be afraid to be verbose in your responses. The more detail the better! Thank you in advance.
4
0
4.0k
Oct ’23
Live Activity can't be updated by app running in background and playing audio
Hello, I've recently hit a roadblock when trying to integrate new Live Activities into my app. My app plays audio and the basic functionality of the Live Activity is to display some info whenever currently played track changes. It seems that even though my app has enabled background modes for playing audio updating live activity's content just doesn't do anything. No message is printed to console, no error is thrown and the documentation suggests that it should be possible without using BackgroundTasks. You can only start a Live Activity from your app while it’s in the foreground. However, you can update or end a Live Activity from your app while it runs in the background — for example, by using Background Tasks. from: https://developer.apple.com/documentation/activitykit/displaying-live-data-with-live-activities Using BackgroundTasks doesn't make sense for apps that need to display relevant information for ongoing tasks. I realize that this is probably to prevent apps from updating too often but there already is an option in Info.plist to allow frequent updates for Live Activities. We've all wanted a way to interact with users on lock screen for years but such limitation seriously prevents a lot of apps from doing something cool with the API. Please consider making the API less restrictive about when the activities can be updated.
0
0
1.8k
Feb ’23
Is it possible to disable Widget Accenting on the Lock Screen?
I'd like an Image subview of a lock screen widget to render as itself, and not with the multiply-like effect it gets today. I've tried .widgetAccentable(true) and .widgetAccentable(false), but none have the appearance I'm looking for. Is there maybe a new modifier that lets me "force" the rendering mode? Hoping there is and it's just not jumping out at me. Thanks for your help.
2
3
2.1k
Jan ’23
iOS 16 Live Activities Lock Screen widget
Good morning, if I understood correctly, Live Activities will come on a later iOS 16 update and are not present on the current iOS 16 beta. I think that might explain the lack of documentation on the subject. What I'd like to understand is what could be the best path to take to make sure we're prepared to build a Lock Screen widget with Live Activities. Is a Home Screen widget a good starting point? Does anyone know? Can an Apple engineer shine some light into the topic? Thank you
16
2
25k
Nov ’22
Privacy redaction not working in iOS16 beta widget
I tried to use privacySensitive and redactionReasons to show different view in widget, but I notice that this is not working on iOS 16 beta (5~7) Below is my test code, if I use Xcode 13.4.1 with iOS 15 it works properly, in Lock Screen lock state it will display placeholder and "Privacy", but in iOS 16 not (in systemSmall widget). I'm trying use this privacy feature in new lockscreen widget (it doesn't work in new widget as well), does any one know how to fix this issue? struct WidgetEntryView : View {     var entry: Provider.Entry     @Environment(\.redactionReasons) var redactionReasons     var body: some View {         Text(entry.date, style: .time)             .privacySensitive()         if redactionReasons.contains(.privacy) {             Text("Privacy")         } else {             Text("Not Privacy")         }     } } Xcode : Xcode 14 beta 6 iOS: iOS 16 beta 7
5
3
2.1k
Oct ’22
Can't Load Image on Apple Watch Complications with New iOS 16 Widget
Image("sticker5")             .resizable()             .frame(width: 47, height: 47)             .scaledToFill() sticker5 is a picture with 94px * 94px. This is the size recommended by guideline. The Error is ComplicationsExtension[403:17806] [archiving] Widget archival failed due to image being too large [2] - (94, 94). We don't want to use low pixel images. That would look terrible. Please Help!
3
1
2.1k
Sep ’22
WidgetKit IntentHandler config tailored for each WidgetFamily type?
I've had a Widget available in an app that I publish since they first appeared in iOS14. They've used an intentDefinition file for 3 boolean switches to allow users to customise their appearance. Now with iOS16 I'm adding 2 lock screen widgets to this code. All done and it looks great. However the user configuration of these new widgets doesn't really fit the intent of the home screen Widgets. My question is how do I go about making the widget user configuration specific to each WidgetFamily type? I've had a look at the IntentHandler code and examples but it seems to be aimed more at dynamic enumerates or sub classed types. What is the correct way to achieve what I'm trying to attempt?
0
0
1.7k
Sep ’22
.timer Styled Text does not count up or down in Lock Screen Widgets
Hi, I have an interesting problem about Lock Screen Widget Complications. I prepared a widget which have .timer styled Text to display dynamic dates in my lock screen widget. It works fine in my iOS 16 (with Xcode beta - 6) simulator both debug and release modes. However the timer styled text is not counting up or down in my real device with debug mode, displays static time on screen. Also does not work testflight build of my widget development either. Do you have any idea about this issue?
3
2
1.7k
Sep ’22
Previews not supported for watchOS target Widget extension
I'm trying to add a watchOS app and watch widgets to an existing iOS project, similar to what's shown in wwdc2022-10050. The widget works fine when I select the iOS scheme, but when I switch over to the watchOS widget scheme, Xcode fails to generate a preview and gives this error. I'm not sure how to enable support for previews properly. UnsupportedProductTypeError: Previews not supported for WeatherNewWidget Watch Previews can be defined in applications, frameworks, Swift packages, or dynamic libraries productType = com.apple.product-type.extensionkit-extension buildable = WeatherNewWidget Watch.appex
1
3
1.4k
Sep ’22
watchOS 9 complications - where do they go?
I have an app with Home Screen widgets, and new Lock Screen widgets, and I'm trying to get my complications to work on the Watch. The widgets are running off dynamic intents, taking a list of items from user defaults and providing that list for the user to choose when they add a Home Screen or Lock Screen widget. This works fine. In the "Complications and widgets: Reloaded" video from WWDC2022 at about 7:00 the guy tells you to duplicate the widget extension, rename it, and set it to run on watchOS. I ended up with these targets: Main App (embeds Widget, Intents Handler and Watch App) Widget Intents Handler Watch App (embeds Complications) Complications (new, copy of Widget) At about 8:30 he adds the supported families for the Watch to his EmojiRangersWidget WidgetConfiguration, so it looks like the code for the accessory widgets is used for both Lock Screen widgets and complications? Should I be putting all my complications views in the Widget target, something like this? @main struct WidgetEntry: Widget { public var body: some WidgetConfiguration { IntentConfiguration(kind: kWidgetKind, intent: DynamicItemSelectionIntent.self, provider: Provider() ) { entry in WidgetEntryView(entry: entry) } .configurationDisplayName("abc") .description("def") #if os(watchOS) .supportedFamilies([.accessoryCircular, .accessoryInline, .accessoryRectangular, .accessoryCorner]) #else .supportedFamilies([.accessoryCircular, .accessoryInline, .accessoryRectangular, .systemSmall, .systemMedium]) #endif } } struct WidgetEntryView: View { var entry: Provider.Entry @Environment(\.widgetFamily) var family @ViewBuilder var body: some View { #if os(watchOS) switch family { case .accessoryCircular, .accessoryCorner, .accessoryInline, .accessoryRectangular: ComplicationView(item: entry.item) @unknown default: UnknownComplicationView(item: entry.item) } #else switch family { case .accessoryCircular, .accessoryInline, .accessoryRectangular: LockScreenWidgetView(item: entry.item) case .systemSmall: SmallWidgetView(item: entry.item) case .systemMedium, .systemLarge, .systemExtraLarge: MediumWidgetView(item: entry.item) @unknown default: UnknownWidgetView(item: entry.item) } #endif } } I've previously been told by an Apple engineer on these forums: "The complication code should be in the watch app target. That's where watchOS 7 and 8 will look for complications, and where watchOS 9 will look for old ClockKit complications for migration to their WidgetKit counterparts." I'm no longer supporting watchOS 7/8, but does this mean that watchOS 7/8 will look for old complications in there to migrate to the new stuff into the Widget target? I asked a couple of follow-up questions but they never got answered ¯\_(ツ)_/¯ Apple make this stuff so unnecessarily complex, even though their videos make it look so easy. How many times have we all paused their videos to see exactly what code they're writing and where they're putting it? There's practically zero help out there - these forums are full of questions and few answers. Xcode should have much better documentation and help to guide you through this. It takes so long to get anything done because there just isn't the information we need.
1
0
2.2k
Sep ’22
AccessoryCorner widgets with similar layout as the system calendar complication
When the system calendar complication is shown in the corner, it has the title of the upcoming event as the widget label and the time of the event as the main widget view. However the time of the event is not small and clipped to a circle like WidgetKit renders the complication but larger and curved together with the label. Is there a way to achieve the system corner complication layout with the WidgetKit complications?
1
1
1.2k
Sep ’22
iOS 16 - Live Activities fails to run, "subject type x does not conform to protocol ActivityAttributes"
When I try to build my widget extension, it crashes with the following error: failed to demangle witness for associated type 'Body' in conformance 'WidgetsExtension.PizzaDeliveryActivityWidget: Widget' from mangled name '1 ' - subject type x does not conform to protocol ActivityAttributes As you can notice I tried using apple's example code. Im using iOS 16 Beta 7 and Xcode 14 Beta 6.
0
0
1.4k
Aug ’22
Number of text and images in accessoryInline widget
Only one image and one Text will be displayed even if described as follows: HStack {   Text("1")   Image(systemName: "swift")   Text("2")   Image(systemName: "swift") } However, a similar layout is possible by describing it this way: Text("1 \(Image(systemName: "swift")) 2 \(Image(systemName: "swift"))") Is this behavior correct? Environment: Xcode 14 beta 5, iOS 16 beta 6
0
0
963
Aug ’22
I'm confused about WatchKit and WidgetKit and Watch Apps... Help!
Sorry for the length of this post, and all the questions. I have an iOS app written in Objective-C (too big to convert to Swift right now), and I successfully added a WatchKit app and WatchKit Extension some years ago. I also added Home Screen widgets when iOS 14 was released. With the iOS 16 betas I'd like to support Lock Screen widgets, and have also decided to move the WatchKit app/extension to SwiftUI. User journey: MyApp is launched and an item with an image is created. This item is stored in Core Data and its image is stored in a directory in the app's documents directory. A version of it is stored in NSUserDefaults in a shared app group. The user adds a Home Screen widget to show that item. Its data is pulled from the defaults, and the image is loaded from the document's directory. The user installs the Watch app and launches it. The Watch app looks inside the user defaults to retrieve the item. The iOS app sends the image to the Watch and the Watch app stores it locally (it's a small image, taking up barely a few Kb). This all works fine right now. Currently I have these targets: MyApp = main iOS app. MyApp WatchKit = Watch app storyboards and asset catalogs. MyApp WatchKit Extension = code to update the Watch interface. MyApp Widget = Home Screen widgets. MyApp IntentHandler = dynamic intents handler for the Home Screen widgets. Q1. Where do I put the code for the Lock Screen widgets? I figure these go into the My App Widget target because they're widgets and appear on the iPhone? In this video (https://developer.apple.com/videos/play/wwdc2022/10050) at 07:00 it tells you to duplicate the existing Widget target, change the bundle, change it to run on watchOS and embed it in your existing Watch App. As my original Watch App is written in Objective-C (MyApp WatchKit Extension, above) I can't/shouldn't do that, so... Q2. I think I have to create a new MyApp Watch App target, and perform the video steps on that target? I can create the views for that app, no problem. Most people update to the latest watchOS, and it's only now that watchOS 9 won't support Watch Series 3. Q3. Do I need to keep MyApp WatchKit and MyApp WatchKit Extension around? I can support older versions of watchOS if it helps my users, but they'll probably want to use the new version of watchOS, right? Can you install both versions of the app on your Watch (with watchOS 9), or does the new Swift app override the old WatchKit extension? Q4. Once I've designed the new Watch App's views in SwiftUI to replace the old WatchKit extension, where do I put the code for the complications that are being replaced? The WWDC 2022 videos (above, and a couple linked to on that page) have confused me a bit. Do I put complications views in the new MyApp Watch App target along with the other views that replace the old Watch app, or in MyApp Widget? Q5. The MyApp Widget target contains a bunch of code (WidgetUtils.swift) that populates the Home Screen widgets (and the new Lock Screen widgets), and it would fit right into the new MyApp Watch App target. Can I share that code between the two app targets just by adding WidgetUtils.swift to both target's membership? MyApp sends small images to the current MyApp WatchKit Extension. There's no code in the existing WidgetUtils.swift to handle file transfers because the images for the Home Screen widgets are pulled from the iOS app, so I need to write that in Swift for the new MyApp Watch App. The logic is already there in the old target, but I can't see any sort of equivalent to the WatchKit extension delegate where I currently handle the file transfers. Q6. Where does that go in MyApp Watch App? The existing MyApp WatchKit Extension occasionally asks MyApp for some new data. This is all done in the extension delegate which wakes up the iOS app and updates the NSUserDefaults which the extension then reads from. Q7. How do you do that in MyApp Watch App? Don't be afraid to be verbose in your responses. The more detail the better! Thank you in advance.
Replies
4
Boosts
0
Views
4.0k
Activity
Oct ’23
Widget URL on complication
Hi, Where can we detect the widget URL when a user press a complication for both ClockKit and SwiftUI?
Replies
1
Boosts
1
Views
1.5k
Activity
Jul ’23
Live Activity can't be updated by app running in background and playing audio
Hello, I've recently hit a roadblock when trying to integrate new Live Activities into my app. My app plays audio and the basic functionality of the Live Activity is to display some info whenever currently played track changes. It seems that even though my app has enabled background modes for playing audio updating live activity's content just doesn't do anything. No message is printed to console, no error is thrown and the documentation suggests that it should be possible without using BackgroundTasks. You can only start a Live Activity from your app while it’s in the foreground. However, you can update or end a Live Activity from your app while it runs in the background — for example, by using Background Tasks. from: https://developer.apple.com/documentation/activitykit/displaying-live-data-with-live-activities Using BackgroundTasks doesn't make sense for apps that need to display relevant information for ongoing tasks. I realize that this is probably to prevent apps from updating too often but there already is an option in Info.plist to allow frequent updates for Live Activities. We've all wanted a way to interact with users on lock screen for years but such limitation seriously prevents a lot of apps from doing something cool with the API. Please consider making the API less restrictive about when the activities can be updated.
Replies
0
Boosts
0
Views
1.8k
Activity
Feb ’23
Is it possible to disable Widget Accenting on the Lock Screen?
I'd like an Image subview of a lock screen widget to render as itself, and not with the multiply-like effect it gets today. I've tried .widgetAccentable(true) and .widgetAccentable(false), but none have the appearance I'm looking for. Is there maybe a new modifier that lets me "force" the rendering mode? Hoping there is and it's just not jumping out at me. Thanks for your help.
Replies
2
Boosts
3
Views
2.1k
Activity
Jan ’23
Lock Screen Widget Intent options not appearing
I have created lock screen widgets and followed the tutorial to include dynamic options in the Lock Screen widget just as the iOS 14 widgets but it is not appearing for the Lock Screen widgets. Is it a bug or am I missing out something?
Replies
2
Boosts
0
Views
2.2k
Activity
Nov ’22
iOS 16 Live Activities Lock Screen widget
Good morning, if I understood correctly, Live Activities will come on a later iOS 16 update and are not present on the current iOS 16 beta. I think that might explain the lack of documentation on the subject. What I'd like to understand is what could be the best path to take to make sure we're prepared to build a Lock Screen widget with Live Activities. Is a Home Screen widget a good starting point? Does anyone know? Can an Apple engineer shine some light into the topic? Thank you
Replies
16
Boosts
2
Views
25k
Activity
Nov ’22
Privacy redaction not working in iOS16 beta widget
I tried to use privacySensitive and redactionReasons to show different view in widget, but I notice that this is not working on iOS 16 beta (5~7) Below is my test code, if I use Xcode 13.4.1 with iOS 15 it works properly, in Lock Screen lock state it will display placeholder and "Privacy", but in iOS 16 not (in systemSmall widget). I'm trying use this privacy feature in new lockscreen widget (it doesn't work in new widget as well), does any one know how to fix this issue? struct WidgetEntryView : View {     var entry: Provider.Entry     @Environment(\.redactionReasons) var redactionReasons     var body: some View {         Text(entry.date, style: .time)             .privacySensitive()         if redactionReasons.contains(.privacy) {             Text("Privacy")         } else {             Text("Not Privacy")         }     } } Xcode : Xcode 14 beta 6 iOS: iOS 16 beta 7
Replies
5
Boosts
3
Views
2.1k
Activity
Oct ’22
Can't Load Image on Apple Watch Complications with New iOS 16 Widget
Image("sticker5")             .resizable()             .frame(width: 47, height: 47)             .scaledToFill() sticker5 is a picture with 94px * 94px. This is the size recommended by guideline. The Error is ComplicationsExtension[403:17806] [archiving] Widget archival failed due to image being too large [2] - (94, 94). We don't want to use low pixel images. That would look terrible. Please Help!
Replies
3
Boosts
1
Views
2.1k
Activity
Sep ’22
WidgetKit IntentHandler config tailored for each WidgetFamily type?
I've had a Widget available in an app that I publish since they first appeared in iOS14. They've used an intentDefinition file for 3 boolean switches to allow users to customise their appearance. Now with iOS16 I'm adding 2 lock screen widgets to this code. All done and it looks great. However the user configuration of these new widgets doesn't really fit the intent of the home screen Widgets. My question is how do I go about making the widget user configuration specific to each WidgetFamily type? I've had a look at the IntentHandler code and examples but it seems to be aimed more at dynamic enumerates or sub classed types. What is the correct way to achieve what I'm trying to attempt?
Replies
0
Boosts
0
Views
1.7k
Activity
Sep ’22
.timer Styled Text does not count up or down in Lock Screen Widgets
Hi, I have an interesting problem about Lock Screen Widget Complications. I prepared a widget which have .timer styled Text to display dynamic dates in my lock screen widget. It works fine in my iOS 16 (with Xcode beta - 6) simulator both debug and release modes. However the timer styled text is not counting up or down in my real device with debug mode, displays static time on screen. Also does not work testflight build of my widget development either. Do you have any idea about this issue?
Replies
3
Boosts
2
Views
1.7k
Activity
Sep ’22
Previews not supported for watchOS target Widget extension
I'm trying to add a watchOS app and watch widgets to an existing iOS project, similar to what's shown in wwdc2022-10050. The widget works fine when I select the iOS scheme, but when I switch over to the watchOS widget scheme, Xcode fails to generate a preview and gives this error. I'm not sure how to enable support for previews properly. UnsupportedProductTypeError: Previews not supported for WeatherNewWidget Watch Previews can be defined in applications, frameworks, Swift packages, or dynamic libraries productType = com.apple.product-type.extensionkit-extension buildable = WeatherNewWidget Watch.appex
Replies
1
Boosts
3
Views
1.4k
Activity
Sep ’22
watchOS 9 complications - where do they go?
I have an app with Home Screen widgets, and new Lock Screen widgets, and I'm trying to get my complications to work on the Watch. The widgets are running off dynamic intents, taking a list of items from user defaults and providing that list for the user to choose when they add a Home Screen or Lock Screen widget. This works fine. In the "Complications and widgets: Reloaded" video from WWDC2022 at about 7:00 the guy tells you to duplicate the widget extension, rename it, and set it to run on watchOS. I ended up with these targets: Main App (embeds Widget, Intents Handler and Watch App) Widget Intents Handler Watch App (embeds Complications) Complications (new, copy of Widget) At about 8:30 he adds the supported families for the Watch to his EmojiRangersWidget WidgetConfiguration, so it looks like the code for the accessory widgets is used for both Lock Screen widgets and complications? Should I be putting all my complications views in the Widget target, something like this? @main struct WidgetEntry: Widget { public var body: some WidgetConfiguration { IntentConfiguration(kind: kWidgetKind, intent: DynamicItemSelectionIntent.self, provider: Provider() ) { entry in WidgetEntryView(entry: entry) } .configurationDisplayName("abc") .description("def") #if os(watchOS) .supportedFamilies([.accessoryCircular, .accessoryInline, .accessoryRectangular, .accessoryCorner]) #else .supportedFamilies([.accessoryCircular, .accessoryInline, .accessoryRectangular, .systemSmall, .systemMedium]) #endif } } struct WidgetEntryView: View { var entry: Provider.Entry @Environment(\.widgetFamily) var family @ViewBuilder var body: some View { #if os(watchOS) switch family { case .accessoryCircular, .accessoryCorner, .accessoryInline, .accessoryRectangular: ComplicationView(item: entry.item) @unknown default: UnknownComplicationView(item: entry.item) } #else switch family { case .accessoryCircular, .accessoryInline, .accessoryRectangular: LockScreenWidgetView(item: entry.item) case .systemSmall: SmallWidgetView(item: entry.item) case .systemMedium, .systemLarge, .systemExtraLarge: MediumWidgetView(item: entry.item) @unknown default: UnknownWidgetView(item: entry.item) } #endif } } I've previously been told by an Apple engineer on these forums: "The complication code should be in the watch app target. That's where watchOS 7 and 8 will look for complications, and where watchOS 9 will look for old ClockKit complications for migration to their WidgetKit counterparts." I'm no longer supporting watchOS 7/8, but does this mean that watchOS 7/8 will look for old complications in there to migrate to the new stuff into the Widget target? I asked a couple of follow-up questions but they never got answered ¯\_(ツ)_/¯ Apple make this stuff so unnecessarily complex, even though their videos make it look so easy. How many times have we all paused their videos to see exactly what code they're writing and where they're putting it? There's practically zero help out there - these forums are full of questions and few answers. Xcode should have much better documentation and help to guide you through this. It takes so long to get anything done because there just isn't the information we need.
Replies
1
Boosts
0
Views
2.2k
Activity
Sep ’22
AccessoryCorner widgets with similar layout as the system calendar complication
When the system calendar complication is shown in the corner, it has the title of the upcoming event as the widget label and the time of the event as the main widget view. However the time of the event is not small and clipped to a circle like WidgetKit renders the complication but larger and curved together with the label. Is there a way to achieve the system corner complication layout with the WidgetKit complications?
Replies
1
Boosts
1
Views
1.2k
Activity
Sep ’22
iOS 16 - Live Activities fails to run, "subject type x does not conform to protocol ActivityAttributes"
When I try to build my widget extension, it crashes with the following error: failed to demangle witness for associated type 'Body' in conformance 'WidgetsExtension.PizzaDeliveryActivityWidget: Widget' from mangled name '1 ' - subject type x does not conform to protocol ActivityAttributes As you can notice I tried using apple's example code. Im using iOS 16 Beta 7 and Xcode 14 Beta 6.
Replies
0
Boosts
0
Views
1.4k
Activity
Aug ’22
Number of text and images in accessoryInline widget
Only one image and one Text will be displayed even if described as follows: HStack {   Text("1")   Image(systemName: "swift")   Text("2")   Image(systemName: "swift") } However, a similar layout is possible by describing it this way: Text("1 \(Image(systemName: "swift")) 2 \(Image(systemName: "swift"))") Is this behavior correct? Environment: Xcode 14 beta 5, iOS 16 beta 6
Replies
0
Boosts
0
Views
963
Activity
Aug ’22
iOS 16 beta 2 widget
There is a reference to the official website to create a custom lock screen widget, but the results cannot be searched and displayed. How can it be displayed normally?
Replies
5
Boosts
0
Views
1k
Activity
Aug ’22