     
 //    private static var pushExchangeDone = false
     
-    public class func Push(types:UIUserNotificationType = UIUserNotificationType.Alert |
-        UIUserNotificationType.Badge |
-        UIUserNotificationType.Sound,closure:(authorized:Bool)->Void) {
+    public class func Push(types:UIUserNotificationType = UIUserNotificationType.Alert.union(UIUserNotificationType.Badge).union(UIUserNotificationType.Sound),closure:(authorized:Bool)->Void) {
             
             onMain {
                 

                            bgNoteObject = nil
                        }
                        
                        fgNoteObject = NSNotificationCenter.defaultCenter().addObserverForName(UIApplicationDidBecomeActiveNotification, object: nil, queue: NSOperationQueue.mainQueue()) { (note:NSNotification!) -> Void in
                            
                            if shouldWaitForFG {
                                done(application.isRegisteredForRemoteNotifications())

                        
                        application.registerUserNotificationSettings(UIUserNotificationSettings(forTypes: types, categories: nil))
                        
                        var bgNoteObject:NSObjectProtocol? = nil
                        var fgNoteObject:NSObjectProtocol? = nil
                        
                        var hasTimedOut = false
                        
