Commit 62802e4c authored by aaron hendrick's avatar aaron hendrick Committed by Mehdi Achour

fix(getBatteryLevel): change method to respect tvos targets (#363)

parent 805fe1d3
......@@ -306,7 +306,11 @@ RCT_EXPORT_METHOD(isPinOrFingerprintSet:(RCTResponseSenderBlock)callback)
RCT_EXPORT_METHOD(getBatteryLevel:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
{
#if TARGET_OS_TV
float batteryLevel = 1.0;
#else
float batteryLevel = [UIDevice currentDevice].batteryLevel;
#endif
resolve(@(batteryLevel));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment