내 앱에 AdMob을 추가하려고합니다. iPhone - AdMob이 표시되지 않습니다. 샘플 코드 사용
은 내가 여기에서 예로부터 지침 다음 : 내가 그리고 내가있는 viewDidLoad문제에서 호출 해요 방법을 만든 미묘한 차이 http://code.google.com/mobile/ads/docs/ios/fundamentals.html
을 아무것도하지 표시되지 않는 것입니다 심지어 빈 프레임. 또한 Interface Builder에서 메인 뷰를 제외한 모든 것을 삭제하여 무언가 뒤에 있지는 않지만 아무것도 나타나지 않도록 노력했습니다.
무엇을 잘못 할 수 있습니까?
여기 내 방법 코드입니다 :
- (void)showBanner {
// Create a view of the standard size at the bottom of the screen.
bannerView_ = [[GADBannerView alloc]
initWithFrame:CGRectMake(0.0,
self.view.frame.size.height -
GAD_SIZE_320x50.height,
GAD_SIZE_320x50.width,
GAD_SIZE_320x50.height)];
// Specify the ad's "unit identifier." This is your AdMob Publisher ID.
bannerView_.adUnitID = @"heresthestringofmyadmobid";
// Let the runtime know which UIViewController to restore after taking
// the user wherever the ad goes and add it to the view hierarchy.
bannerView_.rootViewController = self;
[self.view addSubview:bannerView_];
[self.view bringSubviewToFront:bannerView_];
// Initiate a generic request to load it with an ad.
GADRequest *request = [GADRequest request];
request.testDevices = [NSArray arrayWithObjects:
GAD_SIMULATOR_ID, // Simulator
@"heresthestringofmyphone", // Test iPhone 3Gs 4.3.1
nil];
[bannerView_ loadRequest:request];
}
나는 또한 상단에 표시하기 위해, 0, 0 (320), (50)을 CGFrame을 harcoding 시도했지만 아무것도 중 하나
나는 운도없이 그것을 시도했다. 나는 또한 testdevices 배열을 시도했다. 아마도 admob 페이지의 설정 일 수 있습니까? 방금 예제 코드 프로젝트를 다운로드하여 실행했습니다. 아니 운도 = ( – Chompas
나를 위해 일한 ....... 고마워 ... :) –