@user3386109 is probably right here. You're calling checkForAuthenticationTimerRun
in the success block where you probably mean to call checkForAuthenticationSetTimer
. You're seeing it run once because you're calling the checkForAuthenticationTimerRun
method directly (not from the timer).
Using better names may help you avoid problems like this in the future. For example, in this case, I would call the timer checkForAuthenticationTimer
, and use three methods:
- (void)makeCheckForAuthenticationTimer
- (void)killCheckForAuthenticationTimer
- (void)checkForAuthenticationTimerFired:(NSTimer*)timer
Then each method is clear and clearly linked to the timer variable. Note also the checkForAuthenticationTimerFired
method takes the timer as a parameter. This lets you verify that the correct timer fired.