Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
GMPhobos
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
GMPhobos
Commits
12909091
Commit
12909091
authored
Apr 08, 2020
by
井庆林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app_session_over
parent
b8825c07
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
14 deletions
+39
-14
GMPhobos.podspec
GMPhobos.podspec
+1
-1
NewPhobos.h
GMPhobos/Classes/NewPhobos.h
+5
-0
NewPhobos.m
GMPhobos/Classes/NewPhobos.m
+6
-6
OldPhobos.h
GMPhobos/Classes/OldPhobos.h
+5
-0
OldPhobos.m
GMPhobos/Classes/OldPhobos.m
+6
-6
Phobos.h
GMPhobos/Classes/Phobos.h
+4
-0
Phobos.m
GMPhobos/Classes/Phobos.m
+11
-0
PhobosConfig.h
GMPhobos/Classes/PhobosConfig.h
+1
-1
No files found.
GMPhobos.podspec
View file @
12909091
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
Pod
::
Spec
.
new
do
|
s
|
Pod
::
Spec
.
new
do
|
s
|
s
.
name
=
"
GMPhobos
"
s
.
name
=
"
GMPhobos
"
s
.
version
=
"2.0.
1
"
s
.
version
=
"2.0.
2
"
s
.
summary
=
"GM statistic data sdk"
s
.
summary
=
"GM statistic data sdk"
s
.
description
=
<<-
DESC
s
.
description
=
<<-
DESC
...
...
GMPhobos/Classes/NewPhobos.h
View file @
12909091
...
@@ -161,6 +161,11 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -161,6 +161,11 @@ NS_ASSUME_NONNULL_BEGIN
*/
*/
-
(
void
)
onPVEnd
:(
UIResponder
<
PhobosPVProtocol
>
*
)
page
;
-
(
void
)
onPVEnd
:(
UIResponder
<
PhobosPVProtocol
>
*
)
page
;
/**
* 为隐私弹窗触发on_app_session_over埋点使用
*/
-
(
void
)
handleAppInBackgound
;
@end
@end
@interface
NewPhobos
(
UtilTest
)
@interface
NewPhobos
(
UtilTest
)
...
...
GMPhobos/Classes/NewPhobos.m
View file @
12909091
...
@@ -136,9 +136,9 @@ static NewPhobos *_sharedClient;
...
@@ -136,9 +136,9 @@ static NewPhobos *_sharedClient;
* @since 0.0.1
* @since 0.0.1
*/
*/
-
(
void
)
setupNotification
{
-
(
void
)
setupNotification
{
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
handleAppFinishLaunch
:
)
name
:
UIApplicationDidFinishLaunchingNotification
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
(
handleAppInForeground
)
name
:
UIApplicationWillEnterForegroundNotification
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
handleAppInBackgound
:
)
name
:
UIApplicationDidEnterBackgroundNotification
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
handleAppInBackgound
)
name
:
UIApplicationDidEnterBackgroundNotification
object
:
nil
];
}
}
/**
/**
...
@@ -159,7 +159,7 @@ static NewPhobos *_sharedClient;
...
@@ -159,7 +159,7 @@ static NewPhobos *_sharedClient;
*
*
* @since 0.0.1
* @since 0.0.1
*/
*/
-
(
void
)
handleAppFinishLaunch
:
(
id
)
sender
{
-
(
void
)
handleAppFinishLaunch
{
phobosLog
(
@"handleAppFinishLaunch"
);
phobosLog
(
@"handleAppFinishLaunch"
);
[
self
handleSessionStart
];
[
self
handleSessionStart
];
[
self
handleEventDeviceOpened
];
[
self
handleEventDeviceOpened
];
...
@@ -170,7 +170,7 @@ static NewPhobos *_sharedClient;
...
@@ -170,7 +170,7 @@ static NewPhobos *_sharedClient;
*
*
* @since 0.0.1
* @since 0.0.1
*/
*/
-
(
void
)
handleAppInForeground
:
(
id
)
sender
{
-
(
void
)
handleAppInForeground
{
phobosLog
(
@"handleAppInForeground"
);
phobosLog
(
@"handleAppInForeground"
);
[
self
handleSessionStart
];
[
self
handleSessionStart
];
[
self
handleEventDeviceOpened
];
[
self
handleEventDeviceOpened
];
...
@@ -183,7 +183,7 @@ static NewPhobos *_sharedClient;
...
@@ -183,7 +183,7 @@ static NewPhobos *_sharedClient;
*
*
* @since 0.0.1
* @since 0.0.1
*/
*/
-
(
void
)
handleAppInBackgound
:
(
id
)
sender
{
-
(
void
)
handleAppInBackgound
{
phobosLog
(
@"handleAppInBackgound"
);
phobosLog
(
@"handleAppInBackgound"
);
[
self
handlePVEventAppInBackgound
];
[
self
handlePVEventAppInBackgound
];
[
self
handleSessionOver
];
[
self
handleSessionOver
];
...
...
GMPhobos/Classes/OldPhobos.h
View file @
12909091
...
@@ -164,6 +164,11 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -164,6 +164,11 @@ NS_ASSUME_NONNULL_BEGIN
*/
*/
-
(
void
)
onPVEnd
:(
UIResponder
<
PhobosPVProtocol
>
*
)
page
;
-
(
void
)
onPVEnd
:(
UIResponder
<
PhobosPVProtocol
>
*
)
page
;
/**
* 为隐私弹窗触发on_app_session_over埋点使用
*/
-
(
void
)
handleAppInBackgound
;
/**
/**
* @author 翟国钧, 16-03-08 11:03:45
* @author 翟国钧, 16-03-08 11:03:45
*
*
...
...
GMPhobos/Classes/OldPhobos.m
View file @
12909091
...
@@ -129,9 +129,9 @@ static OldPhobos *sharedClient = nil;
...
@@ -129,9 +129,9 @@ static OldPhobos *sharedClient = nil;
* @since 0.0.1
* @since 0.0.1
*/
*/
-
(
void
)
setupNotification
{
-
(
void
)
setupNotification
{
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
handleAppFinishLaunch
:
)
name
:
UIApplicationDidFinishLaunchingNotification
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
(
handleAppInForeground
)
name
:
UIApplicationWillEnterForegroundNotification
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
handleAppInBackgound
:
)
name
:
UIApplicationDidEnterBackgroundNotification
object
:
nil
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
handleAppInBackgound
)
name
:
UIApplicationDidEnterBackgroundNotification
object
:
nil
];
}
}
/**
/**
...
@@ -152,7 +152,7 @@ static OldPhobos *sharedClient = nil;
...
@@ -152,7 +152,7 @@ static OldPhobos *sharedClient = nil;
*
*
* @since 0.0.1
* @since 0.0.1
*/
*/
-
(
void
)
handleAppFinishLaunch
:
(
id
)
sender
{
-
(
void
)
handleAppFinishLaunch
{
phobosLog
(
@"handleAppFinishLaunch"
);
phobosLog
(
@"handleAppFinishLaunch"
);
[
self
handleSessionStart
];
[
self
handleSessionStart
];
[
self
handleEventDeviceOpened
];
[
self
handleEventDeviceOpened
];
...
@@ -163,7 +163,7 @@ static OldPhobos *sharedClient = nil;
...
@@ -163,7 +163,7 @@ static OldPhobos *sharedClient = nil;
*
*
* @since 0.0.1
* @since 0.0.1
*/
*/
-
(
void
)
handleAppInForeground
:
(
id
)
sender
{
-
(
void
)
handleAppInForeground
{
phobosLog
(
@"handleAppInForeground"
);
phobosLog
(
@"handleAppInForeground"
);
[
self
handleSessionStart
];
[
self
handleSessionStart
];
[
self
handleEventDeviceOpened
];
[
self
handleEventDeviceOpened
];
...
@@ -176,7 +176,7 @@ static OldPhobos *sharedClient = nil;
...
@@ -176,7 +176,7 @@ static OldPhobos *sharedClient = nil;
*
*
* @since 0.0.1
* @since 0.0.1
*/
*/
-
(
void
)
handleAppInBackgound
:
(
id
)
sender
{
-
(
void
)
handleAppInBackgound
{
phobosLog
(
@"handleAppInBackgound"
);
phobosLog
(
@"handleAppInBackgound"
);
[
self
handlePVEventAppInBackgound
];
[
self
handlePVEventAppInBackgound
];
[
self
handleSessionOver
];
[
self
handleSessionOver
];
...
...
GMPhobos/Classes/Phobos.h
View file @
12909091
...
@@ -155,6 +155,10 @@ NS_ASSUME_NONNULL_BEGIN
...
@@ -155,6 +155,10 @@ NS_ASSUME_NONNULL_BEGIN
* @brief PV事件结束。当controller viewWillDisAppear时调用
* @brief PV事件结束。当controller viewWillDisAppear时调用
*/
*/
-
(
void
)
onPVEnd
:(
UIResponder
<
PhobosPVProtocol
>
*
)
page
;
-
(
void
)
onPVEnd
:(
UIResponder
<
PhobosPVProtocol
>
*
)
page
;
/**
* 为隐私弹窗触发on_app_session_over埋点使用
*/
-
(
void
)
handleAppInBackgound
;
@end
@end
...
...
GMPhobos/Classes/Phobos.m
View file @
12909091
...
@@ -139,6 +139,17 @@ static BOOL isGray = NO;
...
@@ -139,6 +139,17 @@ static BOOL isGray = NO;
[
_oldPhobos
onPVEnd
:
page
];
[
_oldPhobos
onPVEnd
:
page
];
}
}
/**
* 为隐私弹窗触发on_app_session_over埋点使用
*/
-
(
void
)
handleAppInBackgound
{
if
(
isGray
)
{
[
_rePhobos
handleAppInBackgound
];
}
else
{
[
_oldPhobos
handleAppInBackgound
];
}
}
-
(
void
)
setCaptureNullExpection
:
(
void
(
^
)(
NSString
*
_Nonnull
,
NSDictionary
*
_Nonnull
))
captureNullExpection
{
-
(
void
)
setCaptureNullExpection
:
(
void
(
^
)(
NSString
*
_Nonnull
,
NSDictionary
*
_Nonnull
))
captureNullExpection
{
_captureNullExpection
=
captureNullExpection
;
_captureNullExpection
=
captureNullExpection
;
_rePhobos
.
captureNullExpection
=
captureNullExpection
;
_rePhobos
.
captureNullExpection
=
captureNullExpection
;
...
...
GMPhobos/Classes/PhobosConfig.h
View file @
12909091
...
@@ -16,7 +16,7 @@ typedef NS_ENUM (NSInteger, PhobosSigningType) {
...
@@ -16,7 +16,7 @@ typedef NS_ENUM (NSInteger, PhobosSigningType) {
PhobosSigningTypeDebug
PhobosSigningTypeDebug
};
};
static
NSString
*
sdkVersion
=
@"2.0.
1
"
;
static
NSString
*
sdkVersion
=
@"2.0.
2
"
;
#ifdef DEBUG
#ifdef DEBUG
#define phobosLog(...) NSLog(@"[Phobos] %@",__VA_ARGS__)
#define phobosLog(...) NSLog(@"[Phobos] %@",__VA_ARGS__)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment