更新时间:2024-03-04 08:40:00
常见问题与反馈 UI 业务包提供承载 用户问题与反馈 的 iOS 容器,为您的 App 提供问题排查与反馈渠道。
在工程的 Podfile
文件中添加常见问题与反馈业务包组件,并执行 pod update
命令:
source "https://github.com/tuya/tuya-pod-specs"
source 'https://cdn.cocoapods.org/'
platform :ios, '11.0'
target 'your_target_name' do
# 添加常见问题与反馈业务包
pod 'ThingSmartHelpCenterBizBundle'
end
跳转到常见问题与反馈页面
常见问题与反馈业务包实现 ThingHelpCenterProtocol
和 ThingFeedBackProtocol
协议以提供服务。在 ThingModuleServices
组件中查看 ThingHelpCenterProtocol.h
协议文件内容为:
@protocol ThingHelpCenterProtocol <NSObject>
@optional
/**
* 跳转到常见问题与反馈页面
**/
- (void)gotoHelpCenter;
@end
跳转解绑工单
针对已配网成功的强绑定类型设备,通过手动重置设备去配网会报失败。需要先通过工单申请解绑成功,才能重新配网成功。ThingFeedBackProtocol
提供强绑定设备解绑工单入口,在 ThingModuleServices
组件中查看 ThingHelpCenterProtocol.h
协议文件内容为:
@protocol ThingFeedBackProtocol <NSObject>
@optional
/**
* Navigate to feedback page
*@param hdType Type of feedback
*@param hdId device ID
*@param uuid uuid
*@param region Area code
*@param need Whether to refresh the feedback list page
*@discussion hdType = 8 indicates an unbundled page
**/
- (void)gotFeedBackViewControllerWithHdType:(NSInteger)hdType deviceName:(NSString *)deviceName hdId:(NSString *)hdId uuid:(NSString *)uuid region:(NSString *)region withoutRefresh:(BOOL)need;
@end
无。
Objective-C 示例
#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()
Objective-C 示例
#import <ThingSmartBizCore/ThingSmartBizCore.h>
#import <ThingModuleServices/ThingFeedBackProtocol.h>
id<ThingFeedBackProtocol> impl = [[ThingSmartBizCore sharedInstance] serviceOfProtocol:@protocol(ThingFeedBackProtocol)];
[impl gotFeedBackViewControllerWithHdType:8 deviceName:name hdId:devId uuid:uuid region:@"" withoutRefresh:YES];
Swift 示例
let impl = ThingSmartBizCore.sharedInstance().service(of:ThingFeedBackProtocol.self) as? ThingFeedBackProtocol
impl?.gotFeedBackViewController?(withHdType: 8, deviceName: "", hdId: "", uuid: "", region: "", withoutRefresh: true)
该内容对您有帮助吗?
是意见反馈该内容对您有帮助吗?
是意见反馈