前言
- 原文地址:
https://kunnan.blog.csdn.net/article/details/105866534
- 需求:
电量低于 <= 50 %进行报警
应用场景:ASO机刷的场景就需要保证设备的高可用性
划重点
-
name:NSProcessInfoPowerStateDidChangeNotification
-
UIDeviceBatteryLevelDidChangeNotification
[[NSNotificationCenter defaultCenter] addObserverForName:UIDeviceBatteryLevelDidChangeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *
微信公众号:【iOS逆向】iOS逆向与安全,熟悉iphone/tweak、iphone/tool、cydia的repo 制作 、cocoapods的Specs repo制作(using-pod-lib-create、private-cocoapods)。I am a software engineer currently living in Changsha. My interests range from technology to writing.