Rob this is my vungle.mm file. Learning objective c and c++ and I for sure consider myself a noob, but how does this look?
#include <Vungle.h>
#import <UIKit/UIKit.h>
#import <VungleSDK/VungleSDK.h>
using namespace vungle;
@interface VungleController : UIViewController
@end
namespace vungle
{
VungleSDK* sdk = [VungleSDK sharedSDK];
NSError *error;
static VungleController *adController;
//Start Vungle
void startVungle(const char *appID)
{
if(adController == NULL)
{
adController = [[VungleController alloc] init];
}
NSString * appID2 = [[NSString alloc] initWithUTF8String:appID];
[sdk startWithAppId:appID2];
}
//Play Vungle Ad
void playVungle()
{
[sdk playAd:adController error:&error];
if (error) {
NSLog(@"Error encountered playing ad: %@", error);
}
}
}