我使用了iRate类来添加“评价我的应用程序”功能。我已经添加了我的应用程序包 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"];
}
}