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
4a9dd7a3
Commit
4a9dd7a3
authored
May 30, 2016
by
翟国钧
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Phobos的所有埋点方法由原来的实例方法改成静态方法。
parent
89abe3e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
README.md
README.md
+11
-4
No files found.
README.md
View file @
4a9dd7a3
...
...
@@ -46,26 +46,33 @@ This singleton instance is often configured in your app delegate’s application
}
```
If you would like to specify a user, you can set the userId that is used with the -
[
setUserId:
]
class
method.
If you would like to specify a user, you can set the userId that is used with the -
[
setUserId:
]
Instance
method.
```
objc
WMUser
*
user
=
[[
WMLoginManager
shareInstance
]
user
];
[
client
setUserId
:
user
.
userId
];
```
If you would like to use Phobos, you must set the currentCityId that is used with the -
[
setCurrentCityId:
]
Instance method.
```
objc
WMCityObject
*
city
=
[[
WMCacheService
sharedInstance
]
fetchObjectAtDucmentPathWithkey
:
kCurrentCity
];
if
(
city
)
{
[
client
setCurrentCityId
:
city
.
id
];
}
```
## Sending Messages
Sending a basic message:
```
objc
[
[
Phobos
sharedClient
]
track
:
@"event_id"
];
[
Phobos
track
:
@"event_id"
];
```
Sending a message with another attributes:
```
objc
[
[
Phobos
sharedClient
]
track
:
@"event_id"
attributes
:@{}];
[
Phobos
track
:
@"event_id"
attributes
:@{}];
```
Sending a message with another attributes and send immediately:
```
objc
[
[
Phobos
sharedClient
]
track
:
@"event_id"
attributes
:@{}
sendNow
:
YES
];
[
Phobos
track
:
@"event_id"
attributes
:@{}
sendNow
:
YES
];
```
...
...
翟国钧
@zhaiguojun
·
May 30, 2016
另外,因为埋点数据中需要用户的当前城市信息,所以在初始化Phobos的时候,必须通过setCurrentCityId方法来设置城市ID
另外,因为埋点数据中需要用户的当前城市信息,所以在初始化Phobos的时候,必须通过setCurrentCityId方法来设置城市ID
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