0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Unity】iOS×Google-Ads ver6.0.0で_GADURequestInterstitialが定義されていないと出る時の解決法

Posted at

エラー内容

iOSでAdmobを使おうとして、Google-Ads ver6.0.0をインポートすると、Xcodeビルド時に以下のエラーが表示される。

Build iOS failed: Undefined symbols for architecture arm64: "_GADURequestInterstitial"

簡単に言うと、arm64向けに_GADURequestInterstitial が定義されていないことが原因であり、インポートしたプラグインに起因する。

arm64とはスマートフォンに搭載されているプロセッサーアーキテクチャのこと。

解決方法

SDKのプラグインを直接いじることはできない(正確にはしたくない)ので、自分でObjective-Cの定義ファイルを作成し、UnityProject内のPluginに格納する必要がある。以下定義ファイルソース。

Workaround.m
typedef const void *GADUTypeInterstitialRef;

typedef const void *GADUTypeRewardedAdRef;

typedef const void *GADUTypeRequestRef;

void GADURequestInterstitial(GADUTypeInterstitialRef interstitial, GADUTypeRequestRef request) { }

void GADURequestRewardedAd(GADUTypeRewardedAdRef rewardedAd, GADUTypeRequestRef request) { }

これをAsset>Plugin>iOSに格納すればOK。

参考資料

現在も議論されているフォーラム
Build iOS failed: Undefined symbols for architecture arm64: "_GADURequestInterstitial" #1616

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?