fuzigiwa2
@fuzigiwa2 (義将 藤極)

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

Object-cでAd広告バナーを表示できない

Object-cにて開発しております。

Ad広告でバナー表示を実装しようとしているのですが、
表示されず原因がよくわかっておりません。
ViewController.mに

@import GoogleMobileAds;
@interface ViewController ()
{
}
@property (weak, nonatomic) IBOutlet GADBannerView *bannerView;

- (void)viewDidLoad
{
[super viewDidLoad];
self.bannerView.adUnitID = @"ca-app-pub-3940256099942544/2934735716";
self.bannerView.rootViewController = self;
GADRequest *request = [GADRequest request];
[self.bannerView loadRequest:request];
}

といった形でコードを追加し、実際のbannerViewは.xibファイルに

<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KeJ-Vu-SnQ" customClass="GADBannerView">
<rect key="frame" x="27.5" y="461.5" width="320" height="50"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="width" constant="320" id="B3A-6X-GQM"/>
<constraint firstAttribute="height" constant="50" id="UYd-W4-C4f"/>
</constraints>
</view>

といった形で追加しております。
Xcode上では白い板でViewが表示されておりますが、実機に転送した際は白い板も表示されておらず、
原因が分かっておりません。

初歩的な事かと思うのですが、こちら表示されない原因など教えていただけると助かります。

よろしくお願い致します。

0

No Answers yet.

Your answer might help someone💌