Post

Replies

Boosts

Views

Activity

System Alert when using HMAccessorySetupRequest.performMatterEcosystemAccessorySetup
I'm trying to commission a matter device via HMAccessorySetupRequest.performMatterEcosystemAccessorySetup. After scanning the QR code via the system provided UI the app shows a system popup: Additional Setup Required This accessory required additional setup. Refer to the manufacturer's guide for more information Unfortunately there's no further information. Did anybody succeed in using this API and could assist?
0
0
1.1k
Aug ’22
Matter documentation help
I'm interested to learn more about this documentation: https://developer.apple.com/apple-home/matter/ It contains a bunch of information and also some statements I'm curious about. e.g. this one: Matter accessories can be managed in the Settings app Is the document referring to the iOS Settings app? I cannot find Matter accessories in the Settings App. I'd also like to learn more about the APIs (which and how to use) this document is telling about. Is anybody able to help?
0
1
962
Mar ’23
How to observe SwiftData DB changes
How can one observe changes in the SwiftData DB? I'm aware that this is possible via Queries, but I need to fetch the data in background, so a query is not an option. I'm aware of the ModelContext.didSave / .willSave notifications, but these don't work with iOS 17. -> How can I observe changes to models of a certain type? I don't want to observe the whole database.
0
3
866
Aug ’24
Segmentation fault 11 when implementing WKScriptMessageHandlerWithReply
Hi, I'm trying to implement the async handler of WKScriptMessageHandlerWithReply -> see yellow box in this reference. This is the method signature: func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) async -> (Any?, String?) But I end up with a Segmentation fault: 11 compilation error. I'm compiling with Xcode 13.4.1 (13F100). Did anybody successfully use this API or now a solution to fix it?
1
0
1.4k
Oct ’22
Matter API names (renamed)
Hi, The WWDC2021 Video Add support for Matter in your smart home app has a bunch of code examples referencing APIs that are no longer present or deprecated, e.g. this one. Unfortunately the documentation doesn't give any hint on the replacement APIs. Most of them are to be found in HMMatter* objects. But in the video at 14:27 an API for CHIPDeviceController is shown. Unfortunately that one cannot be found anymore. Does anybody know how to achieve the described task (managing state and control of a matter accessory)
1
0
2.3k
Aug ’22
Usage of `NavigationLink` and `.navigationDestination` causing console error logs
I'm using NavigationLink(value:label:) and .navigationDestination(for:destination:) in my SwiftUI watchOS app. However navigating in the app causes the system to emit the following errors to the console: <NavigationHostingControllerCache>: MISS at depth 1 in free stack [NavigationHostingControllerCache_UIKit] <_TtGC7SwiftUI32NavigationStackHostingControllerVS_7AnyView_: 0x125015000> containment skipped because sourceNavigationController or destination were nil or sourceNavigationController was equal to destination [NavigationHostingControllerCache_UIKit] Eject called for index: depth 1 in free stack Library: SwiftUI, Subsystem: com.apple.SwiftUI , Category: Invalid Configuration The navigation itself does work fine. I'm wondering there's something I can do to fix it or if this is an internal issue of the SwiftUI framework and cannot be addressed by me? (i.e. I can ignore this)
1
1
1.3k
Apr ’24
Several SwiftUI Stepper on watchOS
I'm showing several Steppers in a SwiftUI view on watchOS. When the user taps the steppers & turns the digital crown it's possible to select multiple of the steppers (green "focus" border) appears. I've tried to make the steppers mutually exclusive by using the following snippet, but it didn't work. `@FocusState private var value: StepperType?` [...] var body: some View { Form { ForEach(StepperType.allCases, id: \.self) { stepperCase in Stepper... .focused($value, equals: stepperCase) } } } Any ideas how I can prevent multiple Steppers from being "focused" by the crown at the same time?
1
0
830
Jul ’24
How to use generated symbols from string catalogs in SPM packages
In WWDC25 Video "Explore localization with Xcode" they show how to use generated symbols from string catalogs. This is a great feature and I'd like to use it. However most of my code is split across smaller SPM packages. In the video they say at 19:20: Finally, generated symbols help you avoid boilerplate code in frameworks and packages. I've been able to use the refactoring tool to convert strings from my catalog to use generated symbols. Afterwards the code doesn't compile anymore: Type 'LocalizedStringResource' has no member '' Unfortunately the video only showcases this for frameworks but not for packages. Since they clearly speak about packages I'd like to learn how to use the feature for my packages.
1
0
93
Jun ’25
Get Crash Reports for watchOS Apps
I hope I'm wrong on this one, but as far as I understand watchOS is not able to collect/ capture Mach Exceptions and Signals. Which is the majority of crashes happening on watchOS. I'm looking for a proper way to automatically receive crash reports from a watchOS app. If this truly is a system limitation there's no way any tool can workaround it. Does anyone know of a workaround or tool to automatically collect crashes on watchOS? (I'm aware that it's possible to do so manually)
2
0
1k
Jun ’24
Lock screen media controls for MusicKit/ ApplicationMusicPlayer
Hi, when using ApplicationMusicPlayer from MusicKit my app automatically gets the media controls on the lock screen: Play/ Pause, Skip Buttons, Playback Position etc. I would like to customize these. Tried a bunch of things, e.g. using MPRemoteCommandCenter. So far I haven't had any success. Does anyone know how I can customize the media controls of ApplicationMusicPlayer. Thank you.
2
0
481
Sep ’25