Coder Social home page Coder Social logo

zealot-ios's Introduction

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, [email protected]

License

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

zealot-ios's People

Contributors

icyleaf avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.