I followed the implementation Revmob guide to use interstitial advertisement for my game, but when I launch my game I get an error:
2015-01-13 15:02:20.406 basisTest[38021:42032052] [RevMob] Starting RevMobAds
2015-01-13 15:02:21.057 basisTest[38021:42032052] [RevMob] Warning: RevMob session was not started
fatal error: unexpectedly found nil while unwrapping an Optional value
the error is pointing to this line in my appdelegate:
func applicationDidBecomeActive(application: UIApplication) {
RevMobAds.session().showFullscreen();
}
my viewdidload method in my GameViewController:
override func viewDidLoad() {
super.viewDidLoad()
let completionBlock: () -> Void = {
// do something when it successfully starts the session
}
let errorBlock: (NSError!) -> Void = {error in
// check the error
println(error);
}
RevMobAds.startSessionWithAppID("54b515b6b1abae000f771a71",
withSuccessHandler: completionBlock, andFailHandler: errorBlock);
}
I followed the guide exactly and added all frameworks to my project and changed my build setting as expected.
What am I doing wrong?