I have put a rate system in my code but for some reason didn't work... I get the an error... someone can help me or post a rate system?
I will post my code that I have copy from another template:
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
I have put a rate system in my code but for some reason didn't work... I get the an error... someone can help me or post a rate system?
I will post my code that I have copy from another template:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | local itunesID = xxxxxx -- I have put my itunesID here -- ask to rate the game if it's the 4th time opening the app local ratingData = loadValue( "rating.data" ) if ratingData == "0" then --> file didn't exist yet, first time opening saveValue( "rating.data", "1" ) elseif ratingData == "1" then --> 2nd time opening saveValue( "rating.data", "2" ) elseif ratingData == "2" then --> 3rd time opening saveValue( "rating.data", "3" ) elseif ratingData == "3" then --> 4th time opening; show the popup asking to rate, dismiss, or don't show again local onRatingComplete = function( event ) if "clicked" == event.action then local i = event.index if 3 == i then -- Do nothing from user's perspective, make sure it doesn't show again saveValue( "rating.data", "10" ) elseif 2 == i then -- Do nothing; dialog will simply dismiss saveValue( "rating.data", "0" ) -- reset back to 0 elseif 1 == i then -- First, make sure dialog won't show anymore and then open app store link saveValue( "rating.data", "10" ) local itmsURL = "itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsuserReviews?type=Purple+Software&id=" .. itunesID system.openURL( itmsURL ) end end end -- Show alert with five buttons local ratingAlert = native.showAlert( "Will you rate this wonderfull game?", "", { "Rate This Game", "Remind Me Later", "No, Thanks" }, onRatingComplete ) end |
more specific
I get this error when I try to rating ( when is opening the app store )
"Could not connect to itunes store"
Have a look at the class I had provided long ago here . It has been derived from and there are quite a few versions.
cheers,
?:)
@Dhennrich
Are you sure your phone is connected to the internet? And that the app id you are using is live on the app store at present?