Vote count:
0
I have integrated Adcolony Incentivised Video Ads in my IOS game.
The problem is that after the user watches the video ad and is returned to the game. The app freezes and none of the buttons works, you can still hear the music playing.
When we are showing the ad on game launching i.e. at didappbecomeactive in app delegate it works but when we call it via button press on screen then it cas problem
Our developer has integrated using the following code.
This function is called from MainMenuLAyer.cpp when button pressed.
void MainMenuLayer::onClickMoreGames(cocos2d::CCObject *sender)
{
if ( GameSetting::shared()->isEnableSound() )
{
CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect("click.caf", false);
}
LetItRide::LetItRideSetting::shared()->giveMeMoreGamesAd();
}
Then it goes to LetRideSetting.mm
void LetItRide::LetItRideSetting::giveMeMoreGamesAd()
{
//[[SNAdsManager sharedManager] giveMeMoreAppsAd];
//zs more game
AppController* app = (AppController*)[[UIApplication sharedApplication] delegate];
[app collectCoins];
}
Finally in AppController
(void)applicationDidBecomeActive:(UIApplication *)application {
[self initAdCalony];
cocos2d::CCDirector::sharedDirector()->resume();
}
#pragma mark Adcalony
-(void)initAdCalony{
//zs adcalony init
[AdColony configureWithAppID:AdcalonyAppid zoneIDs:@[AdcalonyZoneId] delegate:self logging:YES];
}
-(void)showAdcolony{
//zs show Ad calony
[AdColony playVideoAdForZone:AdcalonyZoneId withDelegate:self withV4VCPrePopup:NO andV4VCPostPopup:NO];
}
I doubt this is enough information to solve the problem, but being non-technical its all I can provide at the moment. Let me know what info you need to help solve me the issue and I will look into it.
Any advice is appreciated.
AdColony freezes App on iOS
Aucun commentaire:
Enregistrer un commentaire