[guide] Rate Us Popup For Buildbox Game

Discussion in 'Buildbox General Discussion' started by smmsud, Sep 10, 2016.

  1. smmsud

    smmsud Boxer

    Joined:
    Jan 16, 2016
    Messages:
    88
    Likes Received:
    27
    Those who dont want to use button for requesting rating you can use a pop up to requesnt users for rating.

    Download
    Download contents from this directory https://github.com/nicklockwood/iRate/tree/master/iRate

    Setup
    To install, just drag the header (.H) file the implementation (.M) file, and the iRate Bundle (for localization) into your project.

    1. Import the header in your AppDelegate: #import "iRate.h"
    2. Add the StoreKit Framework to your project - More on StoreKit from Apple Documentation
    3. Add the following method to your app delegate: + (void)initialize
    4. The properties below can be set in the initialize method, however none of them are required (iRate can automatically find all of this information).
    Properties
    The property below is useful for testing purposes. Set it to YES during testing to make sure the dialog appears properly. When set to YES it will appear immediately on startup disregarding other display settings. Set this to NO for release versions of your app.

    [iRate sharedInstance].previewMode = NO;
    The appStoreID property allows you to set the ID of your app. This is only required if you have both Mac and iOS apps with the same Bundle Identifier. The App ID set here must also match the Bundle ID set in Xcode and iTunes Connect:

    [iRate sharedInstance].appStoreID =555555555;
    More Details
    Full documentation in the iRate files details all available properties, delegates, and methods. Here is an image of the final product:

    [​IMG]


    Credit: Stackoverflow.
     
    AndyG, calmackay79 and jigglybean like this.
  2. jigglybean

    jigglybean Avid Boxer

    Joined:
    Nov 3, 2015
    Messages:
    270
    Likes Received:
    125
    Awesome find!
     
  3. calmackay79

    calmackay79 Boxer

    Joined:
    Dec 20, 2015
    Messages:
    78
    Likes Received:
    150
    This looks very handy - Thank you
     
  4. ramiucef

    ramiucef Avid Boxer

    Joined:
    Oct 3, 2015
    Messages:
    373
    Likes Received:
    177
    Any video tutorial ?
     
  5. smmsud

    smmsud Boxer

    Joined:
    Jan 16, 2016
    Messages:
    88
    Likes Received:
    27
    after implementation i will post one. :) cheerz
     
  6. mxstudios

    mxstudios Boxer

    Joined:
    Aug 30, 2016
    Messages:
    51
    Likes Received:
    13
    @smmsud,

    Did you actually implement it? It doesn't work out of the box. You need to add the following to the AppController.mm below the @synthesize viewController;

    @synthesize window;

    For some reason, BuildBox's implementation of the delegate does not include it. iRate needs it in order to access the root view controller.

    Here is screenshot:

    Screen Shot 2016-09-10 at 11.20.55 AM.png

    Once I figured that out, the whole process took about 5 minutes.

    I use this with my other non-BuildBox apps, and had planned to implement it. NIce Find!

    Greg
     
    JoeWilson and smmsud like this.
  7. smmsud

    smmsud Boxer

    Joined:
    Jan 16, 2016
    Messages:
    88
    Likes Received:
    27
    hey buddy! I am trying for the past 3 hours. I posted so that others can also contribute to this method. I implemented without any error. But at the time of loading of the game my game freezes with a crash report. Did you implemented it successfully??
     
  8. smmsud

    smmsud Boxer

    Joined:
    Jan 16, 2016
    Messages:
    88
    Likes Received:
    27

    Hey mate! You edit works awesome. But it seems like the app rating request is triggering at the start of the game. Will be a great hack if we can show it in the game over screen. :)
     
  9. mxstudios

    mxstudios Boxer

    Joined:
    Aug 30, 2016
    Messages:
    51
    Likes Received:
    13
    That's the way these ratings scripts work. It's based on number of days or opens. You might be able to do that something using the custom ad hook. I've been playing with it today. Problem is I am trying to identify which screen it was called from.
     
    smmsud likes this.
  10. smmsud

    smmsud Boxer

    Joined:
    Jan 16, 2016
    Messages:
    88
    Likes Received:
    27

    This is acually a short code
    [iRatesharedInstance].previewMode = YES;

    We can call it in whereever we want , but to do that, we need to inclue the iRate.h header file.
    It will be much better if we can know which file contains the code of a game over screen, so that we can add this code. This code is a win win thing.
     
  11. mxstudios

    mxstudios Boxer

    Joined:
    Aug 30, 2016
    Messages:
    51
    Likes Received:
    13
    You don't want to use that though because it will show every single time a game is over. It's for testing. There might be a different call. I think if they click remind me later or leave me alone, it will still pop up. Test it.

    I am currently working on how to show on game over scene. I know how to show at end of ALL scenes, but trying to identify which one. I am using the Custom Interstitial hook, which doesn't easily tell you where it was called from I believe.
     
  12. smmsud

    smmsud Boxer

    Joined:
    Jan 16, 2016
    Messages:
    88
    Likes Received:
    27

    Sorry I meant to write the other code, are you seeing success when calling the code through custom intersitital hook?
     
  13. mxstudios

    mxstudios Boxer

    Joined:
    Aug 30, 2016
    Messages:
    51
    Likes Received:
    13
    Yes. We can call any code we want when any screen that has interstitial is set to custom.
    I was already working on it this morning trying to connect some custom analytics. Again, the only challenge is knowing which screen it was called from in the showCustomFullScreen method.
     
  14. smmsud

    smmsud Boxer

    Joined:
    Jan 16, 2016
    Messages:
    88
    Likes Received:
    27
    @Andy Desperately seeking code support on this hack :(
     
  15. smmsud

    smmsud Boxer

    Joined:
    Jan 16, 2016
    Messages:
    88
    Likes Received:
    27
    Hey mate, did you get success?
     
  16. mxstudios

    mxstudios Boxer

    Joined:
    Aug 30, 2016
    Messages:
    51
    Likes Received:
    13
    Yes... I am writing it up. Had to hack into the BB library in order to get the name of the screen that it is called from. Finally figured it out.
    Will post details shortly.
     
  17. gashigashi

    gashigashi Avid Boxer

    Joined:
    Jul 8, 2016
    Messages:
    137
    Likes Received:
    9
    Can you tell me this trick also work on google play ?
     
  18. mxstudios

    mxstudios Boxer

    Joined:
    Aug 30, 2016
    Messages:
    51
    Likes Received:
    13
    deenasty likes this.

Share This Page