Commit c5b37c3b authored by Thierry's avatar Thierry

Merge branch 'master' of git.gengmei.cc:gengmeiios/GMPhobos

parents 1ce9ea27 0a4180fd
# GMPhobos # GMPhobos
命名来源: ## About The Name
取名来源于数据中心的名字Mars(火星) The name is from the Data Center who named Mars
Phobos则是来自火卫一(,英语发音"FOH bus"),呈土豆形状,一日围绕火星3圈,距火星平均距离约9378公里。
它是火星的两颗卫星中较大,也是离火星较近的一颗。火卫一与火星之间的距离也是太阳系中所有的卫星与其主星的距离中最短的,从火星表面算起,只有6000千米。它也是太阳系中最小的卫星之一。
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.
## Usage 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.
To run the example project, clone the repo, and run `pod install` from the Example directory first. The name "Phobos" is pronounced /ˈfoʊbəs/ foh-bəs, or like the Greek Φόβος.
## Requirements ## Requirements
依赖WMCacheService,和libz库 Require WMCacheService and libz
## Installation ## Installation
...@@ -22,9 +20,57 @@ it, simply add the following line to your Podfile: ...@@ -22,9 +20,57 @@ it, simply add the following line to your Podfile:
pod "GMPhobos" pod "GMPhobos"
``` ```
## Author Alternatively, you can install manually.
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 ## 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