IMSThingDiscoveryRegistry Class Reference
| Inherits from | NSObject | 
|---|---|
| Declared in | IMSDiscoveryRegistry.h | 
– startDiscoveryWithFilter:didFoundBlock:
	搜寻设备,且根据 filter 里的内容对设备进行过滤
- (void)startDiscoveryWithFilter:(NSDictionary *)filter didFoundBlock:(ThingSdkArrayResultBlock)didFoundBlockParameters
| filter | 过滤器,KV对. 如下所示 可以过滤 设备类型,如 :{“deviceType”:[“wifi”, “breeze”, “third”, “cloudlca”]}, 其中 “wifi”, “breeze”, “third” 分别对应 IMSLocalDeviceType 枚举中的值 也可以过滤 productKey,形如 {“productKey”:“pkxxxx”}. 说明:productKey跟deviceType是互斥的。二者只能出现一个。 对于智能人居的开发者,filter中还需要携带房间号 “groupId”:“xxxx”, 对于cloudlca设备,如果需要按网关过滤,可以在filter中增加K-V对,"gatewayIotId":“xxxx"。表示过滤某一个边缘网关发现的lca设备列表 过滤器根据实际需要来设置 | 
|---|---|
| didFoundBlock | 发现设备的回调,参见  | 
Discussion
搜寻设备,且根据 filter 里的内容对设备进行过滤
Declared In
IMSDiscoveryRegistry.h
– stopDiscovery:
	中止设备发现过程
- (void)stopDiscovery:(ThingSdkBooleanResultBlock __nullable)completeHandlerParameters
| completeHandler | 结束时的回调 | 
|---|
Discussion
中止设备发现过程
Declared In
IMSDiscoveryRegistry.h