在iOS中为此应用评分

在iOS中为此应用评分,第1张

概述我已经使用 iRate类来添加’rate我的应用程序’功能.我已经添加了我的应用程序包ID.但是当我运行应用程序时,显示“无法连接到iTunes Store”.请帮我找出问题. 这是我使用的代码: -(void)applicationWillEnterForeground:(UIApplication *)application{ NSUserDefaults *times=[NSUse 我已经使用 iRate类来添加’rate我的应用程序’功能.我已经添加了我的应用程序包ID.但是当我运行应用程序时,显示“无法连接到iTunes Store”.请帮我找出问题.

这是我使用的代码:

-(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中为此应用评分所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1095672.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-28
下一篇 2022-05-28

发表评论

登录后才能评论

评论列表(0条)

保存