Friday 7 December 2012

How to implement this rate alert box?

rocotilos Posts: 3,193iPhone Dev SDK Supporter, Registered Users
image

As u know, this alert pops up when we delete the app.
I want to call this when a user click a button. Any ideas? I checked that Appirater by Arash Payan, but that seems too longwinded.. and kinda complicated to implement.. like the random asking etc.. 

I just want to implement a real simple rating alert box like the above...
anyone made this, or know how, pls share. Thanks.
Post edited by rocotilos on 
 Flag  

Replies

  • kerofrogkerofrog Posts: 63Tutorial Authors, Registered Users
    I don't have the code for this, but, off the top of my head, the steps to create something like this would go along the lines of -

    1. Add 5 UIButton subviews to the UIAlertView (star1, star2, star3, star4, star5)
    2. Each UIButton subview will have a blank star background image when it is not selected, and a highlighted star when it is.
    3. Add a target for each UIButton that points back to a method in your view controller. This way your view controller can handle the touches.

    The rest is easy . If user taps star 5, then select all your star buttons. If the user taps star 2, then deselect every button to the right of star 2. (Note: you would also need a pointer to each of your buttons within your view controller)

    Note: This implementation would probably not push down the bottom part of the UIAlertView, and you would need separate code to increase the height of the UIAlertView and re-center it vertically.
     Flag  
  • TunaNuggetTunaNugget Posts: 973Registered Users
    Uh... I don't think the UI is the tricky part here.
     Flag  
  • iPhoneConnectioniPhoneConnection Posts: 144Registered Users
    This is more than likely a closed API and i'd be cautious about implementing it (if you can find it!) as it could go against the developer agreement.

    Furthermore, iPhone 4.0 is said to have removed (or at least no longer uses) the review dialogue as it has shown to negatively effect app ratings (since users are only asked to review the app when they are deleting it, which is fairly bias).
    iPhoneConnection (part of 57Digital Ltd | Mobile App Developers)



    Visit our blog at UK iPhone Developers or <a hr
     Flag  
  • kerofrogkerofrog Posts: 63Tutorial Authors, Registered Users
    TunaNugget;200944 said:
    Uh... I don't think the UI is the tricky part here.
    Oops, I should have looked at Appirater first. 

    A possible solution for the other part might be:
    1. Create a NSUserDefaults timesAppRun pref and store 0
    2. First time application is run, update this to 1 and store the date in a firstStartDate different pref
    3. Each time the app is launched, increment timesAppRun pref and then check if timesAppRun is greater than 15 or if the current date is more than 30 days larger than the 'firstStartDate'
    4. If it is, and they say yes to rating your app, then send them to your app's review page on the app store.

    Any other part I have missed?
    iPhoneConnection;200948 said:
    This is more than likely a closed API and i'd be cautious about implementing it (if you can find it!) as it could go against the developer agreement.
    I agree with iPhoneConnection. However, I believe a custom implementation would be fine.

    *sigh* this is the business & legal part of the forum, so i should probably remove the code references. Well, someone could always hire me to write a simpler version of Appirater .
     Flag  
  • rocotilosrocotilos Posts: 3,193iPhone Dev SDK Supporter, Registered Users
    hello all,

    thanks for replying.

    the UI part i think is pretty easy to implement. but the mystery is what to call when a user tap that stars.

    i am also aware that latest sdk have deprecated the rate on delete. but i was thinking of custom making it. like calling some url or something..

    not sure.. im trying to see what i can hack about iTunes software... hehe.:eek:
     Flag  
  • kerofrogkerofrog Posts: 63Tutorial Authors, Registered Users
    :eek:... lol, that's what you wanted to know. Well, to hack the iTunes store I'd find an internal Apple Developer, bribe them, and then hack into iTunes. Maybe a good lawyer would be a good idea too... just in case the 'project' falls through .
     Flag  
  • rocotilosrocotilos Posts: 3,193iPhone Dev SDK Supporter, Registered Users


    Actually i want to hack it so that I know what is the command sent when a user clicks a star (after he/she logged in).

    So that i can implement this function. 

    Eventhough ppl wont be rating 1 star during deletion of our app in the latest SDK. But there is also rogue services that does that to competitor apps (as evident by someone advertising those in here).. 

    And a happy user very seldom wants to rate the app, if the way to rate it is so darn longwinded. So providing a short and easy/fast way for happy users to rate would help boost our rating.

    Im just saying... :eek: 
     Flag  
  • rocotilosrocotilos Posts: 3,193iPhone Dev SDK Supporter, Registered Users
    Anyway, anyone else have an idea and know how.. pls reply here thanks..!
     Flag  
  • TambourinTambourin Posts: 1,022Registered Users
    Why show this alert to the user.
    Why not simply rate the app with 5 stars every time the user starts the app 
     Flag  
  • rocotilosrocotilos Posts: 3,193iPhone Dev SDK Supporter, Registered Users
    I just want user to be able to rate very fast. U know.. no need to run iTunes.. browse to our app.. then only click the stars as they see fit.

    Im surprised why there is no API built for this purpose. It would be awesome to call it:

    -(IBACtion)rateMyApp {
        
       UIAlertRateApp  *myrating = [UIAlertRateApp alloc];
       [myrating show];
       [myrating release];
    
    }


    Then just hook up a button to this action. 

    APPLE!!!!
     Flag  
  • Mr JackMr Jack Posts: 395Registered Users
    Any reason you're not using Appirater? Or at least using it as a starting point?
     Flag  
  • fldeweyfldewey Posts: 45Registered Users
    I'm sure Apple would never allow us to send ratings direct from an app. If you could send the rating from your app without having a user go through iTunes, what would stop people from sending 5 star ratings automatically?
     Flag  
  • rocotilosrocotilos Posts: 3,193iPhone Dev SDK Supporter, Registered Users
    fldewey;201394 said:
    I'm sure Apple would never allow us to send ratings direct from an app. If you could send the rating from your app without having a user go through iTunes, what would stop people from sending 5 star ratings automatically?
    I don't mean it like that. Probably I was not so clear.
    What I want is for users to have an instant way to rate when they wish to

    Instead of 
    EXIT APP->OPEN iTUNES->SEARCH APP NAME IN ITUNES->CLICK ON APP ICON TO GOTO APP PAGE->LOGIN->RATE

    It would be
    Tap RateMe Button->LOGIN->RATE

    Hope that clears up about my intention.;)
     Flag  
  • fldeweyfldewey Posts: 45Registered Users
    Okay , sorry I think I misunderstood.

    I use appirater (love the name  ) and it seems to do what you suggest. If I recall correctly you tap rate, it takes you to the rating page of the specific app in question.

    It's been a while since I've played with this code, so I could be WAY off. 
     Flag  
  • iPhoneConnectioniPhoneConnection Posts: 144Registered Users
    rocotilos;201430 said:
    I don't mean it like that. Probably I was not so clear.
    What I want is for users to have an instant way to rate when they wish to

    Instead of 
    EXIT APP->OPEN iTUNES->SEARCH APP NAME IN ITUNES->CLICK ON APP ICON TO GOTO APP PAGE->LOGIN->RATE

    It would be
    Tap RateMe Button->LOGIN->RATE

    Hope that clears up about my intention.;)
    Whats wrong with simply redirecting the user to the iTunes URL? If you open it up in a UIWebView it will fire up the App Store within the iPhone OS and take you to the product page, eg: http://itunes.com/app/app-name-here 
    iPhoneConnection (part of 57Digital Ltd | Mobile App Developers)



    Visit our blog at UK iPhone Developers or <a hr
     Flag  
  • rocotilosrocotilos Posts: 3,193iPhone Dev SDK Supporter, Registered Users
    iPhoneConnection;201454 said:
    Whats wrong with simply redirecting the user to the iTunes URL? If you open it up in a UIWebView it will fire up the App Store within the iPhone OS and take you to the product page, eg: iTunes Storeapp-name-here 
    Yeah I am using this method now, but not Webview. I am using the url execution method which just fired up Safari with my app page to be loaded.
    Its good enough maybe.. but was just wondering if there is an even easier method for users to rate. Im an app buyer myself, so sometimes I can be real lazy to rate esp when u gotta click and wait to load up the itunes page.. and then only tap the stars for rating. If I can be lazy, that means, there are bound to be others who are lazy as me, or even lazier.. and it is a loss if those people really like our apps. 

    Im just sayin... :eek::cool::D

No comments:

Post a Comment