Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Different Admob Ad Unit IDs? #10

Open
vicc opened this issue Mar 31, 2014 · 1 comment
Open

Using Different Admob Ad Unit IDs? #10

vicc opened this issue Mar 31, 2014 · 1 comment

Comments

@vicc
Copy link

vicc commented Mar 31, 2014

Using this library, how can I call specific ad units? For example I have a customized ad to use for a specific view, and another ad for another view controller. How can I let the library display the correct one (this is of course assuming admob is the default choice)?

I also was wondering what the proper way of using this is, when my root view controller isn't embedded within a navigation controller or a tab bar controller. I just have a view controller with multiple segues that lead to other view controllers.

Thank you so much for this by the way!

@chrisjp
Copy link
Owner

chrisjp commented Mar 31, 2014

Currently it is not possible to specify separate ad unit IDs for specific views, but this sounds like it might be useful so I've tagged this as an enhancement. Not sure when I'll be working on this again but it's something I'll definitely look into adding. But yeah you can't do that right now, sorry.

As for your second question, well, to be honest I'm not sure if it will work correctly if you're not using either of those types controllers. I originally wrote this for myself and later decided to open source it, hence why it doesn't have much flexibility for uses like that (at least at the moment) as I only used it with a nav controller.

Off the top of my head I think your only way around this might be to init your other view controllers with code like this, and push the ad controller instead, but honestly I'm not sure this would actually work as you want it to:

YourNextViewController *yourVC = [[YourNextViewController alloc] init];
CJPAdController *adController = [[CJPAdController sharedManager] initWithContentViewController:yourVC];

Chances are that won't work... so I guess you might want to check out some other ad controllers, I'm sure someone must have had the same issue you are facing, but unfortunately it doesn't sound like mine can help you out in this case...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants