Post

Replies

Boosts

Views

Activity

HMHomeManagerDelegate calling while app is in foreground
As per the Apple documentation of HMHomeManagerDelegate, this protocol will give you the action which are performed outside of the app. When creating or removing the Home inside our app, this protocol’s delegate method shall not call. But in some cases, below delegate methods are called even when the creation operation performed within the application which should not happen. So after “didAdd” delegate method calls HomeManager home has two home with same name. And may be because of that, application getting the home remove event through “didRemove” delegate method. optional func homeManager(_ manager: HMHomeManager, didAdd home: HMHome) optional func homeManager(_ manager: HMHomeManager, didRemove home: HMHome) So, can anyone please help that in what case the delegate method called while creating home inside application?
0
0
443
Sep ’21
iOS 15 Beta 5(19A5318f) Accessory setup gives domain error
I am trying to add accessory in specific room with below method and payload         guard let payload = HMAccessorySetupPayload(url: url) else {         print(“HomeKitService > Unable to create HMAccessorySetupPayload from URL > \(String(describing: url))")         return       } It was working fine with previous iOS 15 beta releases and previous iOS versions but now the same code gives the payload error Failed to create HMSetupAccessoryPayload from setup payload URL <REDIRECT_TO_HOMEKIT_URL> : Error Domain=HMErrorDomain Code=3 "(null)"
0
0
970
Aug ’21
Xcode 13 beta | Failed to build module 'Network' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
I have a project which has iOS 10.0 deployment target in which I import Network framework in some class and conditionally using it depending on the host app’s iOS version.   With Xcode 13 beta 4(13A5201i), I am able to compile and run the project successfully while debugging on iPhone device but it gives below error. This was working fine with Xcode 12.5.1 /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/lib/swift/Network.swiftmodule/armv7-apple-ios.swiftinterface:1254:19: 'NWConnection' is only available in iOS 12.0 or newer /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk/usr/lib/swift/Network.swiftmodule/armv7-apple-ios.swiftinterface:1254:1: Add @available attribute to enclosing extension /Application/NWBrowserManager.swift:10:8: Failed to build module 'Network' for importation due to the errors above; the textual interface may be broken by project issues or a compiler bug
12
0
10k
Aug ’21
iOS-13 has issue with HomeKit accessory name
Our application has two types of devices and both have the HomeKit integration but after HomeKit application we are doing Wifi provisioning with two different methods. Before iOS-13, all are working good but in iOS-13 there is some issue with the accessory name.In iOS-12, the accessory name is constant so we are comparing that to the different framework like ExternalAccessory and NetService name and everything was working fine.Basic workflow:Step 1. Add the device in Apple HomeKit applicationStep 2. Open our app and get all the accessoriesfor home in homeManager.homes { for accessory in home.accessories { //Some logic } }Step 3. Filter for our accessories onlyStep 4. Select accessory for Wifi provisioningStep 5. Start EAWiFiUnconfiguredAccessoryBrowser to get the accessory listStep 6. Get the accessories in delegate methodfunc accessoryBrowser(_ browser: EAWiFiUnconfiguredAccessoryBrowser, didFindUnconfiguredAccessories accessories: Set)Here, in EAWiFiUnconfiguredAccessoryBrowser delegate, the accessory name is different compare to HMAccessory so its not possible to get the same device from HomeKit list and do Wifi Provisioning.In iOS-12, the accessory has the unique name so we can compare that with EAWiFiUnconfiguredAccessory but in iOS-13, for all the devices it shows “Smoke Detector” or “Smoke Alarm”.The same problem we are having with the different device which uses the NetServiceBrowser for the wifi-provisioning.func netServiceBrowser(_ browser: NetServiceBrowser, didFind service: NetService, moreComing: Bool)Here also, NetService object gives the same name as EAWiFiUnconfiguredAccessory which is different from the HMAccessory object so it can not be compared. Also, there aren’t any other key/object which is same so there is no way that we can compare the HomeKit accessory with Wifi-Provisioning accessories.
0
0
509
Sep ’19