-1

Im trying to implement Vungle Video Ads in my little game but every time i try to implement it in sprite kit it crashes or is not calling any Videos does someone of you has an answer to this problem? I first tried just to call a method on the ViewController the sprite kit is running on to play the ad not working. then i tried to call another view controller to play the video still not Working:/

it would be great if someone has an answer or at least a hint or just something :)

thanks :)

thats in tgMyScene.m:

    -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
/* Called when a touch begins */

// here im calling the VungleAd method in my viewController

tgViewController* Ad = [[tgViewController alloc] init]; // Create an instance of SomeClass
[Ad VungleAd];

for (UITouch *touch in touches) {
    CGPoint location = [touch locationInNode:self];

    SKSpriteNode *sprite = [SKSpriteNode spriteNodeWithImageNamed:@"Spaceship"];

    sprite.position = location;

    SKAction *action = [SKAction rotateByAngle:M_PI duration:1];

    [sprite runAction:[SKAction repeatActionForever:action]];

    //[self addChild:sprite];
}

}

and thats the method in my tgViewController.m:

    -(void) VungleAd {
NSLog(@"vunglead");

//and here im playing the ad 
VungleSDK* sdk = [VungleSDK sharedSDK];
[sdk playAd:self];

}

its showing the nslog vunglead in the console but is not playing the ad and some times its crashing. I think it crashes when i have a video in the cache but im not sure.

  • Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. – CodeSmile Aug 06 '14 at 18:55

1 Answers1

0

What is the iOS version which you are using? Can see you are on 3.0.8 Vungle SDK - if this is 5.0 or 5.1, then we have version 3.0.9 in the works which has addressed 5.0 issues. However, if this is not the case. This could be related to using an incorrect appID. Visit your Vungle dashboard and visit the application, check the appID in red, upper left. This is what you should be using for your appID. Those are just a few things that might be causing this from the details you provided. Vungle//Chris

  • The iOS version is iOS 7.1 and i checked the appID i think its a problem with my coding not with the SDk i will post some code it would be great if you could check that, so maybe you can see something that im doing wrong:/ thanks so far Chris – Torben Gosau Aug 07 '14 at 11:41