Commit b2600c5e authored by 邢天宇's avatar 邢天宇

update readme

parent 3cf509dd
# GMPhobos
命名来源:
取名来源于数据中心的名字Mars(火星)
Phobos则是来自火卫一(,英语发音"FOH bus"),呈土豆形状,一日围绕火星3圈,距火星平均距离约9378公里。
它是火星的两颗卫星中较大,也是离火星较近的一颗。火卫一与火星之间的距离也是太阳系中所有的卫星与其主星的距离中最短的,从火星表面算起,只有6000千米。它也是太阳系中最小的卫星之一。
## About The Name
The name is from the Data Center who named Mars
## Usage
To run the example project, clone the repo, and run `pod install` from the Example directory first.
Phobos (systematic designation: Mars I) is the larger and innermost of the two natural satellites of Mars, the other being Deimos. Both moons were discovered in 1877 by American astronomer Asaph Hall.
Phobos is a small, irregularly shaped object with a mean radius of 11 km (7 mi),[1] and is seven times more massive than Deimos, Mars's outer moon.
Phobos is named after the Greek god Phobos, a son of Ares (Mars) and Aphrodite (Venus) which was the personification of Horror.
The name "Phobos" is pronounced /ˈfoʊbəs/ foh-bəs, or like the Greek Φόβος.
## Requirements
依赖WMCacheService,和libz库
Require WMCacheService and libz
## Installation
......@@ -22,9 +20,55 @@ it, simply add the following line to your Podfile:
pod "GMPhobos"
```
## Author
1. Get the code:
```ruby
git clone git@git.gengmei.cc:gengmeiios/GMPhobos.git
```
2. Drag the Phobos subfolder to your project. Check both “copy items into destination group’s folder” and your target.
## Configuration
While you are free to initialize as many instances of Phobos as is appropriate for your application, there is a shared singleton instance that is globally available.
This singleton instance is often configured in your app delegate’s application:didFinishLaunchingWithOptions: method:
```objc
#import "Phobos.h"
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
Phobos *client = [Phobos clientWithAppName:@"appname" channelId:@"appchannel"];
[Phobos setSharedClient:client];
/* ... */
return YES;
}
```
licong, 1240690490@qq.com
If you would like to specify a user, you can set the userId that is used with the -[setUserId:] class method.
```objc
WMUser *user = [[WMLoginManager shareInstance] user];
[client setUserId:user.userId];
```
## Sending Messages
Sending a basic message:
```objc
[[Phobos sharedClient] track:@"event_id"];
```
Sending a message with another attributes:
```objc
[[Phobos sharedClient] track:@"event_id" attributes:@{}];
```
Sending a message with another attributes and send immediately:
```objc
[[Phobos sharedClient] track:@"event_id" attributes:@{} sendNow:YES];
```
## Author
Guojun Zhai and Thierry Xing
## License
......
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