Prizeout iOS
安装
要使用 CocoaPods 安装 SDK,请将以下行添加到 Podfile
use_frameworks!
pod 'PrizeoutSDK'
使用
导入 Prizeout
并创建 POUser 和 POPublisher 对象
import Prizeout
let pouser = POUser(
firstname: "John",
lastname: "Smith",
birthYear: "1980",
gender: "Male",
email: "[email protected]",
id: "1234",
country: "US",
region: "NY",
balance: 15000 // Currency in cents (Int)
)
let pub = POPublisher(
name: "Partner Name",
logo: "https://partner.com/logo.png",
id: "12345678-1234-1234-1234-123456789123",
apiKey: "12345678912345678912345678912345",
env: "" // "beta", "prod" or "sandbox" by default if omitted
)
创建配置对象后,显示 Prizeout 界面
let poconfig = PrizeoutConfig(user: pouser, publisher: pub)
PrizeoutManager.launch(config: poconfig)