HelloWorldImW / zealot-ios

Zealot SDK for iOS

Home Page:https://zealot.ews.im

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zealot iOS SDK

CI Status Version License Platform

iOS 组件提供为 Zealot 检查新版本和安装的服务,支持 Swift 和 Objective-C。

安装

Cocoapods

使用 Cocoapods 安装 Zealot 需要把它加到 PodFile:

未达到上线标准前暂不上 Cocoapods Specs

pod 'Zealot', :git => 'https://github.com/tryzealot/zealot-ios.git', :branch => 'master'

保存后开始安装:

pod install

使用

  1. 在 AppDelegate 文件t引入 Zealot 框架头:
// Swift
import Zealot
// Objective-C
#import <Zealot/Zealot-Swift.h>
  1. 接着在上面文件的 application:didFinishLaunchingWithOptions: 方法追加启动代码:
// Swift
// 单个渠道
let zealot = Zealot(endpoint: "http://zealot.com", channelKey: "...")
zealot.checkVersion()

// 多个渠道,比如测试版本,内测版本
let zealot = Zealot(endpoint: "http://zealot.com",
                 channelKeys: [
                   "beta": "xxxxxxx",
                   "test": "yyyyyyy"],
          default_enviroment: "beta")

// 最后触发监测方法
zealot.checkVersion()
// Objective-C
// 单个渠道
Zealot *zealot = [[Zealot alloc] initWithEndpoint:@"http://zealot.com"
                                       channelKey:@"..."];

// 多个渠道,比如测试版本,内测版本
Zealot *zealot = [[Zealot alloc] initWithEndpoint:@"http://zealot.com"
                                          channelKeys:@{
                                              @"beta": @"xxxxxxx",
                                              @"gray": @"yyyyyyy"
                                          }
                                   default_enviroment:@"beta"];

// 最后触发监测方法
[zealot checkVersion];

Author

icyleaf, icyleaf.cn@gmail.com

License

Zealot is available under the MIT license. See the LICENSE file for more info.

About

Zealot SDK for iOS

https://zealot.ews.im

License:MIT License


Languages

Language:Swift 93.7%Language:Ruby 6.3%