3.4.0 iOS 获取电量jsb.device.getBatteryLevel接口无效
Creator 3.x
512983854
(橙C)
2022年02月17日 02:10
#1
查找了一下native源码,
图片
1054×595 54.8 KB
,之所以无效应该是需要
[UIDevice currentDevice].batteryMonitoringEnabled = YES ,开启电量监控,因为默认不开启的。
3赞