0

I'm using Unity and Google Mobile Ads 8.7.0 to implement ads in my game. I've read Google Prepare for IOS here https://developers.google.com/admob/ios/ios14. But confused where and how to implement the required source codes.
The file states that we should place -void requestIDFA in our XCODE project. Few videos on YouTube has placed the code in their AppDelagate.h script.

But Admobs SDK 8.7.0 dosent include an AppDelagate.h file. Where should I place the -void (requestIDFA) script from Google. Will anywhere suffice or must there be a specific place you implement it.

EZZ42
  • 13
  • 2
  • you need to add these in your Xcode project as described. – Pathak Ayush Jul 12 '21 at 12:51
  • @PathakAyush I've done everything the admob file has previously described including SKADNetworks and updated Info Plist. I'm referring to this piece of code here : #import #import ... - (void)requestIDFA { [ATTrackingManager requestTrackingAuthorizationWithCompletionHandler:^(ATTrackingManagerAuthorizationStatus status) { // Tracking authorization completed. Start loading ads here. // [self loadAd]; }]; } Do i place it any random Xcode script? or a certain script – EZZ42 Jul 12 '21 at 13:25

1 Answers1

0

You're probably the one who asked me on my YouTube video, and I answered you. However the simplest solution is to use the Unity package iOS 14 Advertising Support, you find it in the package manager.

Francesco - FL
  • 603
  • 1
  • 4
  • 25
  • Yep, that was me haha. I've already uploaded my app through test flight before I asked that question. However, I've gone ahead and implemented the Unity adsupport for iOS 14 previously suggested. Thanks alot btw. – EZZ42 Jul 12 '21 at 16:33