What is UI BizBundle SDK for iOS?

Last Updated on : 2022-03-03 06:50:01download

Tuya UI BizBundle for iOS is a vertical service bundle that encompasses logic modules and UI pages. It enables efficient access to comprehensive service modules provided by Tuya and accelerates your development based on Tuya Smart Residence App SDK.

Overview

A bunch of BizBundles are supported, including:

  • Device Pairing UI BizBundle
  • Device Control UI BizBundle
  • Device Details UI BizBundle
  • Group Management UI BizBundle

Architecture

Tuya UI BizBundles for iOS can be integrated as services. All features are provided based on protocols.

What is UI BizBundle SDK for iOS?

Protocols can be used to get services or implement services.

Get services

A BizBundle provides BizCore with a service protocol. Thus, you can call a specific service method to implement the service.

The BizBundle implements the service protocol.
Get the instance to implement the service protocol.
Protocol
+doSomeThing()
BizBundle
BizCore
+serviceOfProtocol() : id<Protocol>
YourClass
+id<Protocol> serviceImpl

Implement services

Certain service protocols of BizBundles are not implemented by default. For example, the Panel Multilingual BizBundle depends on the device pairing service in specific conditions. If the Device Pairing UI BizBundle is not integrated, this service protocol is not implemented. In this case, you can create a class to implement the required service protocol and register it to BizCore to improve the features of the BizBundle.

Implement the service protocol.
Register your service implementation class or instance.
Protocol
+doSomeThing()
YourClass
+doSomeThing()
BizCore
+registerService(Protocol, Instance)
+registerService(Protocol, Class)
+registerRouteWithHandler(Block)
BizBundle