English
English
简体中文
Contact Us
Register
Log In
layoutIndex

FAQ UI BizBundle

Last Updated on : 2022-09-16 09:16:45download

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-pod-specs"
source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'

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

Service protocols

Provide services

The UI BizBundle relies on the implementation of the protocol TYHelpCenterProtocol to provide services. You can view the file TYPanelProtocol.h in the component TYModuleServices.

@protocol TYHelpCenterProtocol <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 <TuyaSmartBizCore/TuyaSmartBizCore.h>
#import <TYModuleServices/TYHelpCenterProtocol.h>

id<TYHelpCenterProtocol> impl = [[TuyaSmartBizCore sharedInstance] serviceOfProtocol:@protocol(TYHelpCenterProtocol)];

[impl gotoHelpCenter];

Swift:

let impl = TuyaSmartBizCore.sharedInstance().service(of: TYHelpCenterProtocol.self) as? TYHelpCenterProtocol

impl?.gotoHelpCenter()