Comments (4)
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.
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.
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.
@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)
- Tips: How to hide system back button HOT 1
- Getting Error: 'codesign failed with exit code 1' when building with simulator HOT 1
- Xcode warning that umbrella header is missing some header includes HOT 1
- Support https website HOT 3
- Issue with Photo Library ? HOT 1
- Left Bar Button Item is still missing HOT 3
- Google Forms and browser compatibility HOT 2
- XCode 8.3 warnings HOT 2
- toolbarItems not visible when presented in UIPageViewController HOT 1
- url didn't change if the web page url is set and loaded by javascript HOT 2
- Setting statusbar style HOT 1
- 在iPhone X上显示不正确 HOT 3
- how to customize the webViewController? HOT 1
- Cocoapods HOT 2
- The bottom toolbar not hiding after screen dismissing any reason. HOT 2
- No voice in ipad device HOT 1
- 2.2.7 UI Error on iOS 11 HOT 5
- bottom toolbar below bottom safe area iPhone X HOT 2
- Crash when running UI Tests that close TOWebViewController while page still loading HOT 1
- 没人反应移除UIWebview的问题么 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from towebviewcontroller.