SRGTimeCheatCapturer 通过 ntp 客户端验证设备时间并捕获时间作弊者。
打开 AppDelegate.m 文件并编辑 applicationDidBecomeActive: 如下所述
- (void)applicationDidBecomeActive:(UIApplication *)application {
SRGTimeCheatCapturer *capturer = [SRGTimeCheatCapturer new];
[capturer checkWithOnCheatCaptured:^(){
// Here, you can show warning or impose a penalty if user cheating device time.
}];
}
参见演示项目以获取更多示例。
通过在 Podfile 中添加以下内容安装 CocoaPods:
pod 'SRGTimeCheatCapturer', '~> 0.0.1'