IOS SDK集成指南

说明: framework采用 swift语言编写

下载和导入

下载中心下载IOS framework压缩文件,解压

导入项目:

Target -> General->Embedded Binaries

导入framework

选择: Copy items if needed

导入framework

Swift项目集成

在项目中引入模块

import FissionInstall

初始化

let fissionInstall = FissionInstall(appKey: "在第一赞平台所创建应用的AppKey")

获取分享链接

注意: 所传入的安装参数 暂时只支持 Dictionary [String: String] 这种类型

let packageName: String = "com.sample.app"
let data: [String: String] = ["uname": "Sophie", "uid": "12333"]
fissionInstall.getFissionUrl(packageName: packageName, installParams: data) { (url, error) -> () in
    if let error = error {

      // check the error
      return
    }

    // do something with `url`

}

获取安装参数

fissionInstall.getInstallParams() { (installParams, error) -> () in
    if let error = error {
        print("Bad luck: \(error)")
        // check the error
        return
    }

    print("You got this: \(String(describing: installParams))")

    // do something with `installParams`
}

results matching ""

    No results matching ""