[IOS - Unity] Can't show test and real ads on IOS

437 views
Skip to first unread message

Atmosphere Game Studios

unread,
Aug 11, 2021, 5:22:57 PM8/11/21
to Google Mobile Ads SDK Developers
Hello,

We bought a game (unity) from someone with transfer app and as source code.

We changed all Admob ids.

At android all works good. We added apps.txt to accounts.

At IOS side we can't see real ads, test adds, too.

We are using same codes and all app ids and advertisement ids are correct.

Here is code snippet, but we can't see any ads, additionally we can't see any request on Admob panel.

using UnityEngine.Events;
using UnityEngine;
using GoogleMobileAds.Api;
using GoogleMobileAds.Common;
using UnityEngine.UI;
using System;
using System.Collections.Generic;

#if UNITY_IOS
using Unity.Advertisement.IosSupport;
#endif

public class AdManager : MonoBehaviour
{
private BannerView bannerView;
private InterstitialAd interstitialAd;
private RewardedAd rewardedAd;

public UnityEvent OnAdLoadedEvent;
public UnityEvent OnAdFailedToLoadEvent;
public UnityEvent OnAdOpeningEvent;
public UnityEvent OnAdFailedToShowEvent;
public UnityEvent OnUserEarnedRewardEvent;
public UnityEvent OnAdClosedEvent;

#if UNITY_ANDROID
private string bannerID = "ca-app-pub-.../...";
private string interstitialID = "ca-app-pub-.../...";
private string rewardVideoID = "ca-app-pub-.../...";
#elif UNITY_IOS
private string bannerID = "ca-app-pub-.../...";
private string interstitialID = "ca-app-pub-.../...";
private string rewardVideoID = "ca-app-pub-.../...";
#endif


#region UNITY MONOBEHAVIOR METHODS

public void Start()
{
MobileAds.SetiOSAppPauseOnBackground(true);

#if UNITY_IOS
if (ATTrackingStatusBinding.GetAuthorizationTrackingStatus() == ATTrackingStatusBinding.AuthorizationTrackingStatus.NOT_DETERMINED)
{
ATTrackingStatusBinding.RequestAuthorizationTracking();
}
#endif

List<String> deviceIds = new List<String>() { AdRequest.TestDeviceSimulator };

// Add some test device IDs (replace with your own device IDs).
#if UNITY_IOS
//deviceIds.Add("");
#elif UNITY_ANDROID
//deviceIds.Add("");
#endif

// Configure TagForChildDirectedTreatment and test device IDs.
RequestConfiguration requestConfiguration =
new RequestConfiguration.Builder()
.SetTagForChildDirectedTreatment(TagForChildDirectedTreatment.Unspecified)
.SetTestDeviceIds(deviceIds).build();

MobileAds.SetRequestConfiguration(requestConfiguration);

// Initialize the Google Mobile Ads SDK.
MobileAds.Initialize(HandleInitCompleteAction);
}

private void HandleInitCompleteAction(InitializationStatus initstatus)
{
// Callbacks from GoogleMobileAds are not guaranteed to be called on
// main thread.
// In this example we use MobileAdsEventExecutor to schedule these calls on
// the next Update() loop.
MobileAdsEventExecutor.ExecuteInUpdate(() =>
{
Debug.Log("Initialization complete");
RequestBannerAd();
RequestAndLoadInterstitialAd();
RequestAndLoadRewardedAd();
});
}

#endregion

#region HELPER METHODS

private AdRequest CreateAdRequest()
{
return new AdRequest.Builder()
//.AddKeyword("unity-admob-sample")
.Build();
}

#endregion

#region BANNER ADS

public void RequestBannerAd()
{
Debug.Log("Requesting Banner Ad.");
// These ad units are configured to always serve test ads.
// Clean up banner before reusing
if (bannerView != null)
{
bannerView.Destroy();
}

// Create a 320x50 banner at top of the screen
bannerView = new BannerView(bannerID, AdSize.SmartBanner, AdPosition.Bottom);

// Add Event Handlers
bannerView.OnAdLoaded += (sender, args) => OnAdLoadedEvent.Invoke();
bannerView.OnAdFailedToLoad += (sender, args) => OnAdFailedToLoadEvent.Invoke();
bannerView.OnAdOpening += (sender, args) => OnAdOpeningEvent.Invoke();
bannerView.OnAdClosed += (sender, args) => OnAdClosedEvent.Invoke();

// Load a banner ad
bannerView.LoadAd(CreateAdRequest());
}

public void DestroyBannerAd()
{
if (bannerView != null)
{
bannerView.Destroy();
}
}

#endregion

#region INTERSTITIAL ADS

public void RequestAndLoadInterstitialAd()
{
Debug.Log("Requesting Interstitial Ad.");

// Clean up interstitial before using it
if (interstitialAd != null)
{
interstitialAd.Destroy();
}

interstitialAd = new InterstitialAd(interstitialID);

// Add Event Handlers
interstitialAd.OnAdLoaded += (sender, args) => OnAdLoadedEvent.Invoke();
interstitialAd.OnAdFailedToLoad += (sender, args) => OnAdFailedToLoadEvent.Invoke();
interstitialAd.OnAdOpening += (sender, args) => OnAdOpeningEvent.Invoke();
interstitialAd.OnAdClosed += (sender, args) => OnAdClosedEvent.Invoke();

// Load an interstitial ad
interstitialAd.LoadAd(CreateAdRequest());
}

public void ShowInterstitialAd()
{
if (interstitialAd.IsLoaded())
{
interstitialAd.Show();
}
else
{
Debug.Log("Interstitial ad is not ready yet");
}

RequestAndLoadInterstitialAd();
}

public void DestroyInterstitialAd()
{
if (interstitialAd != null)
{
interstitialAd.Destroy();
}
}
#endregion

#region REWARDED ADS

public void RequestAndLoadRewardedAd()
{
Debug.Log("Requesting Rewarded Ad.");

// create new rewarded ad instance
rewardedAd = new RewardedAd(rewardVideoID);

// Add Event Handlers
rewardedAd.OnAdLoaded += (sender, args) => OnAdLoadedEvent.Invoke();
rewardedAd.OnAdFailedToLoad += (sender, args) => OnAdFailedToLoadEvent.Invoke();
rewardedAd.OnAdOpening += (sender, args) => OnAdOpeningEvent.Invoke();
rewardedAd.OnAdFailedToShow += (sender, args) => OnAdFailedToShowEvent.Invoke();
rewardedAd.OnAdClosed += (sender, args) => OnAdClosedEvent.Invoke();
rewardedAd.OnUserEarnedReward += HandleRewardBasedVideoRewarded;

// Create empty ad request
rewardedAd.LoadAd(CreateAdRequest());
}

public void HandleRewardBasedVideoRewarded(object sender, Reward args)
{
Debug.Log("The ad was shown successfully");
GameManager.Instance.AddCoin(75);
}

public void ShowRewardedAd()
{
if (rewardedAd != null)
{
rewardedAd.Show();
}
else
{
Debug.Log("Rewarded ad is not ready yet.");
}

RequestAndLoadRewardedAd();
}

#endregion
}

Atmosphere Game Studios

unread,
Aug 11, 2021, 5:27:27 PM8/11/21
to Google Mobile Ads SDK Developers
Unity Version : 2020.3.15f2
Admob : Latest Unity Plugin (Google Mobile Ads Unity Plugin v6.0.2)
IOS version : Latest for Mac and iPhone 12 Pro Max
12 Ağustos 2021 Perşembe tarihinde saat 00:22:57 UTC+3 itibarıyla Atmosphere Game Studios şunları yazdı:

Mobile Ads SDK Forum Advisor

unread,
Aug 12, 2021, 2:16:19 AM8/12/21
to atmosphere...@gmail.com, google-adm...@googlegroups.com

Hello Atmosphere,

Thank you for reaching out to us.

For us to better check this, could you please provide the following details via Reply privately to author option or send it directly to mobileads...@gmail.com? Kindly inform us on this thread if you sent it directly to the email provided.

Regards,

Google Logo
Princess Pamela Pineda
Mobile Ads SDK Team
 

 

ref:_00D1U1174p._5004Q2LmWJh:ref

Atmosphere Game Studios

unread,
Aug 12, 2021, 2:14:02 PM8/12/21
to Google Mobile Ads SDK Developers
We sent you via "Reply privately", how cna we see your answer if you give information about it?

12 Ağustos 2021 Perşembe tarihinde saat 09:16:19 UTC+3 itibarıyla mobileadssdk şunları yazdı:

Atmosphere Game Studios

unread,
Aug 13, 2021, 12:01:09 AM8/13/21
to Google Mobile Ads SDK Developers
Could you relink app before you check our informaiton which we sent you as private.

12 Ağustos 2021 Perşembe tarihinde saat 21:14:02 UTC+3 itibarıyla Atmosphere Game Studios şunları yazdı:

Mobile Ads SDK Forum Advisor

unread,
Aug 13, 2021, 3:44:25 AM8/13/21
to atmosphere...@gmail.com, google-adm...@googlegroups.com

Hello Atmosphere,

Thank you for providing us additional information on this.

I checked your ad unit IDs in our sample app for checking for the ids on iOS, and was able to get ads on it. With this, could you please provide us any sample app that have your implementation, so that we can check it? You can send it via Reply privately to author option or send it directly to mobileads...@gmail.com. Kindly inform us on this thread if you sent it directly to the email provided.

With regard to the relink of app you mentioned, can you confirm if this is relink of your app and your ad unit id? If so, these are being handle by the Product support team as they are better equipped on it.

Mobile Ads SDK Forum Advisor

unread,
Aug 13, 2021, 4:59:53 PM8/13/21
to atmosphere...@gmail.com, google-adm...@googlegroups.com
Hi, 

I work with Pamela and will assist you. Thank you for sending the app privately. When running as a test device and changing the bundle identifier to add a "t" for test at the end ads were delivered with your setup. I also checked with our sample apps  in an simulator with your real bundle Id and ads came.

This appears to be an ad inventory issue only which is addressed by the Product support team as they are equipped to handle ad inventory issues.

Regards,

Google Logo
Aryeh Baker
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2LmWJh:ref

Atmosphere Game Studios

unread,
Aug 14, 2021, 2:56:51 AM8/14/21
to Google Mobile Ads SDK Developers
We wrote to there, is it true?

13 Ağustos 2021 Cuma tarihinde saat 23:59:53 UTC+3 itibarıyla mobileadssdk şunları yazdı:

Atmosphere Game Studios

unread,
Aug 14, 2021, 4:00:28 PM8/14/21
to Google Mobile Ads SDK Developers
We can't send a help request at contact form, how can we tell with Product Support Team?

https://support.google.com/admob/gethelp

"Refresh this page and try again. Sorry, there was a problem with the form."
We got this erorr about 15 times :D
14 Ağustos 2021 Cumartesi tarihinde saat 09:56:51 UTC+3 itibarıyla Atmosphere Game Studios şunları yazdı:

Mobile Ads SDK Forum Advisor

unread,
Aug 16, 2021, 1:35:18 AM8/16/21
to atmosphere...@gmail.com, google-adm...@googlegroups.com

Hello Atmosphere,

Thank you for your response.

I'm sorry to hear that you're having troubles in contacting our Product Support Team. I understand that there is an urgency in your concern. However, they are the appropriate team who can help on you around as this is more of an ad serving issue. What we can recommend for now is to try submitting the form every 2-3 hours.

Regards,

Google Logo
Princess Pamela Pineda
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2LmWJh:ref

Atmosphere Game Studios

unread,
Sep 4, 2021, 12:04:40 PM9/4/21
to Google Mobile Ads SDK Developers
Hello,

We asked but got this answer, we are too sorry for this problem but you checked and our implementation is true, we checked and implementation is true otherwise after changing bundle identifier.

What can we do about this problem :S

"Hi Publisher,

Thank you for your reply.

Regarding your issue, I've reached out to the product specialist again and according to their record, they can see that the issue was that your ad requests were not being sent to the AdMob Network, thus it's not that the network is not matching the inventory. In this case, the specialist has advised you to check if your account is getting any ad load errors: https://developers.google.com/admob/ios/ad-load-errors

You can also get advice and support from other Publishers or from Product experts from the link below

Sorry again I could not be of more help with your case. However, please no do hesitate to let us know if there's anything else we can help you with in the future!

Thank you for your understanding.

Best,
Kiera"

16 Ağustos 2021 Pazartesi tarihinde saat 08:35:18 UTC+3 itibarıyla mobileadssdk şunları yazdı:

Tom Rob (Mobile Ads Sdk Team)

unread,
Sep 4, 2021, 12:07:32 PM9/4/21
to Google Mobile Ads SDK Developers

ok did you used the codeing?? reach me back

Tom Rob (Mobile Ads Sdk Team)

unread,
Sep 4, 2021, 12:08:45 PM9/4/21
to Google Mobile Ads SDK Developers

reach me back l just update his message

Mobile Ads SDK Forum Advisor

unread,
Sep 6, 2021, 5:15:51 AM9/6/21
to atmosphere...@gmail.com, google-adm...@googlegroups.com

Hello Atmosphere,

Thank you for your response.

We checked again your previously provided sample app to us, but I was encountering an error in building it. With that being said, are you able to replicate your concern in our sample app? If yes, can you please provide us with the modification you've done, so that we can further check your implementation? You can send it via Reply privately to author option or send it directly to mobileads...@gmail.com. Kindly inform us on this thread if you sent it directly to the email provided.

Atmosphere Game Studios

unread,
Sep 7, 2021, 4:51:50 PM9/7/21
to Google Mobile Ads SDK Developers
Hello,

Sorry for delay, because of mail gone to spam I have delayed.

There is some screenshots to show you our stage. There are same integration.

If we do bundle identifier to "com.pushmastert.game"



6 Eylül 2021 Pazartesi tarihinde saat 12:15:51 UTC+3 itibarıyla mobileadssdk şunları yazdı:
WhatsApp Image 2021-09-07 at 23.32.48 (2).jpeg
WhatsApp Image 2021-09-07 at 23.32.48 (1).jpeg
WhatsApp Image 2021-09-07 at 23.32.48 (3).jpeg

Atmosphere Game Studios

unread,
Sep 7, 2021, 4:52:19 PM9/7/21
to Google Mobile Ads SDK Developers
If we do bundle identifier to "com.pushmaster.game"



7 Eylül 2021 Salı tarihinde saat 23:51:50 UTC+3 itibarıyla Atmosphere Game Studios şunları yazdı:
WhatsApp Image 2021-09-07 at 23.32.47.jpeg
WhatsApp Image 2021-09-07 at 23.32.48.jpeg

Mobile Ads SDK Forum Advisor

unread,
Sep 8, 2021, 1:33:08 AM9/8/21
to atmosphere...@gmail.com, google-adm...@googlegroups.com
Hi Atmosphere,

Teejay here. Allow me to assist you in this.

Since the issue here is in Unity - iOS, would it be possible for you to export your unity project to XCode project instead, then send it via Reply privately to author option or send it directly to mobileads...@gmail.com. Kindly inform us on this thread if you sent it directly to the email provided.

As a side note, if you're having trouble receiving private replies from us, please check your Spam folder. Additionally, please add the 'From address' on that email to your contact list to ensure we aren't flagged as Spam in future messages. If you don't see a message from us in your Spam folder, please email us directly at mobileads-...@google.com referring to this forum thread.

Regards,
Google Logo
Teejay Wennie Pimentel
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2LmWJh:ref

Atmosphere Game Studios

unread,
Sep 8, 2021, 3:08:01 AM9/8/21
to Google Mobile Ads SDK Developers
Hello Teejay,

We have tried example implemetation at "https://github.com/googleads/googleads-mobile-unity/tree/master/samples" to our 2 games and we got a error "error domain=com.google.admob code=1 request error no ad to show" at both games.

At sample app and at our game, too. Maybe is there any other problem?
8 Eylül 2021 Çarşamba tarihinde saat 08:33:08 UTC+3 itibarıyla mobileadssdk şunları yazdı:
Message has been deleted

Mobile Ads SDK Forum Advisor

unread,
Sep 8, 2021, 6:06:33 AM9/8/21
to atmosphere...@gmail.com, google-adm...@googlegroups.com

Hello Atmosphere,

Thank you for your response.

As what my colleague mentioned, would it be possible for you to export your unity project or your tested app from our sample app to XCode project instead, then send it via Reply privately to author option or send it directly to mobileads...@gmail.com? Kindly inform us on this thread if you sent it directly to the email provided.

Regards,

Google Logo
Princess Pamela Pineda
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2LmWJh:ref

Atmosphere Game Studios

unread,
Sep 9, 2021, 12:53:36 PM9/9/21
to Google Mobile Ads SDK Developers
We have sent files.

8 Eylül 2021 Çarşamba tarihinde saat 13:06:33 UTC+3 itibarıyla mobileadssdk şunları yazdı:
Reply all
Reply to author
Forward
0 new messages