我创建了一个测试项目来测试admob并了解如何使用它但是当我构建项目时,当我尝试将admob添加到我的项目中时,我得到了11个苹果机器人链接器错误(Xcode 4.3.3)
h文件是oke,这里是M文件(代码取自admob knowlage base)
#import "chViewController.h"
#define MY_BANNER_UNIT_ID @"my id is written in here"
@interface chViewController ()
@end
@implementation chViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad {
[super viewDidLoad];
// Create a view of the standard size at the top of the screen.
// Available AdSize constants are explained in GADAdSize.h.
bannerView_ = [[GADBannerView alloc] initWithAdSize:kGADAdSizeBanner];
// Specify the ad's "unit identifier." …Run Code Online (Sandbox Code Playgroud) 我有一个小游戏应用程序,它有一个故事板,里面创建场景,如开始菜单 - gamin区域 - 得分我添加了admob横幅视图和interstitals到它.我的横幅视图工作正常,但我的插页式广告只能工作一次.
我在我的viewdidload上加载我的插页式广告并在调用游戏会话结束的函数中激活它,正如我所说它有效,但只有一次当用户启动另一个游戏时失败,这次没有interstital(下面的错误).那么什么我应该怎么做才能修复它我想让我的游戏在我想要的时候多次显示插页式广告.
错误:请求错误:由于已使用插页式对象,因此无法发送请求.
标题:
#import "GADBannerView.h"
#import "GADInterstitial.h"
@class GADInterstitial;
@class GADRequest;
////////////code UIviewcontroller//////////
GADBannerView *bannerView_;
GADInterstitial *interstitial_;
Run Code Online (Sandbox Code Playgroud)
履行
-(void)viewdidload
{
//////////////////gaming code///////////
interstitial_ = [[GADInterstitial alloc] init];
interstitial_.delegate = self;
interstitial_.adUnitID = @"ca-app-pub-6280395701552972/5217388242";
GADRequest *request = [GADRequest request];
[interstitial_ loadRequest:request];
}
Run Code Online (Sandbox Code Playgroud)
Implementaion
-(void)failgame
{
//////////////////gaming code///////////
[interstitial_ presentFromRootViewController:self];
}
Run Code Online (Sandbox Code Playgroud)
在googleadmob SDK页面上,它说intertials是一次性使用对象所以我%100肯定是问题,但没有什么可以解释如何多次调用它们所以只要你指出答案请不要告诉go读它我读过5次.
我在Linux中有学校项目,我需要创建一个用户定义的文本文件,该文件在100-999之间有1000个随机数.
我设法通过使用数组创建用户定义的文件,我的代码没有错误,但是当我运行它时,我的文件中只有一个数字,但我希望有1000个数字我使用\n但它不起作用请帮帮我?
#include<stdio.h>
#define MAX 100
int main()
{
FILE *fp;
char dosya[MAX];
printf("\nLütfen dosya ad? giriniz:");
scanf("%s",dosya);
fp=fopen(dosya,"w");
int i;
for (i=0;i<1000;i++);
{
int sayi;
sayi=rand()%999-100;
fprintf(fp,"\n");
fprintf(fp,"%d\n",sayi);
fprintf(fp,"\n");
}
fclose(fp);
return 0;
}
Run Code Online (Sandbox Code Playgroud)
当我在我的文件中运行它只有一个数字,所以我认为它一直在同一行写1000次(但有/ n)其余的我在哪里检查for循环,它的工作请帮帮我?