i have configure adwhirl in my app but add's are not displayed is there any configuration needed in apple account for iad ? if needed any settings for iad in apple account then please guide me and also tell me how to configure that settings in adwhirl.
To use AdWhirl in ur application , you need to register here :
https://www.adwhirl.com/home/register
From here you'll get a unique key.Download the API for Adwhirl and then integrate the key to it.The Adwhirl manages iAd, admob etc. percentage wise.When one fails to load , the adwhirl loads the another.
you can refer this link also :
http://www.raywenderlich.com/5350/how-to-integrate-adwhirl-into-a-cocos2d-game
You might want to consider using the new Admob mediation instead as I believe adwhirl will soon become unsupported as they are concentrating on AdMob now (both owned by google).
Refer this to integrate adwhirl for iad and other ads.
Add iad account on adwhirl account of yours by loging to adwhirl
Download latest AdwhirlAPI and add to your project. Refer Api and setup links
In .h of yourcontroller
#interface yourController : <AdWhirlDelegate>
Now Do following things in .m file where u wnat adwhirl:
1) DefineAdwhirlKey
#define kSampleAppKey #"your adwhirl key"
2) Add code in viewDidLoad
AdWhirlView *awView = [AdWhirlView requestAdWhirlViewWithDelegate:self];
[awView setFrame:CGRectMake(0,326,320,50)];//set your frame
[awView setDelegate:self];
[self.view addSubview:awView];
3) Add AdwhirlDelegate methods
- (NSString *)adWhirlApplicationKey
{
return kSampleAppKey;
}
- (UIViewController *)viewControllerForPresentingModalView
{
return self;
}
Related
I have checked the (Top Paid Apps) sample code from Apple website where you can see all the top apps in the App store, I want to do the same in my app but to show only my apps in the App Store. Here is the URL which i found in that sample :
http://phobos.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/toppaidapplications/limit=75/xml
What do I need to change in this URL to show only my Apps?
This is pretty easy with the SKStoreProductViewController introduced in iOS 6. With that users can buy your other apps right within the application.
First add StoreKit.framework to your project. Then find the iTunes URL that links to your apps using iTunes. You can copy the link from the iTunes Store. For example the URL for the Apple apps is http://itunes.apple.com/de/artist/apple/id284417353?mt=12
It contains the iTunes identifier, that you pass to the SKStoreProductViewController.
Sample code:
#import "ViewController.h"
#import <StoreKit/SKStoreProductViewController.h>
#interface ViewController ()<SKStoreProductViewControllerDelegate>
#end
#implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
[self showMyApps];
}
-(void)showMyApps
{
SKStoreProductViewController* spvc = [[SKStoreProductViewController alloc] init];
[spvc loadProductWithParameters:#{SKStoreProductParameterITunesItemIdentifier : #284417353}
completionBlock:nil];
spvc.delegate = self;
[self presentViewController:spvc animated:YES completion:nil];
}
-(void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController
{
[self dismissViewControllerAnimated:YES completion:nil];
}
#end
You could use DAAppsViewController. It can be configured with a developer ID to show all the apps by that developer. It will use StoreKit if available, otherwise fallback to switching to the App Store.
I know Apple recommends just placing the adview offscreen,
incase there is an error, loading an iAd,
but I would like to hide it using [adView setHidden: YES];.
If I do so, will the view check for new ads available?
In the simulator sure it will load the Test Ads,
but will it also work after releasing the app onto actual devices from the AppStore?
SideSwipe
Yes, it should work on real device.
we have an application built using cocos2d, the first class (scene) called from the app delegate is the levels class which then calls the game class (scene) according to user choice. where should i write my iAd code and how ? any help please.
My suggestion would be to look at AdWhirl, which would make your ads decoupled from the ad network.
More can be found below.
https://www.adwhirl.com/home/dev
My understanding is that you can not put UIViews directly into CCLayer, or CCScene (i hope those are the names), you will have to shrink your scene in order to put the iAd beside your Cocos2d view.
To implement iAd add the import
#import <iAd/ADBannerView.h>
If you initialize iAd in the AppDelegate, it will displayed everywhere.
This is very easy to achieve.
ADBannerView* iAdView = [[ADBannerView alloc] initWithFrame:CGRectZero];
iAdView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierLandscape;
[[[CCDirector sharedDirector] openGLView] addSubview:iAdView];
For more information, look at apples programming guide http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/iAd_Guide/Introduction/Introduction.html
I recently wrote a post about this issue (integrating iAd in a Cocos2d-x game) in my blog. Take a look and ask me if you have any questions.
I have to implement AdWhirl in my app. It works fine - I'm getting ads from AdMob and iAd now.
There is no ad coming from AdMod and iAd. I am getting an error in the console. I can provide the code I'm using if it'd be helpful.
Try by implementing this delegate...
- (UIViewController *)viewControllerForPresentingModalView
{
return yourAPP.viewController;
}
I want to integrate AdMob ads in my iPhone app. I'm using IB way to add the view and follow AdMob's pdf guide:
1. Add AdMob group(AdMobView.h,AdMobDelegateProtocol.h,libAdMob.a)
2. Add required frameworks(AudioToolbox,MediaPlayer,MessageUI,QuartzCore)
3. Add TouchJSON group
4. Add IBSupport group(AdViewController.h,AdViewController.m)
5. Add a 320*48 UIView in IB, add NSObject and change its class to AdViewController,
link AdViewController's view to the 320*48 UIView and link AdViewController's viewController to current view controller.
Now the iPhone simulator can show ads from AdMob, but when I test it on real device, I get the error "AdMob: Did fail to receive ad".
I've tried to add test device's UDID to testDevices array, but still get the same error.
- (NSArray *)testDevices {
return [NSArray arrayWithObjects: ADMOB_SIMULATOR_ID, DEVICE_UDID, nil];
}
Is there any problem in the above steps? Does anybody know why can't I get the ads in real device? By the way, what should be changed to build for real for-sale app, not just for test?
Setting testDevices seems not working for my test device. I've added a deprecated method -(BOOL)useTestAd according to AdMob wiki and it works now.
- (BOOL)useTestAd {
return NO;
}