Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 35    Views: 2278

tonycelestino
Aspiring developer
Profile
Posts: 213
Reg: Jun 24, 2011
Maceio
4,080
buzztouch member
03/08/12 08:24 PM (2 years ago)

Appirater - Remember your users to Rate your App (iOS)

I saw that @mitchellapps posted a similar tutorial but it uses a different approach and I think Appirater has a more active support and it can be easily localized.

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.

I think this is my first tut here on BT, so please be nice and don't be lazy. Its a VERY simple modification and even beginners can do this if they put some effort.
 
teqbean
Code is Art
Profile
Posts: 119
Reg: Jan 01, 2012
Atlanta, GA
3,340
buzztouch member
like
03/08/12 08:50 PM (2 years ago)
Thanks, I was just getting ready to work on this as soon as I finish Parse. You have now made it much simpler I think.
 
mitchellapps
Aspiring developer
Profile
Posts: 170
Reg: Aug 15, 2011
St. Louis
4,300
buzztouch member
like
03/08/12 11:41 PM (2 years ago)
Nice!
 
mysps
Code is Art
Profile
Posts: 1903
Reg: May 14, 2011
Palma
31,530
buzztouch member
like
03/09/12 03:08 AM (2 years ago)
Thanks! I actually ran into this wednesday while traveling. I'm going to change the other bc I like the easy localization implementation.

It is noted that it requires minimum iOS minimum 4.0
 
mutzy
Aspiring developer
Profile
Posts: 696
Reg: Nov 03, 2010
Syracuse, NY
8,410
buzztouch member
like
03/09/12 05:25 AM (2 years ago)
This looks awesome!

Quick question... I don't see the CFNetwork framework in my project. I even re-downloaded it to make sure I had the most current version. Is it necessary? Thanks!

Josh
 
tonycelestino
Aspiring developer
Profile
Posts: 213
Reg: Jun 24, 2011
Maceio
4,080
buzztouch member
like
03/09/12 05:29 AM (2 years ago)
Hi @Mutzy, I think its in there somewhere because the RSS feature on BT needs it as well. It might not be on the framework group/folder, but its there!

Have you build it, did it show any error/warnings related to this framework? If it didn't, you're fine!
 
tonycelestino
Aspiring developer
Profile
Posts: 213
Reg: Jun 24, 2011
Maceio
4,080
buzztouch member
like
03/09/12 05:42 AM (2 years ago)
BTW... I have tested this only with iOS 4.3 and 5.0 on both iPhone 4 and iPad 1.
 
MQCMobile
Lost but trying
Profile
Posts: 85
Reg: Feb 13, 2011
Oklahoma
5,950
buzztouch member
like
03/10/12 07:40 PM (2 years ago)
This is a great How To. Have you thought about submitting it to the gang a BT for the How To Help section? It might be easier for all to find and utilize.
 
tonycelestino
Aspiring developer
Profile
Posts: 213
Reg: Jun 24, 2011
Maceio
4,080
buzztouch member
like
03/12/12 05:04 PM (2 years ago)
Good idea MQCMobile... I'm just too lazy to make it into a PDF file. :-P

But I'll eventually do it, if the BT guys ask me to.
 
teqbean
Code is Art
Profile
Posts: 119
Reg: Jan 01, 2012
Atlanta, GA
3,340
buzztouch member
like
03/15/12 09:16 AM (2 years ago)
Just added it to two apps. Works great! Thank you!!!
 
MQCMobile
Lost but trying
Profile
Posts: 85
Reg: Feb 13, 2011
Oklahoma
5,950
buzztouch member
like
03/15/12 09:22 AM (2 years ago)
@tonycelestino (or anyone else) think it would be possible to turn this into a plugin?
 
tonycelestino
Aspiring developer
Profile
Posts: 213
Reg: Jun 24, 2011
Maceio
4,080
buzztouch member
like
03/15/12 11:50 AM (2 years ago)
Hi @MQCMobile, I'm not sure, but I don't think so because we need to add some code into the appDelegate .h and .m files.

Maybe we could all ask the Almighty @David to add this bit of code at the core of the iOS BT bundle. It would be cool if we could have an option at BT CPanel to turn it on/off and to set the options described on step 5.
 
Bonzo
Apple Fan
Profile
Posts: 586
Reg: Jan 30, 2012
Hampshire, ENGL...
11,560
buzztouch member
like
03/16/12 04:25 AM (2 years ago)
I followed this and seem to be getting 20+ errors across appirate.m and .h

Seem to be semantic or parse issues and most are "use of undeclared identifier 'UIAlertView'

Anyone else see this.

I've double and triple checked the code I copied and looks good
 
mutzy
Aspiring developer
Profile
Posts: 696
Reg: Nov 03, 2010
Syracuse, NY
8,410
buzztouch member
like
03/22/12 08:05 AM (2 years ago)
despite my best efforts I just CAN NOT get this to work, I keep getting these two match-o linker errors. This is what it says in x code:

Ld /Users/mutzy94/Library/Developer/Xcode/DerivedData/erres-grmzzgapouavlvggjbdvtxfsdndc/Build/Intermediates/erres.build/Debug-iphoneos/erres.build/Objects-normal/armv6/erres normal armv6
cd "/Users/mutzy94/Desktop/iphone apps/ERres"
setenv IPHONEOS_DEPLOYMENT_TARGET 3.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk -L/Users/mutzy94/Library/Developer/Xcode/DerivedData/erres-grmzzgapouavlvggjbdvtxfsdndc/Build/Products/Debug-iphoneos "-L/Users/mutzy94/Desktop/iphone apps/ERres/BT_Objects/TwitterOAuth/SAOAuthTwitterEngine" "-L/Users/mutzy94/Desktop/iphone apps/ERres/BT_Objects/TwitterOAuth/SAOAuthTwitterEngine" -F/Users/mutzy94/Library/Developer/Xcode/DerivedData/erres-grmzzgapouavlvggjbdvtxfsdndc/Build/Products/Debug-iphoneos "-F/Users/mutzy94/Desktop/iphone apps/ERres/BT_Objects" -filelist /Users/mutzy94/Library/Developer/Xcode/DerivedData/erres-grmzzgapouavlvggjbdvtxfsdndc/Build/Intermediates/erres.build/Debug-iphoneos/erres.build/Objects-normal/armv6/erres.LinkFileList -dead_strip -miphoneos-version-min=3.0 -framework CFNetwork -framework SystemConfiguration -lxml2.2 -framework CoreAudio -framework CoreLocation -framework Foundation -weak_framework UIKit -framework MobileCoreServices -framework AVFoundation -weak_framework MessageUI -lOAuth -framework MapKit -weak_framework MediaPlayer -framework CoreGraphics -framework QuartzCore -weak_framework iAd -o /Users/mutzy94/Library/Developer/Xcode/DerivedData/erres-grmzzgapouavlvggjbdvtxfsdndc/Build/Intermediates/erres.build/Debug-iphoneos/erres.build/Objects-normal/armv6/erres

Undefined symbols for architecture armv6:
"_OBJC_CLASS_$_Appirater", referenced from:
objc-class-ref in erres_appDelegate.o
ld: symbol(s) not found for architecture armv6
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any ideas? I have the necessary frameworks and I added all the code exactly as instructed. I've tried googling this and making changes here and there, playing around with my libraries and frameworks, keep getting this error. Any help would be GREATLY appreciated.

Josh
 
tonycelestino
Aspiring developer
Profile
Posts: 213
Reg: Jun 24, 2011
Maceio
4,080
buzztouch member
like
03/22/12 08:09 AM (2 years ago)
Hey @Mutzy, what iOS deployment version is set in your xcode?

I've only tested this with 4.3 and 5+. I'm not sure it will work with older iOS versions.
 
teqbean
Code is Art
Profile
Posts: 119
Reg: Jan 01, 2012
Atlanta, GA
3,340
buzztouch member
like
03/22/12 08:11 AM (2 years ago)
The minimum required OS for AppiRater is 4.0. You would need to change that setting in xcode from 3.0 to 4.0.
 
tonycelestino
Aspiring developer
Profile
Posts: 213
Reg: Jun 24, 2011
Maceio
4,080
buzztouch member
like
03/22/12 08:11 AM (2 years ago)
I think that some of the frameworks added are not compatible with older iOS versions. If you really need to support older versions you will have to weak link them to your project. Don't ask me how! :D
 
tonycelestino
Aspiring developer
Profile
Posts: 213
Reg: Jun 24, 2011
Maceio
4,080
buzztouch member
like
03/22/12 08:13 AM (2 years ago)
@teqbean is right... forget about weak link. If you want to use Appirater set your deployment to iOS 4 or greater.
 
mutzy
Aspiring developer
Profile
Posts: 696
Reg: Nov 03, 2010
Syracuse, NY
8,410
buzztouch member
like
03/22/12 08:18 AM (2 years ago)
I've tried setting my deployment to iOS 4.0 and even 5.0... same problem.
 
teqbean
Code is Art
Profile
Posts: 119
Reg: Jan 01, 2012
Atlanta, GA
3,340
buzztouch member
like
03/22/12 08:22 AM (2 years ago)
I see from looking at your error you need to add the ARMv6 architecture to your architecture. Right now, based on the error, it looks like you are only targeting ARMV7.
 
tonycelestino
Aspiring developer
Profile
Posts: 213
Reg: Jun 24, 2011
Maceio
4,080
buzztouch member
like
03/22/12 08:25 AM (2 years ago)
Don't worry @mutzy, Google will show us the path...

Try this:
http://stackoverflow.com/questions/5403575/undefined-symbols-for-architecture-armv6-updating-to-ios-4-3

Let me know if this worked! =P
 
Absentia
buzztouch Evangelist
Profile
Posts: 927
Reg: Oct 20, 2011
Alaska
20,270
buzztouch member
like
05/23/12 12:54 PM (2 years ago)
Like bonze said, I am getting about 20 semantic and parse errors with the appirater.h and .m files - all of them seem to have something to do with UIAlertView being an undeclared identifier.
Any ideas what the problem is?

This stuff drives me crazy - I know I followed the tutorial perfectly. You guys have used this on buzztouch apps right?
 
Absentia
buzztouch Evangelist
Profile
Posts: 927
Reg: Oct 20, 2011
Alaska
20,270
buzztouch member
like
05/23/12 01:55 PM (2 years ago)
Ah I figured it out

I don't know about everyone else, but I had to add #import ''My_App_Name_appDelegate.h'' to the appirater.h file to get it working.

works perfect now..thanks for the tutorial!
 
Red Dog
buzztouch Evangelist
Profile
Posts: 659
Reg: Jun 16, 2011
Southern Califo...
17,340
buzztouch member
BuzzDay San Diego 2014
BuzzCon14
like
10/16/12 08:16 PM (2 years ago)
In case anyone is still following this post, here are instructions I made for installing the latest Appirater sdk;


http://buzz10.x10.mx/buzz10/Installing%20Appirater%20in%20your%20BT_app.pdf
 
LeonG
Apple Fan
Profile
Posts: 508
Reg: Nov 08, 2011
Hamburg
15,880
buzztouch member
like
10/22/12 05:00 AM (2 years ago)
Thx for this!
 
Jerry
Aspiring developer
Profile
Posts: 51
Reg: Aug 07, 2012
Dallas
3,160
buzztouch member
like
11/04/12 01:56 PM (2 years ago)
@ red dog.


thank you. you saved me a couple of hours of debugging ....
 
Kahuna
Apple Fan
Profile
Posts: 136
Reg: Nov 18, 2011
Milan
4,660
buzztouch member
like
11/06/12 06:08 AM (2 years ago)
Hi, thanx for your guide.
I tried to implement it this morning, but I kept getting errors related to the "Appiraterdelegate.h"
Do I have to import that file too?
Thank you
 
Kahuna
Apple Fan
Profile
Posts: 136
Reg: Nov 18, 2011
Milan
4,660
buzztouch member
like
11/06/12 06:51 AM (2 years ago)
Well, it seems that they changed the appirater classes in october.
Could anyone please send me the previous files (.h and .m) to imetroapp (at) gmail (dot) com?
Thank you in advance
 
Jerry
Aspiring developer
Profile
Posts: 51
Reg: Aug 07, 2012
Dallas
3,160
buzztouch member
like
11/10/12 10:54 PM (2 years ago)
Kahuna,

Do you still need the .h and the .m files?
 
Kahuna
Apple Fan
Profile
Posts: 136
Reg: Nov 18, 2011
Milan
4,660
buzztouch member
like
11/11/12 04:11 AM (2 years ago)
Thank you for your message BRisor. I implemented iRate and it worked well.
I'll be using it in my BT 2.0 apps.
 
HelperDev
Lost but trying
Profile
Posts: 49
Reg: Nov 16, 2012
New York
3,090
buzztouch member
like
02/18/13 04:48 PM (1 year ago)
Will you use this, thanks. How to implement with android?
 
mleonard
Apple Fan
Profile
Posts: 121
Reg: Nov 01, 2011
Conway,AR
1,910
buzztouch member
like
04/27/13 03:15 PM (1 year ago)
Hey guys, I've got everything working in Debug mode, but my only problem is I cannot hit "cancel" after selecting that I would like to rate the app.

So the only way to exit is to force quit the app and restart. Any ideas?
 
mleonard
Apple Fan
Profile
Posts: 121
Reg: Nov 01, 2011
Conway,AR
1,910
buzztouch member
like
04/27/13 04:25 PM (1 year ago)
If I disable my revmob banner...then it works properly. They seem to be conflicting for some reason.
 
mrDavid
buzztouch Evangelist
Profile
Posts: 3739
Reg: May 21, 2011
Edinboro, PA
49,940
buzztouch member
BuzzDay San Diego 2014
BuzzCon14
CodeCamp14
like
05/07/13 08:21 AM (1 year ago)
Hey guys,

Could someone please take a look at this bug I found with appirater and Scringo? I really need this fixed soon but I can't figure it out!

https://www.buzztouch.com/forum/thread.php?tid=504706E9E97638708414C20

Thanks!

David
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 371
Reg: Feb 15, 2012
Montreal
10,710
buzztouch member
like
01/29/14 10:02 PM (10 months ago)
Hey everyone!

I don't mean to hijack this thread, but has anyone tried integrated the latest version of Appirater with their BT 2.0 app? The latest version is 2.0.2 and I've followed the steps posted above with little success.

Actually, Appirater seems to work as it should in the simulator, but when I use the app on my actual iPhone, I don't receive a prompt despite debug being on.

Any help would be greatly appreciated! :)

Thanks!!

Nicholas
 
GraciousWolf_PE
Aspiring developer
Profile
Posts: 371
Reg: Feb 15, 2012
Montreal
10,710
buzztouch member
like
01/29/14 11:28 PM (10 months ago)
After some tweaking, Appirater works just fine!

Thanks anyways, BT community! :)

Nicholas
 

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.