ToyRatePromptHandler.h 800 Bytes
//
//  ToyRatePromptHandler.h
//  SteveandMaggieToyApp
//
//  Created by Katarzyna Kalinowska-Górska on 10/09/2020.
//

#ifndef ToyRatePromptHandler_h
#define ToyRatePromptHandler_h

#include <stdio.h>

// Only after we've hit CounterValue in our Counter, presentRatePromptIfApplicable will take effect.

#define ToyRatePromptHandler_CounterValue 3 // This many countUp events are necessary to show the prompt -> place them when the app is open, when a game is won etc. - according to your needs

class ToyRatePromptHandler {
public:
    static void countUp();
    static bool presentRatePromptIfApplicable();
    
private:
    static const char* RATE_PROMPT_HANDLER_COUNT_UD_KEY;
    static int getCounterValue();
    static void setCounterValue(int value);
};

#endif /* ToyRatePromptHandler_h */