0

I have a very specific task - I need to find a way to observe iOS device temperature. I'm developing an application which is a system for multiple devices. And sometimes there're cases when one of iPhones/iPads is overheating. My task is simple - I need to have a possibility to tell other devices that one certain "chain" is about to overheat or already overheated.

Is there any way to do this without violating Apple security laws? Because this application will go to Appstore and I don't want to have problems at this stage.

Eugene Alexeev
  • 1,152
  • 12
  • 32

1 Answers1

2

You can do it by using Bluetooth Low Energy by following way: 1. Create a characteristic and service for reading temperature.

  1. Add the listener on other devices so that they will get notify when temperature of the device will change.

  2. For overheated, define a threshold.

For temperature, please refer: https://github.com/beltex/SystemKit/blob/master/SystemKit/Battery.swift

For BLE, please refer https://www.appcoda.com/core-bluetooth/

  • The library you linked to specifically states it is for MacOS > "TODO: None of this will work for iOS as I/O Kit is a private framework there" – CodeBender Aug 09 '18 at 18:46
  • @CodeBender I think it will be helpfull for you:https://stackoverflow.com/questions/38823260/how-to-get-the-battery-temperature-details-in-ios – Er Rahul Rajkumar Gupta Aug 09 '18 at 19:08
  • 2
    Straight from that link: NOTE: As of iOS 10 beta 1, it appears that Apple has removed nearly all power information from this dictionary, and there doesn't appear to be any way to retrieve this information. The information appears to have been removed from IOKit. – CodeBender Aug 09 '18 at 19:13