Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 10    Views: 160

stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
03/10/12 07:18 PM (13 years ago)

Link to app in itunes

I have a published app and would like to add a menu item to rate the app. In the menu is a htm file which has a link to the web site http://itunes.apple.com/us/app/peds-oph/id500954396?mt=8 If I enter this url in Safari, it opens the page and then I click on "open in itunes" to get to a page where I can rate the app. (BTW if anyone can tell me a better way to do this please do). However, when I run the simulator and click on the link, I get a message that says Open iTunes? So already I'm getting unexpected results - I figure it would open Safari and get me to the page. If I say yes to Open ITunes, Safari opens but I get a message that the address is invalid. Can anyone explain these two unexpected results? Thanks. Steve
 
Skyr0s
Code is Art
Profile
Posts: 196
Reg: Jan 26, 2012
Hong Kong
4,310
like
03/10/12 07:29 PM (13 years ago)
Hi, Myself, I have never tried to request rating, but there has been a previous post on how-to. The following explanations bring a pop-up message box similar to native iOS apps: Tutorial: 1 - Download source code from https://github.com/arashpayan/appirater 2 - Copy the files to your project (only the .h and .m files are required, the other files are optional) 3 - Add CFNetwork and SystemConfiguration frameworks (They are added by default on BT 1.5) 4 - Open xxx_appDelegate.m and make the following changes: 4.1 - Add #import "Appirater.h" (I'm not telling you where to add this, come on!!!) 4.2 - At the end of the didFinishLaunchingWithOptions method before the "return TRUE;" add the following line (don't forget the ; at the end): [Appirater appLaunched:YES]; 4.3 - Right after the didFinishLaunchingWithOptions method add another method as following: //Appirater Entered Foreground -(void)applicationWillEnterForeground:(UIApplication *)application{ [Appirater appEnteredForeground:YES]; } 4.4 - Congratulations, you are done tweaking BT source code!!! Now lets configure the Appirater code... 5 - Open the Appirater.h file that you copied to your project. This file is very well commented, but if you are rrreeeeallllyyyy lazy I will show you the most important options: 5.1 - Enter your iTunes Connect App ID at the #define APPIRATER_APP_ID line. 5.2 - APPIRATER_DAYS_UNTIL_PROMPT - number of days the user will have to have your app installed before prompting, anything from 10 to 20 should be fine. 5.4 - APPIRATER_USES_UNTIL_PROMPT - number of times a user has to use your app before they get prompted to rate it, anything from 5 to 10 should be fine. 5.5 - APPIRATER_TIME_BEFORE_REMINDING - If the user taps the "Remind me later" options thats the amount of days the app will wait to prompt the user again. I like to use 1 or 2. 6 - To localize it to any language all you need to do is create a localization for your project (I'm not covering this), add the following strings and change the second part of each string: /* Appirater */ "If you enjoy using %@, would you mind taking a moment to rate it? It won't take more than a minute. Thanks for your support!" = "If you enjoy using %@, would you mind taking a moment to rate it? It won't take more than a minute. Thanks for your support!"; "Rate %@" = "Rate %@"; "No, Thanks" = "No, Thanks"; "Remind me later" = "Remind me later"; 7. Debugging: 7.1 At the Appirater.h file search for APPIRATER_DEBUG, it's set to NO by default but if you want to test/debug you can set it to YES and it will show you the alert everytime you open the app. 7.2 !IMPORTANT! Remember to set it to NO before submitting your app to the App Store. ALL Credit granted to celestino who found / wrote this tutorial a day ago. I hope this helps you
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/11/12 10:53 AM (13 years ago)
Steve, I think I understand what you're trying to do. What I do for my apps is create a menu item like you did but instead of html file I choose the "open native application" screen. Then for my data string I put the following: https://userpub.itunes.apple.com/WebObjects/MZUserPublishing.woa/wa/addUserReview?id=413192645&type=Purple Software Just change the id number in the above link to your apps ID number on iTunes Connect. Then, when you click on that menu option, it will eventually open up the app store to the review screen for your app. Good luck! Josh
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
03/11/12 11:15 AM (13 years ago)
Josh, Which native app do you choose - browser or app store? Steve
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/11/12 11:28 AM (13 years ago)
I think I chose browser, not sure if it really matters.
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
03/11/12 11:31 AM (13 years ago)
And if I choose browser, it opens Safari on the simulator and but tells me it couldn't open page because address is invalid, yet if I just go to Safari on my mac and put in same address, it opens it fine. Why doesn't it work on the simulator?
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/11/12 11:34 AM (13 years ago)
when you click on that link on your phone it first opens the itunes app then redirects to the app store app. neither of those apps are on the simulator so it doesn't work. Try it on your device, should work fine.
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
03/11/12 11:47 AM (13 years ago)
No go - the phone gets further, past safari and then it seems into itunes but then i get a message "cannot connect to Itunes store" And yet, in Safari on the mac it connects just fine. Any ideas?
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/11/12 12:00 PM (13 years ago)
No idea, works fine on my phone. You have a good internet connection on your phone? Not sure why it's not working.
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
03/11/12 12:13 PM (13 years ago)
No, connection good and if i type the exact copy of the link in phone's safari browser, it opens the review page. Just doesn't work from app. Hope someone out there in BuzzTouch land has an idea. Thanks for all your help mutzy
 
stevek
Aspiring developer
Profile
Posts: 808
Reg: Dec 24, 2011
great neck
8,080
like
03/11/12 12:16 PM (13 years ago)
What's also weird is that after i click OK to the message that it can't connect to the itunes store, i'm in itunes, with a blank page but the usual icons on the bottom (s=music, video, search, etc) and if I click one of them it goes to the page as if nothing was wrong.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.