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
9d8fa498
Commit
9d8fa498
authored
Aug 08, 2019
by
jinzhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
埋点加判断不能传 object
parent
e56ff462
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
Phobos.m
GMPhobos/Classes/Phobos.m
+17
-0
No files found.
GMPhobos/Classes/Phobos.m
View file @
9d8fa498
...
@@ -271,6 +271,8 @@ static NSString *sdkVersion = @"110";
...
@@ -271,6 +271,8 @@ static NSString *sdkVersion = @"110";
}
}
+
(
void
)
track
:
(
NSString
*
)
eventId
attributes
:
(
NSDictionary
*
)
attributes
sendNow
:
(
BOOL
)
sendNow
{
+
(
void
)
track
:
(
NSString
*
)
eventId
attributes
:
(
NSDictionary
*
)
attributes
sendNow
:
(
BOOL
)
sendNow
{
NSDictionary
*
dict
=
[
sharedClient
prepareDictionaryForEvent
:
eventId
attributes
:
attributes
];
NSDictionary
*
dict
=
[
sharedClient
prepareDictionaryForEvent
:
eventId
attributes
:
attributes
];
@try
{
NSData
*
JSON
=
[
PhobosUtil
encodeJSON
:
dict
];
if
(
sendNow
)
{
if
(
sendNow
)
{
NSArray
*
array
=
@[
dict
];
NSArray
*
array
=
@[
dict
];
// 实时发送的埋点,不能立即清楚缓存
// 实时发送的埋点,不能立即清楚缓存
...
@@ -278,6 +280,12 @@ static NSString *sdkVersion = @"110";
...
@@ -278,6 +280,12 @@ static NSString *sdkVersion = @"110";
}
else
{
}
else
{
[
sharedClient
save
:
dict
];
[
sharedClient
save
:
dict
];
}
}
}
@catch
(
NSException
*
exception
)
{
NSAssert
(
NO
,
@"哎呀呀,VALUE只不能为NSObject "
);
}
}
}
+
(
void
)
track
:
(
NSString
*
)
eventId
attributes
:
(
NSDictionary
*
)
attributes
currentAPI
:
(
NSString
*
)
currentAPI
{
+
(
void
)
track
:
(
NSString
*
)
eventId
attributes
:
(
NSDictionary
*
)
attributes
currentAPI
:
(
NSString
*
)
currentAPI
{
...
@@ -291,7 +299,11 @@ static NSString *sdkVersion = @"110";
...
@@ -291,7 +299,11 @@ static NSString *sdkVersion = @"110";
+
(
void
)
track
:
(
NSString
*
)
eventId
attributes
:
(
NSDictionary
*
)
attributes
sendNow
:
(
BOOL
)
sendNow
currentAPI
:
(
NSString
*
)
currentAPI
{
+
(
void
)
track
:
(
NSString
*
)
eventId
attributes
:
(
NSDictionary
*
)
attributes
sendNow
:
(
BOOL
)
sendNow
currentAPI
:
(
NSString
*
)
currentAPI
{
[
sharedClient
addNewApi
:
currentAPI
];
// 记录新的API
[
sharedClient
addNewApi
:
currentAPI
];
// 记录新的API
NSDictionary
*
dict
=
[
sharedClient
prepareDictionaryForEvent
:
eventId
attributes
:
attributes
];
NSDictionary
*
dict
=
[
sharedClient
prepareDictionaryForEvent
:
eventId
attributes
:
attributes
];
@try
{
NSData
*
JSON
=
[
PhobosUtil
encodeJSON
:
dict
];
if
(
sendNow
)
{
if
(
sendNow
)
{
NSArray
*
array
=
@[
dict
];
NSArray
*
array
=
@[
dict
];
// 实时发送的埋点,不能立即清楚缓存
// 实时发送的埋点,不能立即清楚缓存
...
@@ -299,6 +311,11 @@ static NSString *sdkVersion = @"110";
...
@@ -299,6 +311,11 @@ static NSString *sdkVersion = @"110";
}
else
{
}
else
{
[
sharedClient
save
:
dict
currentAPI
:
currentAPI
];
[
sharedClient
save
:
dict
currentAPI
:
currentAPI
];
}
}
}
@catch
(
NSException
*
exception
)
{
NSAssert
(
NO
,
@"哎呀呀,VALUE只不能为NSObject "
);
}
}
}
+
(
void
)
track
:
(
NSString
*
)
eventId
currentAPI
:
(
NSString
*
)
currentAPI
{
+
(
void
)
track
:
(
NSString
*
)
eventId
currentAPI
:
(
NSString
*
)
currentAPI
{
...
...
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