Third-party WidgetKit complications on watchOS 11 beta 5 are not appearing in the list of available complications. They have also disappeared from watch faces where they were installed. The exact same complications were working fine on earlier betas. This is happening on device, but not in simulator.
This issue may be related to FB14684253, which was fixed with the release of Xcode beta 5. However, Xcode beta 5 does not fix the issue on Apple Watch.
As a sanity check, I also tried with the Backyard Birds sample project, and the complications for that app aren't appearing on device either.
Filed as FB14689021.
Post
Replies
Boosts
Views
Activity
My app’s WidgetKit widgets are all crashing on iOS 18 beta 5. They were working just fine on earlier betas. This is happening across both Home and Lock Screen widgets. It's an EXC_BAD_ACCESS crash that seems to be happening deep within WidgetKit.
I've seen other developers posting about this on social media, so it's not just me. Wanted to get this flagged ASAP as it's very late in the beta cycle now...
Filed as FB14684253.
Has anyone been able to create a Control Center widget that opens a snippet view? There are stock Control Center widgets that do this, but I haven't been able to get it to work.
Here's what I tried:
struct SnippetButton: ControlWidget {
var body: some ControlWidgetConfiguration {
StaticControlConfiguration(
kind: "***.***.snippetWidget"
) {
ControlWidgetButton(action: SnippetIntent()) {
Label("Show Snippet", systemImage: "map.fill")
}
}
.displayName(LocalizedStringResource("Show Snippet"))
.description("Show a snippet.")
}
}
struct SnippetIntent: ControlConfigurationIntent {
static var title: LocalizedStringResource = "Show a snippet"
static var description = IntentDescription("Show a snippet with some text.")
@MainActor
func perform() async throws -> some IntentResult & ProvidesDialog & ShowsSnippetView {
return .result(dialog: IntentDialog("Hello!"), view: SnippetView())
}
}
struct SnippetView: View {
var body: some View {
Text("Hello!")
}
}
In visionOS beta 6, the height of the text field in the UISearchBar was dramatically increased without changing the corner radius to match, so now my search bar looks a bit weird when it's placed near the corner of the app window (which has a very large corner radius). I would prefer a pill shape (i.e. completely rounded corners) for the UISearchBar's textfield if it's going to be that tall.
Is there a way to change the corner radius of UISearchBar's text field on visionOS? The method that works on iOS doesn't appear to work on visionOS, I assume because of the inset appearance.
In the Settings app on visionOS, the slider used in the Display > Text Size screen has buttons arrayed along the track so that you can quickly jump the slider to different text sizes without having to slide the selector manually. Is this a completely custom component, or is there a way to make UISlider behave in a similar way in our own apps?
For the past several months, I have not been getting any crash logs for the Apple Watch (or any other extension, for that matter) in the Organizer in Xcode.
Has anyone else experienced this? Is there some setting specific to extensions that I need to toggle to ensure crash reports get sent to Xcode? Like turning off bitcode or something like that?
Some of my users are getting "blank" responses from WeatherKit's REST API. The server is returning a 200 response, but the data returned is just a "{}" string. This issue only affects specific users - when I try the same request myself, with the exact same location and query parameters, I get the data back just fine.
Has anyone else experienced an issue like this?
The new SF Symbols palette color feature was working perfectly for me in beta 4, but as soon as I installed beta 5 all my symbols started rendering in a single color. After some debugging, I realized that this is only happening when the image is created via drawRect.
Hopefully this is just a minor bug that will be fixed in the next beta, as I just spent an entire week moving everything over to custom symbols (and I have to render them via drawRect)...
My project has auto-generated Swift code for Intents in my "ProjectName-Swift.h" file. In Xcode 12, this file had zero warnings, but in Xcode 13 it is filled with thousands of warnings.
About half of them are Block pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) - the other half are Multiple declarations of method 'handleIntent:completion:' found and ignored.
I have tried cleaning my project and deleting the Derived Data folder so far, but still getting the same errors.
Since these are auto-generated files, I can't go in and fix the errors myself. Has anyone else seen this on the Xcode 13 beta? Or have any idea how to fix it?
I’m trying to get background URL sessions working to keep my complications up to date. The docs and session videos from this year state that I should get ~4 background network updates per hour if I have my complication active, but it is taking up to 1.5 hours to get just one background URL session to return on watchOS 7 beta 4.
I’m using the sample code from this year’s WWDC session on keeping complications up to date.
I am scheduling the URL session to begin after 15 minutes. I have a complication active on the watch. The watch has plenty of battery and is connected to wifi. I’m completing all URL background refresh tasks within 15 secs.
Important Note*
I do get a URLSessionRefreshBackgroundTask around the time of the earliest begin date, but it just calls willBeginDelayedRequest then urlSessionDidFinishEvents - the download itself doesn’t happen for another hour. (I call setTaskCompleted once urlSessionDidFinishEvents is called, as the session video recommends.)
Is anyone else experiencing long delays between when a scheduled download is supposed to begin and when the app is actually woken up?
I've filed this as FB8386427 in case any engineers happen to see this.
The "Add Configuration and Intelligence to Your Widgets" talk from WWDC20 says that you can make a class that conforms to the Intent handler protocol in either your app or an Intents extension (around the 10:48 mark in video).
I know how to add an intent handler with an Intents extension, but how do you do it *without* one?
I assume I have to add something to the WidgetKit extension's plist so that it knows it's supposed to be registered as handler for the intent, but I can't find anything about this anywhere.
Has anyone experienced their widget getting "stuck" frequently?
The widget I am developing often stops updating after a while. The widget fails to wake and call the timeline method after the reload date passes (no matter how long I wait) and also fails to update when the update method is called from the parent app. It appears as if the widget has just completely stopped responding.
If I add another copy of the widget to the Home Screen, that one will update just fine for a while - but the old one stays the same and doesn’t update along with the new one.
(Note that this only happens on an actual device. On the simulator, the widgets continue to update flawlessly.)
I’ve also experienced issues with the widget never updating its view after it’s been added to the Home Screen. The timeline method gets called, but the widget never updates its appearance on screen.
And finally, I often see this issue happen during debugging - I’ll run the app using the WidgetKit scheme, add the widget to the Home Screen, and everything works fine - but when I run it again, the widget appears to get “stuck” and won’t start working again until I remove the widget and add it back again or restart the entire device.
I don't see any crash logs or messages in the debugger indicating I've used up too much processing time or something like that, so I'm a bit puzzled as to why this is happening and what I can do to fix it. Hopefully it's just a beta bug that will be resolved in future seeds.
Filed as FB8210627.