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
2eef3c6f
Commit
2eef3c6f
authored
May 30, 2016
by
翟国钧
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.gengmei.cc:gengmeiios/GMPhobos
parents
92a32db2
4a9dd7a3
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 @
2eef3c6f
...
...
@@ -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
];
```
...
...
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