Reborn
关于
Reborn 会检查用户已安装的 iOS 应用当前版本与当前配置的版本是否匹配。
如果两个版本都匹配,并且是第一次,那么将启动一个事件来通知已配置的版本已经安装。
示例
要运行示例项目,首先克隆仓库,然后在 Example 目录中先运行 pod install
。
安装
Reborn 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中
pod 'Reborn'
使用
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
setupReborn()
return true
}
func setupReborn(){
// Alert will be fired when the first time 1.3 version installed
let reborn = Reborn(at: "1.3")
reborn.isTest = true
reborn.delegate = self
reborn.check()
}
extension AppDelegate: RebornDelegate{
func rebornDidComplete() {
print("Reborn did triggered!")
}
}
作者
vbicer, [email protected]
许可证
Reborn可在MIT许可证下使用。有关更多信息,请参阅LICENSE文件。