IOS - How to set date and time programmatically

I have a requirement where we need to programmatically set the date and time (or sync the time) from the server.

I have done some research on this but have not received a specific answer. Was just wondering if anyone did this on iOS?

Is there any Apple documentation that says we can't do this?

0


source to share


2 answers


You cannot set date and / or time on iPhone / iPad programmatically. These APIs are considered protected by Apple. In other words, if you were to use these APIs and submit your application using them, it would be rejected.

Edit



To obtain documentation on this subject, you can contact Apple Developer Technical Support using one of your free technical support cases included with your developer program. LINK

+3


source


As the comments on your posters say, you can't, because although there is an API for this, it is "private" and can only be used by Apple. Thus, if you do this, Apple will reject your app because using private APIs is verboten in the App Store.



There is no alternative solution. You will have to explain to your client that as a third party developer you cannot change system settings, end of story.

0


source







All Articles