FAQ UI BizBundle

Last Updated on : 2023-07-13 07:14:39download

FAQ UI BizBundle provides the iOS container that hosts the FAQ and feedback service to implement troubleshooting and feedback for your apps.

Integrate with the UI BizBundle

Add the components of the FAQ UI BizBundle to the Podfile and run the command pod update.

source "https://github.com/tuya/tuya-private-specs"
source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'

target 'your_target_name' do
  # Adds the UI BizBundle.
  pod 'ThingSmartHelpCenterBizBundle'
end

Service protocols

Provide services

The UI BizBundle relies on the implementation of the protocol ThingHelpCenterProtocol to provide services. You can view the file ThingPanelProtocol.h in the component ThingModuleServices.

@protocol ThingHelpCenterProtocol <NSObject>

@optional

/**
 * Navigates to the FAQ and feedback page.
 **/
- (void)gotoHelpCenter;

@end

Depend on services

None.

Usage instruction

Things to note

  • Before the call of any API method, make sure that the user has logged in to the app.
  • If the user status is changed, you must check the availability of the FAQ UI BizBundle to reload the FAQ and feedback page.

Navigate to the FAQ and feedback page

ObjC:

#import <ThingSmartBizCore/ThingSmartBizCore.h>
#import <ThingModuleServices/ThingHelpCenterProtocol.h>

id<ThingHelpCenterProtocol> impl = [[ThingSmartBizCore sharedInstance] serviceOfProtocol:@protocol(ThingHelpCenterProtocol)];

[impl gotoHelpCenter];

Swift:

let impl = ThingSmartBizCore.sharedInstance().service(of: ThingHelpCenterProtocol.self) as? ThingHelpCenterProtocol

impl?.gotoHelpCenter()