Ansca Mobile Corona SDK
 

This tutorial will show you how to add a “rate it” button to your iPhone app using Corona.

This is one of the easiest things you can possibly add to your app but I have found it does make an impact on the number of ratings and reviews you get over time.

Here’s what my button looks like in Happy Doodle Sushi Smile -

Now, to add your own button you are going to want to follow the VERY basic instructions below;

STEP ONE: Create an image for your button and whack that in your project folder.

STEP TWO: Even though your application hasn’t been submitted yet (unless this is an update) if you have created it in iTunes Connect it will still have an App ID. Get that and keep it handy for a minute.

STEP THREE: Open your main.lua file or if you are using multiple scenes/screens thanks to director, (I have a tutorial for that if anyone needs it, I’m not linking to it right now because I’m lazy. It’s here, though,) open your menu.lua or whatever you are using for your main menu – then place this code above or below your other buttons, such as Start, OpenFeint or what have you;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
local ratebutton = display.newImage ("rateit.png")
ratebutton.x = 164
ratebutton.y = 390
localGroup:insert(ratebutton)
--> Adds the Rate It button

local function doRating(event)
if event.phase == "ended" then
local url = "itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa"
url = url .. "/wa/viewContentsUserReviews?"
url = url .. "type=Purple+Software&id="
url = url .. "404532572"

system.openURL(url)
end
end

ratebutton:addEventListener("touch", doRating)
--> Adds the Rate It functionality. Be sure to change the APP ID to your OWN; right now it's mine so you can see a working example if you like, but obviously in your own app you'll want it to go to the app's rating/review page!

It is that easy!

Using the text above you will have a button that goes directly to the rate/review page for your app, very convenient!

As usual, any questions or comments just let me know here in the comments section, on Facebook if I’m your FB Buddy (lol) or on Twitter if you are one of the people who’s been kind enough to follow me. ^-^;

Peach Pellen :)

PS – I’m going to be busy, busy, busy this week with cleaning my house for Christmas, doing Christmas shopping tomorrow, (you’d think it’d be faster when you’re a poor person but it’s not, it takes twice as long to sniff out bargains that still make nice little gifts for loved ones,) sorting out the aircon on Thursday, going to the dentist and a whole lot of other things. My points in that little rambling, run on sentence was that you likely wont see another tutorial this week but that I plan to do one next week – I don’t know what on yet – I was thinking music/sound on/off – but we’ll see. Hit me up if you have a suggestion.

In December I also hope to start on what I’ll probably call my “Corona For Noobs” mini series which will have, hopefully, a whole lot of handy info to help a few folks I know who are looking to move into Corona and Lua but are currently feeling a bit lost and unsure about where to start. Stay tuned!

Like this post? Subscribe to the monthly newsletter!

 

  51 Responses to “How To Add A “Rate It” Button To Your iPhone App”

  1. Honestly Dave, I have no idea. We discussed this on the forum recently too. It’s just how it is. (I’ve wondered if it was a way to differentiate between apps, videos and music but that still seems odd to me.)
    So, I can’t tell you – I just know it’s how it’s done. Sorry!

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.

   
Ansca Mobile Corona SDK
© 2012 Techority Suffusion theme by Sayontan Sinha