Giter VIP home page Giter VIP logo

Comments (4)

TimOliver avatar TimOliver commented on August 19, 2024

Erm.... I'm really not sure. ^_^;; I haven't been keeping up-to-date with iAd, so I didn't know this was a new thing in iOS 7.

Let me get this straight. When you set the interstitialPresentationPolicy on a UIViewController to automatic, periodically, full-screen ads will periodically appear on the screen?

I'm going purely off my own logic here, but it seems to me that setting the interstitialPresentationPolicy property directly on the web view controller might be too low in the view controller chain to set it. It might be more appropriate to set it to the web view controller's UINavigationController, or even, whatever view controller that self is there.

Hope that helps!

-Tim

from towebviewcontroller.

maziyarpanahi avatar maziyarpanahi commented on August 19, 2024

Hi Tim,

Yes, for instance if you are segue into another view or presenting another view whenever the view appears and iAd has any ads(Interstitial) ready will bring that view as a full screen popup which you can close by close button and visit your view under the ads. It takes time for Apple to provide Interstitial ads so you call prepareInterstitialAds in the AppDelegate finishWith ... function to give Apple a heads up of you need this kind of ads in your app.

I usually see this example:

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    UIViewController *destination = [segue destinationViewController];

    destination.interstitialPresentationPolicy =
                 ADInterstitialPresentationPolicyAutomatic;
}

I tried this example, and the Ad shows once. So this is not a conflict with anything in TOWebViewController. So the code I said here works and no matter what I do it happens once in lifecycle of the app and I have to run it again to see it which I am guessing it has something to do with development.

I will ask someone in Apple about this type of ads and see how it goes.

Thanks for your help Tim.

from towebviewcontroller.

TimOliver avatar TimOliver commented on August 19, 2024

Hi Maziyar!

No worries! I did a little bit more reading, and apparently if you actually want to explicitly make ads appear, you can set the policy to ADInterstitialPresentationPolicyManual and then explicitly request interstital ads then.

Let me know how you go with Apple! And thanks for the heads-up; I'm a bit more curious about the potential of iAds now. :)

from towebviewcontroller.

maziyarpanahi avatar maziyarpanahi commented on August 19, 2024

@TimOliver Hi Tim,

Thanks for your reply. I waited to see what happens to my app submission and now it's been approved. So both automatic and manual is ok and approved by Apple.

Since this type of ads (Interstitial) has the most revenue among most of the ads networks, there is another Interstitial ads presenting by AdMob(Google). AdMob supports a lot of countries now. You can find it here: https://developers.google.com/mobile-ads-sdk/docs/admob/advanced

With iAd it is really easy, it presents the ads over TOWebViewController. With AdMob on the other hand it pushes the view which makes it a little tricky. I've been working on this to see if there is a way to display AdMob Interstitial ads maybe after user taps on "Done" button to dismiss TOWebViewController. Is there any delegate when you dismiss the TOWebController?

Please take a look at AdMob Interstitial and see if you can come up with a better solution.

Thanks
M

from towebviewcontroller.

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.