I have no idea How to change system date time before launch test on real devices or simulator. Could you help me?
I don't think you can actually change the system time. What you can do is provide your own class that returns dates and use it everywhere in place of the Date class. In your custom class you will be able to choose to return either your test time or system time, depending on if you are testing or not.
If you do this, your in-app code would read something like let now = CustomDate() instead of let now = Date().
This question does already have an answer for Objective-C here: Set iPhone date/time within app for testing purposes?.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With