Post

Replies

Boosts

Views

Activity

Access to HomeKit characteristics in Siri Extensions
In iOS 13 , I am unable to read or write the states of any HomeKit characteristics in a Siri Extension. I am able to create the HMHomeManager, and I receive the normal homeManagerDidUpdateHomes() callback that list all of my accessories normally, but interacting with them at all gives me an HMErrorCode 80, "Missing entitlement for API." This feature used to work in iOS 12, and is a disappointing loss of a feature, if it's by design. I understand the restrictions around why you shouldn't be able to do this while the app is in the background, since users' lights might start to turn on and off for now discernible reason, but this is very different from that. Siri Extensions are generally triggered by an explicit user action, and allowing this type of interaction for a few seconds (it used to be about 10 seconds) allows for some great user features to be added. FB6608447
1
0
627
Jun ’20
For HomeKit objects, under what circumstances will the `uniqueIdentifier` be different for a device, or change over time?
Most HomeKit objects (HMHome, HMService, HMCharacteristic, etc) have a uniqueIdentifier property that identifies it, however it appears that this value will be different on different devices, and that it can even change over time. I have three questions here: Is it possible to delineate the cases where we should expect it to be different or change Is it possible to make these id's more consistent? If not, can you recommend another means to identify a service or characteristic in a way that's more consistent over time? This causes several complications for 3rd party developers: My app uses Siri Shortcuts to flash a light, and stores the uniqueIdentifier in the Intent, however because this identifier is different on various devices, I can't share this shortcut with my wife, or even on my own iPad I have seen some cases where a shortcut has stopped working -- I believe it's because there are some circumstances where the values actually changes over time.
4
0
1.1k
Jun ’20
HomeKit and Siri Shortcuts integration
I would love to see more integration between HomeKit and Siri Shortcuts - a common request I get for my app, Home Flash for HomeKit, is to flash a light when motion is detected, or a button is pressed, but it's not possible today. I could envision this being implemented in one of two ways: Allow a scene to execute a Siri Intent, so an 'Intruder' scene could turn on my porch light, and trigger a Siri Intent either on my phone or Apple TV to flash my bedroom or office light. This is my preferred way, since as a 3rd party developer, I have the ability to create Scene's for my users. Add more flexibility to HomeKit Automations that are Converted to Shortcuts, so that I could direct my users in how to do this
9
2
14k
Jun ’20
Please allow 3rd party apps to create Scene's as 'Trigger Owned'
I have a few app ideas that revolve around helping users to create specific automations, but the API's that are currently available to 3rd party developers provide an awkward way to do this, because we cannot creates Scene's as 'Trigger Owned'. One of my favorite HomeKit apps - Wake Light (not my own app, and I did not consult the developer, but it's a great example of this) - creates a series of automations to turn on my light in the morning, and gradually increase the brightness. It works on any HomeKit compatible bulb, or even dimmer switch, and is great. However after setting up the automation, the Home app shows a series of new Scene's, all listed as 'Favorite' scenes, such as 'WL-01-00', 'WL-01-01', 'WL-01-02', etc. These are the scenes that are associated with new automations, and triggered every few minutes. I have two ways I could see this being resolved: Allow 3rd party developers to use the 'actionSetType' of HMActionSetTypeTriggerOwned - this would prevent the Scene's from being visible in the Home app at all, and (I believe) they would be cleanly removed if the automations are deleted. This would be my preferred way, as it cleanly solves the problem. Allow 3rd party developers to control whether a Scene is considered a 'Favorite' in the Home app, or turn this off as a default value for Scene's created from 3rd party apps.
2
0
1.1k
Jun ’20
HomeKit API enhancement request - provide a clean way to know whether a scene is 'active'
There is currently no way to easy way to tell whether an HMActionSet is 'active' without reading the individual characteristics - because each of these reads is an independent, asynchronous process, this check can be delayed, and it is often error prone. Adding a simple state to read and track this information, similar to the value of a characteristic, would simplify a significant burden. A callback notification to be alerted to changes in this state would also be outstanding.
3
0
852
Jun ’20
NavigationLink Clears my 'selection'
I am creating a Sidebar-style view for an iPad app, using the NavigationLink(destination:tag:selection:label) to control the detail view. Visually, everything appears to be working correctly, however a subtle issue exists when tapping an item to change the selection. The contents of my List are being processed twice, which is observed by putting a breakpoint at the first Text component in the code below - the first time through, my selectedHomeId value is populated correctly (and does load the HomeView correctly), however the second time through, the selectedSignalId is nil. This does not impact the HomeView, and the app is still usable, however it does clear out the SceneStorage that I'm attempting to configure, and it results in the HomeView not being able to respond to changes in my model. 		@SceneStorage("selectedHome") 		var selectedHomeId:String? 		var sidebarType = SidebarType.full 		var body: some View { 				List { 						if sidebarType == .full || sidebarType == .homes { 								Text("Homes") 										.font(.headline) 								ForEach(homeStore.homes) { home in 										NavigationLink(destination: HomeView(home: home), tag: home.id.description, selection: $selectedHomeId) { 												Label(home.name, systemImage: "house") 										} 								} 						} 				} 				.listStyle(SidebarListStyle()) 				.navigationTitle(sidebarType == .homes ? "Homes" : "Other") 				.navigationBarItems(trailing: SettingsButtonView()) 		} I've also filed a feedback for this (FB7845359) - if any other developers have experienced this, please file your own as well!
6
0
2.2k
Jul ’20
Cleaner HomeKit and SiriKit integration
Note - I have filed a Feedback for the following feature request, but I believe these features could be useful to other apps as well: FB8077889 I am the developer of Home Flash for HomeKit, designed to take advantage of the HomeKit lights in our homes for communication purposes - my app works great for calling the kids to dinner, but I'm currently exploring the accessibility uses, and finding the API support lacking in a few places. Consider the following: My example user is my father - in his 70's, and having difficulty hearing. He has had hearing aids for years, but the only place I have ever seen them are charging on the counter - I have never seen him use them. Additionally, he does not have his iPhone or iPad on him at all times (I know, I don't understand it either :) ) I would like to be able to use some strategically placed smart bulbs in his office and in the living room to be able to help communicate with him. I can do this today verbally using Siri, so my mother can say "Hey Siri, Get Dad", and have the lights pulse or flash -- setting this up can be done in the app, and my app can guide the user through it. The following two scenarios cannot be setup through the app, and in once can't be setup at all: Scenario 1: Flash a light when a text/email/call is received from a specific person - this would be useful to signal to him that one of his kids and/or friends is trying to communicate with him. NOTE: This CAN be done via the Shortcuts app in iOS 14, but with a huge caveat -- my dad needs to configure it himself, which he will NOT do. I could set this up for him myself, but I am hesitant to do so, because if he ever wants to adjust it or turn it off, he likely would not -- instead, I believe he would get frustrated, and just remove the light bulbs. FEATURE REQUEST #1 - provide an API similar to the HomeKit ActionSet API to be able to programmatically create Shortcut automations. Scenario 2: Trigger Siri Intents from HomeKit triggers. This would be ideal for signaling that someone is at the door, however it is currently not possible. I am aware that it's possible to program a shortcut to flash a light via the Shortcuts app, but my father doesn't even know the Shortcuts app exists, much less is he likely to figure this out. I understand in iOS 14 that the HomePod and Apple TV will be able to announce visitors at the door with an HSV-compliant doorbell, but my dad has neither of these products, nor is he interested in buying them (it would also raise the cost of such a solution significantly). FEATURE REQUEST #2 - allow a HomeKit trigger (Button Press, Accessory is Controlled or Sensor Detects Something) to trigger Siri Intents in 3rd party apps.
0
0
712
Jul ’20
@Published and willSet vs. didSet semantics
Typically, using @Published on a property, and then subscribing to the publisher that is created will give you willSet semantics - your subscriber will be notified with the new values before the variable has actually been set. I've observed that if my subscriber receives the notification on a different thread, such as RunLoop.main, the result is that I get didSet semantics - my subscriber is notified after the variable has been set. My question is this: how reliable is this? Can I expect this to be the case 100% of the time, or am I setting myself up for a race condition?
1
1
1.8k
Aug ’20
SwiftUI's SidebarListStyle breaks color in iOS 14.2 beta 2
When using the SidebarListStyle in iOS 14.2 beta 2, all color options are broken, and the view is presented entirely in black and white. This includes both accentColor and listItemTint. I made a very small sample project to prove this, and submitted it on https://feedbackassistant.apple.com/feedback/8775388 Simply removing the .listStyle modifier brings color back, but of course, it loses the styling struct ContentView: View {     var body: some View {         NavigationView {             List {                 Label(                     title: { Text("Should be the accent color") },                     icon: { Image(systemName: "gear") }                 )                 Label(                     title: { Text("Should be Red") },                     icon: { Image(systemName: "questionmark") }                 )                 .listItemTint(.red)             }             .listStyle(SidebarListStyle())         }     } }
2
0
1.4k
Oct ’20
NSPersistentCloudKitContainer and App Extensions
Can the behavior of NSPersistentCloudKitContainer be described in App Extensions? I have seen Forum entries that describe its behavior in Widgets - it will save data locally, but will not sync that data until the app is opened. This is a pretty major downsides for any apps that use SiriKit Extensions to allow for quick, simple data entry -- not syncing the data until the app is opened (which could be days later) would be a deal breaker. I hope this can be clearly described, and improved (if my understanding is correct) - I've filed a feedback to document this as well: FB9170155
0
0
848
Jun ’21
SwiftData and 'Circular references'
Using the 'Create SwiftData Code...' action in Xcode results in Model that have bi-directional relationships between many of my entities (which is correct - my Core Data model includes this). All of these Relationships are marked as invalid, however, with the following error: Circular reference resolving attached macro 'Relationship' Most ORM's, in my experience, have a way to mark one end of a bidirectional relationship as an 'owner'. Is there something similar available in SwiftData, or is this scenario handled in a different way? Or am I going to need to remove all of my bidirectional relationships?
9
2
5.5k
Jun ’23
FinanceKit not an SDK option in Feedback Assistant
I just had an awesome lab for FinanceKit, and I have a few pieces of feedback to file, but I don't find FinanceKit as an SDK option in Feedback Assistant. I first went into "Developer Technologies & SDKs", and then selected 'iOS' as the platform, but 'FinanceKit' is not in the list 🤷‍♂️ I can select 'Something else not on this list', but I don't want the feedback to get lost! Please help!
3
0
628
Jun ’24