Appearance
iOS 弹窗验证示例
基于 Objective-C SDK 的 iOS 弹窗验证示例,使用 UIAlertController 在主界面上弹出验证对话框。
依赖 SDK
- Objective-C SDK — 核心验证逻辑(查看文档)
支持功能
| 功能 | 说明 |
|---|---|
| 弹窗验证 | UIAlertController 风格验证弹窗 |
| 公告展示 | 弹窗内显示公告 |
| 版本检查 | 启动时版本检查 |
| 卡密登录 | 弹窗内输入卡密登录 |
| 自动登录 | NSUserDefaults 保存卡密 |
| 心跳验证 | NSTimer 每 60 秒心跳 |
与全屏版的区别
- 全屏版:使用独立
UIViewController展示完整验证界面 - 弹窗版:在主 ViewController 上弹出 Alert,验证通过后关闭
初始化配置
objectivec
// RSA 算法(推荐)
[self.verify initRsaWithLoginCode:@"登录调用码"
noticeCode:@"公告调用码"
versionCode:@"版本调用码"
heartbeatCode:@"心跳调用码"
appkey:@"你的APPKEY"
rsaPublicKey:@"-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"];后台配置
使用前请先完成 后台快速配置。
编译运行
bash
open T3验证.xcodeproj
# 或命令行
xcodebuild -project T3验证.xcodeproj -scheme T3验证 \
-destination 'platform=iOS Simulator,name=iPhone 17 Pro' build如何扩展
参考 Objective-C SDK 文档 添加更多接口调用。