Commit 26cca933 authored by 汪洋's avatar 汪洋

Merge branch 'jql/201' into 'master'

app_session_over

See merge request !50
parents 6a4af29b 12909091
......@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = "GMPhobos"
s.version = "2.0.1"
s.version = "2.0.2"
s.summary = "GM statistic data sdk"
s.description = <<-DESC
......
......@@ -161,6 +161,11 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)onPVEnd:(UIResponder<PhobosPVProtocol> *)page;
/**
* 为隐私弹窗触发on_app_session_over埋点使用
*/
- (void)handleAppInBackgound;
@end
@interface NewPhobos (UtilTest)
......
......@@ -136,9 +136,9 @@ static NewPhobos *_sharedClient;
* @since 0.0.1
*/
- (void)setupNotification{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppFinishLaunch:) name:UIApplicationDidFinishLaunchingNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppInForeground:) name:UIApplicationWillEnterForegroundNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppInBackgound:) name:UIApplicationDidEnterBackgroundNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppFinishLaunch) name:UIApplicationDidFinishLaunchingNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppInForeground) name:UIApplicationWillEnterForegroundNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppInBackgound) name:UIApplicationDidEnterBackgroundNotification object:nil];
}
/**
......@@ -159,7 +159,7 @@ static NewPhobos *_sharedClient;
*
* @since 0.0.1
*/
- (void)handleAppFinishLaunch:(id)sender{
- (void)handleAppFinishLaunch {
phobosLog(@"handleAppFinishLaunch");
[self handleSessionStart];
[self handleEventDeviceOpened];
......@@ -170,7 +170,7 @@ static NewPhobos *_sharedClient;
*
* @since 0.0.1
*/
- (void)handleAppInForeground:(id)sender{
- (void)handleAppInForeground {
phobosLog(@"handleAppInForeground");
[self handleSessionStart];
[self handleEventDeviceOpened];
......@@ -183,7 +183,7 @@ static NewPhobos *_sharedClient;
*
* @since 0.0.1
*/
- (void)handleAppInBackgound:(id)sender{
- (void)handleAppInBackgound {
phobosLog(@"handleAppInBackgound");
[self handlePVEventAppInBackgound];
[self handleSessionOver];
......
......@@ -164,6 +164,11 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)onPVEnd:(UIResponder<PhobosPVProtocol> *)page;
/**
* 为隐私弹窗触发on_app_session_over埋点使用
*/
- (void)handleAppInBackgound;
/**
* @author 翟国钧, 16-03-08 11:03:45
*
......
......@@ -129,9 +129,9 @@ static OldPhobos *sharedClient = nil;
* @since 0.0.1
*/
- (void)setupNotification{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppFinishLaunch:) name:UIApplicationDidFinishLaunchingNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppInForeground:) name:UIApplicationWillEnterForegroundNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppInBackgound:) name:UIApplicationDidEnterBackgroundNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppFinishLaunch) name:UIApplicationDidFinishLaunchingNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppInForeground) name:UIApplicationWillEnterForegroundNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleAppInBackgound) name:UIApplicationDidEnterBackgroundNotification object:nil];
}
/**
......@@ -152,7 +152,7 @@ static OldPhobos *sharedClient = nil;
*
* @since 0.0.1
*/
- (void)handleAppFinishLaunch:(id)sender{
- (void)handleAppFinishLaunch {
phobosLog(@"handleAppFinishLaunch");
[self handleSessionStart];
[self handleEventDeviceOpened];
......@@ -163,7 +163,7 @@ static OldPhobos *sharedClient = nil;
*
* @since 0.0.1
*/
- (void)handleAppInForeground:(id)sender{
- (void)handleAppInForeground {
phobosLog(@"handleAppInForeground");
[self handleSessionStart];
[self handleEventDeviceOpened];
......@@ -176,7 +176,7 @@ static OldPhobos *sharedClient = nil;
*
* @since 0.0.1
*/
- (void)handleAppInBackgound:(id)sender{
- (void)handleAppInBackgound {
phobosLog(@"handleAppInBackgound");
[self handlePVEventAppInBackgound];
[self handleSessionOver];
......
......@@ -155,6 +155,10 @@ NS_ASSUME_NONNULL_BEGIN
* @brief PV事件结束。当controller viewWillDisAppear时调用
*/
- (void)onPVEnd:(UIResponder<PhobosPVProtocol> *)page;
/**
* 为隐私弹窗触发on_app_session_over埋点使用
*/
- (void)handleAppInBackgound;
@end
......
......@@ -139,6 +139,17 @@ static BOOL isGray = NO;
[_oldPhobos onPVEnd:page];
}
/**
* 为隐私弹窗触发on_app_session_over埋点使用
*/
- (void)handleAppInBackgound {
if (isGray) {
[_rePhobos handleAppInBackgound];
} else {
[_oldPhobos handleAppInBackgound];
}
}
- (void)setCaptureNullExpection:(void (^)(NSString * _Nonnull, NSDictionary * _Nonnull))captureNullExpection {
_captureNullExpection = captureNullExpection;
_rePhobos.captureNullExpection = captureNullExpection;
......
......@@ -16,7 +16,7 @@ typedef NS_ENUM (NSInteger, PhobosSigningType) {
PhobosSigningTypeDebug
};
static NSString *sdkVersion = @"2.0.1";
static NSString *sdkVersion = @"2.0.2";
#ifdef DEBUG
#define phobosLog(...) NSLog(@"[Phobos] %@",__VA_ARGS__)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment