Giter Site home page Giter Site logo

Comments (8)

ericleich avatar ericleich commented on July 4, 2024

I'm not sure why you're getting No ad to show in your project's environment. Sometimes something happens to the test ad configuration and it doesn't work, but I just tried it and it seems to be working fine, and you've gotten it in your test environment.

To further debug the multiple instances of GoogleMobileAds, can you clarify what your Podfile looks like so I can see exactly what pods you're referencing? I ask because I don't see a Google/Ads pod, just a Google/AdMob. Google/AdMob depends on GoogleMobileAds, which is the same library as Google-Mobile-Ads-SDK. So you'll get duplicate copies of GoogleMobileAds if both of these libraries are referenced. We're looking to clean that up so there aren't 2 pods for the same library.

from googleads-mobile-ios-examples.

tomaszwojcik avatar tomaszwojcik commented on July 4, 2024

You're right it's Google/AdMob, not Google/Ads.

The problem is that I've been trying that code for few days now, with no success on my main project. :/

Podfile (CocoaPods 0.39.0, can migrate to 1.0.0):

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'

use_frameworks!
inhibit_all_warnings!

def project_pods
  pod 'Alamofire', '~> 3.0'
  pod 'SWRevealViewController', '~> 2.3'
  pod 'StreamingKit', git: '[email protected]:tomaszwojcik/StreamingKit.git'

  pod 'SDWebImage', '~> 3.7'

  pod 'FBSDKCoreKit', '~> 4.10'
  pod 'FBSDKShareKit', '~> 4.10'
  pod 'FBSDKLoginKit', '~> 4.10'

  pod 'Google/Analytics'
  pod 'Google-Mobile-Ads-SDK', '~> 7.0'
end

def test_pods
  pod 'Quick', '~> 0.9.0'
  pod 'Nimble', '3.0.0'
end

target 'Project' do
  project_pods
end

target 'ProjectTests' do
  project_pods
  test_pods
end

from googleads-mobile-ios-examples.

tomaszwojcik avatar tomaszwojcik commented on July 4, 2024

Looks like I found the issue.

In AppDelegate I change the user-agent, and it seems the AdMob doesn't like that at all.

NSUserDefaults.standardUserDefaults().registerDefaults(["UserAgent" : "MyUserAgent"])

Now I'm able to retrieve test ads all the time.
@ericleich Can you please add that to AdMob documentation?

from googleads-mobile-ios-examples.

ericleich avatar ericleich commented on July 4, 2024

Good catch, ads won't load if the user agent is changed. I'll think about where it makes sense to add it to the docs. We may have to create a new troubleshooting page to hold content like this.

from googleads-mobile-ios-examples.

nihp avatar nihp commented on July 4, 2024

@ericleich I am getting the below error after upgrading the Google Ads sdk to the latest version.

InAppPurchase is removed from the latest version as per the migration guide.

'GoogleMobileAds/GADInterstitialDelegate.h' file not found
'GoogleMobileAds/GADInAppPurchaseDelegate.h' file not found

#import <GoogleMobileAds/GADInAppPurchaseDelegate.h>
#import <GoogleMobileAds/GADInterstitialDelegate.h>

from googleads-mobile-ios-examples.

ericleich avatar ericleich commented on July 4, 2024

@nihp this is expected behavior. Both of those headers no longer exist in v9.x of the iOS SDK. The examples at HEAD of this repo use the latest delegates.

from googleads-mobile-ios-examples.

nihp avatar nihp commented on July 4, 2024

@ericleich Could you please provide any alternative for the same one.

I have removed the GADInAppPurchaseDelegate imports.

But the GADInterstitialDelegate needs to be used by many of the implemetnation. Could you please provide. the alternate for this.

from googleads-mobile-ios-examples.

ericleich avatar ericleich commented on July 4, 2024

@nihp The GADFullScreenContentDelegate protocol has replaced GADInterstitialDelegate. Please see https://developers.google.com/admob/ios/migration#expandable-1 for more information. You can also check out the InterstitialExample in this repo to see how it’s implemented in v9.

from googleads-mobile-ios-examples.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.