跳到主要内容
版本:5.2.2

Zealot iOS SDK

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

安装

Cocoapods

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

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

保存后开始安装:

pod install

初始化

  1. 在 AppDelegate 文件引入 Zealot 框架头:
import Zealot
  1. 接着在上面文件的 application:didFinishLaunchingWithOptions: 方法追加启动代码:
// 单个渠道
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()