Check if the Time and Date is set to automatic on the IOS

Captura de Tela 2022-03-09 às 14.34.31

Hi guys.
I’m wanting to check if the time and date is in automatic on ios. I found some plugins made for ios I tried to use them more without success.
I also tried to use the diagnostic cordova plugin but it doesn’t check this Date and Time issue if it is activated or deactivated.
Here are the links I found and tried to do.

GitHub - andrerds/cordova-plugin-time-check: Plugin de checagem de tempo - Cordova (in use)
GitHub - 123erfasst/cordova-plugin-timesettings: 123Erfasst Plugin um zu erzwingen dass der Benutzer Automatische Zeit aktiviert hat

If anyone can help me, a solution, I would be grateful.

Hi, me again!
Friends, I still haven’t found a solution to this problem, someone could help me!
On android it’s working beautiful, what I’m looking for is to check if the time zone is on automatic, I saw that Apple doesn’t expose this info. ! please if anyone can shed some light at the end of the tunnel hehe.

Your solution is to create your own plugin using capacitor.

2 Likes

I like @Hills90210 suggestion. :grinning:

Our Engineering team is not aware of a way to do this using pure JS. Perhaps you could provide more details around your use case so we can better understand what functionality you are trying to accomplish?

1 Like

Hey, my idea was to create a plugin (in cordova) project is using cordova yet. We will be migrating soon.
The problem that I didn’t find a way to get the information of the automatic timeZone is enabled or not.

Hey, what I’m trying to do is:
Check whether automatic timeZone is enabled or not on iphone devices. On Android it’s working wonderfully, but on iPhone I can’t see a way of the automatic timezone setting is enabled or disabled. :disappointed_relieved:

I dont believe iOS exposes this kind of information via native code, so it’s probably not possible. Though I dont know why this kind of information would be useful

1 Like

Flutter already has a plugin, this is useful, even WhatsApp uses it.

1 Like

Hello friend, thank you very much for the tip. I’ll take a look, maybe I can make a plugin for Ionic. Thanks!