BBASMNotificationDef.h
5.61 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
//
// BBASMNotificationDef.h
// SWAN
//
// Created by baidu on 2018/11/1.
// Copyright © 2018 baidu. All rights reserved.
//
#import <Foundation/Foundation.h>
#ifndef BBASMNotificationDef_h
#define BBASMNotificationDef_h
#pragma mark - OS notification
// 小程序OS生命周期通知(OS入口通知BBASMWorkBoxManager、BBASMApp、其他)
#define BBASMC_OSWillForegroundNotification @"UIApplicationWillEnterForegroundNotification"
#define BBASMC_OSForegroundNotification @"UIApplicationDidBecomeActiveNotification"
#define BBASMC_OSBackgroundNotification @"UIApplicationDidEnterBackgroundNotification"
#define BBASMC_OSResignActiveNotification @"UIApplicationWillResignActiveNotification"
#define BBASMC_OSMemoryWarningNotification @"UIApplicationDidReceiveMemoryWarningNotification"
// 对用户截屏事件进行观察
#define BBASMC_OSUserScreenshotNotification @"UIApplicationUserDidTakeScreenshotNotification"
#pragma mark - BBASMWorkBoxManager notification
// 小程序重加载:不走launch协议(PageStack通知BBASMWorkBoxManager)
#define BBASMC_AppReloadNotification @"UIApplicationReloadNotification"
// 小程序加载失败(BBASMApp通知BBASMWorkBoxManager)
#define BBASMC_AppLoadErrorNotification @"UIApplicationLoadErrorNotification"
// 小程序加载完成(BBASMApp通知BBASMWorkBoxManager)
#define BBASMC_AppLoadFinishedNotification @"UIApplicationLoadFinishedNotification"
// 当前小程序退场激活所有小程序在BBASMAppStatusBackground状态时(BBASMApp通知BBASMWorkBoxManager)
#define BBASMC_AppBackgroundNotification @"UIApplicationBackgroundNotification"
// 清除不活动的BBASMApp(其他入口通知BBASMWorkBoxManager)
#define BBASMC_AppRemoveNoActiveAppNotification BBASM_UNCONFUSED_STR_METHOD(@"U1dBTkFwcFJlbW92ZU5vQWN0aXZlQXBwTm90aWZpY2F0aW9u") //BBASMAppRemoveNoActiveAppNotification
// 卸载BBASMApp本身 (BBASMApp通知BBASMWorkBoxManager)
#define BBASMC_AppUnloadNotification @"UIApplicationUnloadNotification"
#pragma mark - SwannApp notification
// 小程序进入Active(PageStack通知BBASMApp)
#define BBASMC_AppActiveNotification @"UIApplicationActiveNotification"
// 小程序进入ResignActive(PageStack通知BBASMApp)
#define BBASMC_AppResignActiveNotification @"UIApplicationResignActiveNotification"
// 小程序退场(PageStack通知BBASMApp)
#define BBASMC_AppOnHideNotification @"UIApplicationOnHideNotification"
// 小程序销毁(BBASMApp通知PageStack)
#define BBASMC_AppDeallocNotification @"UIApplicationDeallocNotification"
// 账号登录变化通知 (passport通知BBASMApp)
#define BBASMC_AppAccountChangeNotification BBASM_UNCONFUSED_STR_METHOD(@"U1dBTkFwcEFjY291bnRDaGFuZ2VOb3RpZmljYXRpb24=") //BBASMAppAccountChangeNotification
// 拉取到最新小程序meta信息的通知
#define BBASMC_AppMetaInfoUpdate BBASM_UNCONFUSED_STR_METHOD(@"U1dBTkFwcE1ldGFJbmZvVXBkYXRl") //appMetaInfoUpdate
// 小程序meta信息通知的userInfo的中的key
#define BBASMC_AppMetaInfoUpdateKeyData @"appMetaInfo"
// 小程序meta信息通知的appID的中的key
#define BBASMC_AppMetaInfoUpdateKeyAppID @"appID"
// 小程序页面进出场通知
#define BBASMC_SlaveWebViewControllerViewDidAppear BBASM_UNCONFUSED_STR_METHOD(@"U1dBTlNsYXZlV2ViVmlld0NvbnRyb2xsZXJWaWV3RGlkQXBwZWFy") //BBASMSlaveWebViewControllerViewDidAppear
#define BBASMC_SlaveWebViewControllerViewWillDisappear BBASM_UNCONFUSED_STR_METHOD(@"U1dBTlNsYXZlV2ViVmlld0NvbnRyb2xsZXJWaWV3V2lsbERpc2FwcGVhcg==") //BBASMSlaveWebViewControllerViewWillDisappear
// 小程序/小游戏即将进场通知
#define BBASMC_AppGameWillAppearNotification BBASM_UNCONFUSED_STR_METHOD(@"U1dBTkFwcEdhbWVXaWxsQXBwZWFyTm90aWZpY2F0aW9u") //BBASMAppGameWillAppearNotification
// 小程序/小游戏即将退场通知
#define BBASMC_AppGameWillDisappearNotification BBASM_UNCONFUSED_STR_METHOD(@"U1dBTkFwcEdhbWVXaWxsRGlzYXBwZWFyTm90aWZpY2F0aW9u") //BBASMAppGameWillDisappearNotification
// 状态栏点击通知
#define BBASMC_StatusBarClicked BBASM_UNCONFUSED_STR_METHOD(@"U1dBTlN0YXR1c0JhckNsaWNrZWQ=") //BBASMStatusBarClicked
// 小_程_序即将开始启动的通知
#define BBASMAppWillLaunchNotification @"BBASMAppWillLaunchNotification"
// NA完成小程序首屏渲染通知
#define BBASMC_FirstSlaveDidRenderByNA BBASM_UNCONFUSED_STR_METHOD(@"U1dBTkZpcnN0U2xhdmVEaWRSZW5kZXJCeUZF")
//SWANFirstSlaveDidRenderByNA
//NAFMPArrivedNotice
#define BBASMNAFMPArrivedNotification @"BBASMNAFMPArrivedNotification"
// 小_程_序发出的通知中的调起协议带来的userInfo的key
#define BBASMAppNotificationDispatcherUserInfoKey @"dispatcherUserInfo"
// 上屏通知
#define BBASMC_FirstPaintPointByNA @"na_firstpaint_point_notification"
#define BBASMC_FirstScreenPaintPointByNA @"na_firstscreenpaint_point_notification"
#define BBASMC_CorrectScreenPaintPointByNA @"na_correctScreenpaint_point_notification"
// 冷启起播通知
#define BBASMC_VideoPlaySuccessByNA @"na_video_play_success_notification"
#define BBASMC_SplashDidShowNSNotification @"kBBASplashDidShowNSNotification"
#define BBASMC_SplashDidHideNSNotification @"kBBASplashDidHideNSNotification"
// 小程序将要添加收藏通知
#define BBASMC_AppWillAddBookMarkNotification BBASM_UNCONFUSED_STR_METHOD(@"U1dBTkFwcFdpbGxBZGRCb29rTWFya05vdGlmaWNhdGlvbg==") //BBASMAppWillAddBookMarkNotification
// pageShow时,slave页面FCP到达时的通知,不含FCP兜底赋值FMP
#define BBASM_SlaveFMPArrivedNotification @"BBASM_SlaveFMPArrivedNotification"
#pragma mark - 小程序通知 userInfo key
static NSString * const kBBASMAppNotificationUserInfoKeyAppID = @"appId";
/// 下线通知
static NSString *const BBASMAppNotAvailableNotificationKey = @"kBBASMAppNotAvailableNotificationKey";
#endif /* BBASMNotificationDef_h */