这是我使用的代码:
-(voID)applicationWillEnterForeground:(UIApplication *)application{ NSUserDefaults *times=[NSUserDefaults standardUserDefaults]; int test=[[times objectForKey:@"time"]intValue]; NSLog(@"test..:%d",test); if (test >=5) { [iRate sharedInstance].applicationBundleID = @"com.01Synergy"; [iRate sharedInstance].onlyPromptIfLatestVersion = NO; //enable prevIEw mode [iRate sharedInstance].previewmode = YES; }}- (voID)applicationDIDEnterBackground:(UIApplication *)application { NSUserDefaults *times=[NSUserDefaults standardUserDefaults]; int time=[[times objectForKey:@"time"]intValue]; if (time<5) { time++; [times setInteger:time forKey:@"time"]; }}解决方法 我不熟悉iRate,我经常使用 Appirater.它是非常容易实现.简单通话
[Appirater setAppID:@"380245121"]; // Change for your "Your APP ID"[Appirater setDaysUntilPrompt:0]; // Days from first entered the app until prompt[Appirater setUsesUntilPrompt:5]; // Number of uses until prompt[Appirater setTimeBeforeReminding:2]; // Days until reminding if the user taps "remind me"//[Appirater setDeBUG:YES]; // If you set this to YES it will display all the time
让用户在第五次进入应用程序后显示!
说你已经做了[Appirater setUsesUntilPrompt:5]和[Appirater setDaysUntilPrompt:2],这意味着从第一个应用程序条目的时间必须是2天(或更多)和应用程序使用次数(应用程序进入前台/推出)必须是5倍(或更多).
您的目的代码示例:
- (BOol)application:(UIApplication *)application dIDFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [Appirater setAppID:@"380245121"]; // Change for your "Your APP ID" [Appirater setDaysUntilPrompt:0]; // Days from first entered the app until prompt [Appirater setUsesUntilPrompt:5]; // Number of uses until prompt [Appirater setTimeBeforeReminding:2]; // Days until reminding if the user taps "remind me" //[Appirater setDeBUG:YES]; // If you set this to YES it will display all the time //... Perhaps do stuff [Appirater appLaunched:YES]; return YES;}- (voID)applicationWillEnterForeground:(UIApplication *)application{ [Appirater appEnteredForeground:YES];}
如果您的应用在App Store上,您可以在URL中找到应用ID:
如果尚未发布,您可以通过访问iTunes Connect – >>>点击“管理您的应用” – >>点击你的应用程序你的应用程序ID将在这里看到
希望有帮助!
总结以上是内存溢出为你收集整理的在iOS中为此应用评分全部内容,希望文章能够帮你解决在iOS中为此应用评分所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)