             println("ref \(reference) & val \(value)")
         }
     }
+    
+    func showAdvert() {
+        // show an advert if they haven't left a tip
+        let leftTip = NSUserDefaults.standardUserDefaults().boolForKey("kDidLeaveDonation")
+        if !leftTip {
+            println("Display advert")
+            BatchAds.displayAdForPlacement(BatchPlacementDefault)
+        }
+    }
 }
        
        // If we're returning we need to check if goal progress has elapsed
        IGIGoal.cleanElapsedGoals()
    }
    
    func application(application: UIApplication, didReceiveLocalNotification notification: UILocalNotification) {


    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        
        // Register Notifications
        BatchPush.registerForRemoteNotifications()
        
        // Clear any notifications when the user opens the app
        BatchPush.dismissNotifications()
        
        // Setup Ads
        BatchAds.setupAds()
        
        // Unlock
        BatchUnlock.setupUnlockWithDelegate(self)
        
        // Start Batch
        Batch.startWithAPIKey("DEV54EF398118121451CB109F931AE")
        
        // Realm Migration Check
        RLMRealm.setSchemaVersion(2, forRealmAtPath: RLMRealm.defaultRealmPath()) { (migration, oldSchemaVersion) in
