I am seeing the same problem in a Watch-only test app. I have two test projects. One is a watch only app, with no iOS app. In this app, I've placed the NSHomeKitUsageDescription in the info.plist file of the Watch App Extension. The message from it shows in the authorization alert. Once the authorization is given, the app cannot find any HomeKit homes. homeManagerDidUpdateHomes receives an empty array for homes. I always see the
[HomeManager] Received empty response from sync
in the debug console.
The other project is an iOS + Watch app, and there are no differences in the watch app code. The only difference is that the NSHomeKitUsageDescription is in the info.plist in the iOS app, and the initial authorization is given in the iOS app. From that point on, the Watch app forks fine, and can detect homes no problem, even when the phone is turned off, and the watch is on its on, on WiFi. In this test project, I have the "Support Running Without iOS App Installation" checked.
Unless I'm missing something simple, this looks like a pretty big problem in WatchKit, and I should file a bug report for it, and submit these two test projects. It unfortunately makes it impossible for me to make a simple watch-only HomeKit app that I was planning.
Post
Replies
Boosts
Views
Activity
They probably fixed it in watchOS7, so hopefully it will be fixed in the next 6.2.x update also. This is almost for sure a problem in watchOS 6 and it only affects Watch-only apps. I have experienced the exact same problem you were seeing with my watch-only app, and the problem is gone as long as you have the iOS app as well, and the HomeKit authorization is performed in it.
The problem unfortunately persists in watchOS 6.2.8
I am seeing the same exact problem that Johnno described, and it started happening again with watchOS 9. Same problem was happening before with various watchOS releases, but it was recently fixed at one point in watchOS 8 cycle. I'm seeing the same problem where the GKLocalPlayer.local.isAuthenticated is always false in my game, and every other game on the watch I have that has a leaderboard feature is reporting some error with Game Center now, and can't access leaderboards anymore.
@waldgeist I'm guessing you eventually had to get an Apple Silicon Mac to continue developing for visionOS, right? I think the simulator only worked in beta XCode, but in the final 15.2 which must be used for app submissions, I don't think there's a way to get it working on an Intel Mac, no matter what OS you're using.
I'm considering doing some simpler visionOS development on Ventura / Xcode 15 beta 2 on an Intel Mac, and then maybe publishing it later on friend's AS Mac. Wonder if that's still possible?
I'm considering doing some light visionOS development on a Ventura / Xcode 15 beta 2 on an Intel Mac, and then maybe publishing it to App Store later on friend's AS Mac. Wonder if this approach would be at all possible? I can't justify buying a new computer just for this. Really a shame they just dropped support like that, as it seemed it would work fine on Intel Macs.
There seems to be no way to put the title back into top-left corner when compiling with watchOS 10SDK. It's a shame because it really eats away the space on non-scrolling fixed layout screens. I believe they moved the title to where it is now because in watchOS 10 you can (in SwiftUI only) have a layout that has a button in the top-left corner.
If you are still looking to a solution to this problem - or for anyone else who needs CLKComplications for watchOS 7 and 8 and to also have WidgetKit complications for watchOS9+ in the same app, the key to getting CLKComplications working on a single target watch app is to implement the getComplicationDescriptors(handler:) method in your ComplicationController class. In this method you need to specify the complications your app supports. If you don't do this, the complications won't show up at all, even if you specified supported complication families in the info.plist file. In fact, you need to delete the CLKComplicationSupportedFamilies key from the info.plist once you implement the new method in the ComplicationController class.
Note that if you are adding WidgetKit support for complications into an older app, you will want to migrate your two-part app into a single target, which means that a minimum target will be watchOS 7 (which will bring with it this CLKComplications problem). If you don't migrate to a single target app, the WidgetKit complications will not update reliably at all.