Appirater是一段你可以嵌入自己工程中的代碼,在用戶使用應用一段時間后會自動彈出提示用戶進行評分。
使用Appirater方面,你可以簡單把源代碼嵌入你的app工程中,並把以下代碼添加至它的委托類中:
#pragma mark 應用評分
[Appirater setAppId:kAppId];//程序的ID
[Appirater setDaysUntilPrompt:7];//多少天后開始提示評價
[Appirater setUsesUntilPrompt:5];//多少次運行后開始提示評價
[Appirater setSignificantEventsUntilPrompt:-1];//重要的時間多少次后開始提示評價
[Appirater setTimeBeforeReminding:2];//當用戶點擊“稍后評價”后多少天開始提示評價
[Appirater setDebug:NO];//
[Appirater appLaunched:YES];
1、將Appirater.h和Appirater.m拷貝到項目中
2、在項目中添加CFNetwork.framework和SystemConfiguration.framework
3、在application:didFinishLaunchingWithOptions:的最后加上以下代碼:
[Appirater appLaunched:YES];
4、在applicationWillEnterForeground:中添加以下方法:
[Appirater appEnteredForeground:YES];
參考文章:http://www.cnblogs.com/fengmin/p/5190139.html