ESP32 Read time/date from iOS device via BLE Bluetooth

Dear community,

I need to read the actual time/Date from an iPhone via BLE.

Background:
This is a kind of retrofit clock for an oldtimer car (BMW E30). The origial Clock is not useable anymore as we did a significant change in the entire car structure (including the change to an V8, 4ltr engine).
The idea is to have a new BC/Clock module but based on an ESP32 and a 2" display. Also including the reading/writing to the K and I Bus.
And I try to make it for an universal solution.

THe question is: How to get the correct time. I thought about
a) the start at home with WiFi and a battery buffered RTC module - Disadvantages: WHen the Lithium Batteris empty, there is a need to remove the complete BC unit, which is cumbersome and when this happend abroad, than there is not chance to set the time again; this is only a solution which works for a single user, as there is too much hardcoded parameters.
b) the connection via iOS hotspot and setting via internet time. Disadvatages: see above.
c) a standard BLE connection to an iPhone. THis could be done by any user, this is in my opinon a universal solution.

My question: How to read the time/date from an iPhone after the BLE connection is established.

Many thanks for your thoughts and hints.
Willythecat

ONLY an iPhone? It can take years to get Apple to approve an app. I am not sure how/if this can be done. I hope you have done a lot of google searches.

iOS does not expose a standard BLE service or characteristic for retrieving the system time or date. If you need to access this information via BLE, you do this through a custom BLE service implemented by a specific app.

Might add complications to your "simple for everyone" requirement and if you don't want to code, there might be apps out there to do something similar (like
‎Clock Sync App Blue dans l’App Store)

May be your ESP32 could offer a captive portal experience. Join the portal from your smartphone (does not need to be iOS) and a UI pops up where you can enter the information required.

Probably some security measures would need to be added so that this does not get abused

this GitHub - tzapu/WiFiManager: ESP8266 WiFi Connection manager with web captive portal could offer the basic building block you need.

Here is a thread where someone else wanted a similar set up.
https://forum.arduino.cc/t/receive-actual-time-from-bluetooth-connection/637121

I got the simple idea to use a GPS module. Much better and more fuctionality.
THX
Willythecat

That is a good idea. If you use the car battery for the GPS power source the builtin rechargeable battery will last many years.