I have a method that needs to be called the first time the user runs the app (starts or returns the app from background) in a month?
What is the best way to do this ? (it’s an iOs app)… I’m guessing it’s in the delegate that this needs to be called
I have a method that needs to be called the first time the user
Share
Use
NSUserDefaultsto store the last time the method was called and compare that against the current date and call if it’s the first time that month (or if there’s no stored value, i.e., first time ever). Once the call has been successful, update the saved time.