                 }
             }
         } else {
-            // Fallback on earlier versions
+            UIApplication.shared.registerUserNotificationSettings(UIUserNotificationSettings(types: [.sound, .alert, .badge], categories: nil))
+            UIApplication.shared.registerForRemoteNotifications()
         }
         
     }

    
    /// contains the deviceToken
    var deviceToken: String = ""
    
    let backGroundTimeInterval = 60.0
    
    // each app user is associated with a Breinify User
    var appUser = BreinUser()

        // register PushNotifications
        self.registerPushNotifications()

        // init background Timer take parameter if set, otherwise default
        let interval = backgroundInterval ?? BreinifyManager.sharedInstance.kBackGroundTimeInterval
        
        updateTimer = Timer.scheduledTimer(timeInterval: interval, target: self,
                                           selector: #selector(sendLocationInformation), userInfo: nil, repeats: true)
    }
