BBASMGuideAdapterProtocol.h
3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
//
// BBASMGuideAdapterProtocol.h
// BBAMNP
//
// Created by baidu on 2019/5/6.
// Copyright © 2019 Baidu. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "BBASMAdapterBaseImplement.h"
NS_ASSUME_NONNULL_BEGIN
#define BBASM_CONFIRM_BACK_CONTENT_KEY(appId) [NSString stringWithFormat:@"%@_confirmCloseContent", appId]
/**
* private(手百私有方法): 小程序引导弹窗协议
*/
@protocol BBASMGuideAdapterProtocol <NSObject>
@optional
/// 收藏引导弹窗
/// @param block 点击“我知道了”回调
+ (void)showFollowComeBackGuideView:(void(^)(BOOL isTipsSelect))block;
/**
* @brief 添加关注功能鉴权失败引导弹窗
*
* @param block 点击“我知道了”回调
*/
+ (void)showAddFavorAuthorizeFailGuideView:(void(^)(void))block;
/**
* @brief 关闭小程序引导弹窗
*
* @param block 点击“我知道了”回调
*/
+ (void)showExitSmartWidgetComeBackGuideView:(void(^)(BOOL isTipsSelect))block;
/**
* @brief 关闭小游戏引导弹窗
*
* @param block 点击“我知道了”回调
*/
+ (void)showExitMarioWidgetComeBackGuideView:(void(^)(BOOL isTipsSelect))block;
/**
* @brief 关闭小程序/小游戏个性化引导弹窗
*
* @param block 点击“我知道了”回调
* @param appid appid
*/
+ (void)showExitCustomComeBackGuideView:(NSString *)appid completion:(void(^)(BOOL isTipsSelect))block;
/**
* @brief 能否展示关闭小程序引导弹窗
*/
+ (BOOL)shouldShowExitSmartWidgetComeBackGuideView;
/**
* @brief 能否展示关闭小游戏引导弹窗
*/
+ (BOOL)shouldShowExitMarioWidgetComeBackGuideView;
/**
* @brief 能否展示个性化引导弹窗
*
* @param appid 小程序或小游戏ID
*/
+ (BOOL)shouldShowCustomComeBackGuideView:(NSString *)appid;
/**
* @brief 获取关闭小程序引导弹窗图片URL
*/
+ (NSString *)getSmartWidgetComeBackGuideViewImageURL;
/**
* @brief 获取关闭小游戏引导弹窗图片URL
*/
+ (NSString *)getMarioWidgetComeBackGuideViewImageURL;
/**
* @brief 获取个性化引导弹窗图片资源(返回图片url或Lottie物料资源id)
*
* @param appid 小程序或小游戏ID
*/
+ (NSString *)getCustomComeBackGuideViewImageResource:(NSString *)appid;
/// img资源是否是Lottie资源
/// @param imgResource img资源
+ (BOOL)isLottieResource:(NSString *)imgResource;
/// 下载个性化引导弹窗Lottie资源
/// @param lottiePackageId lottie资源包id
+ (void)downloadCustomBackGuideViewLottieResource:(NSString *)lottiePackageId;
/// 查询个性化引导弹窗Lottie资源下载状态
/// @param lottiePackageId lottie资源包id
/// @param complete 查询结果回调 storePath:最新Lottie资源路径
+ (void)queryCustomBackGuideViewLottieResource:(NSString *)lottiePackageId
complete:(void (^)(NSString * _Nullable storePath))complete;
/**
* @brief 获得点击关闭时是否展示挽留alert的标记位以及用于展示的字符串
*
* @param flag 展示alert的标记位
* @param appId 指定的appId
* @return 用于展示的字符串
*/
+ (nullable NSString *)getConfirmCloseFlag:(nonnull BOOL *)flag
appId:(nullable NSString *)appId;
/**
* @brief 重置点击关闭时是否展示挽留alert的标记位
*
* @param appId 指定的appId
*/
+ (void)resetConfirmCloseFlagWithAppId:(nullable NSString *)appId;
/**
* @brief 小游戏关闭时是否展示推荐游戏列表,当前逻辑:当日一台设备只展示一次
*/
+ (BOOL)shouldShowCloseRecommendGameView;
/**
* @brief 更新关闭推荐展示的时间
*/
+ (void)updateCloseRecommendViewShowTime;
/**
* @brief 开启push引导弹窗
* @param desc 弹窗文字
* @param block 弹框消失回调 isShow:是否展示弹窗 settingAction:用户操作行为 YES = 去设置, NO = 关闭
*/
+ (void)showPushGuideViewWithDesc:(NSString *)desc completion:(void(^)(BOOL isShow, BOOL settingAction))block;
@end
NS_ASSUME_NONNULL_END