title: Pushwhoosh : Swift Code
body: <p>I used below push whoosh swift code but its crashing.</p>
  
  <pre><code>        if(UIApplication.instancesRespondToSelector(Selector("registerUserNotificationSettings:")))
          {
              application.registerUserNotificationSettings(UIUserNotificationSettings(forTypes: UIUserNotificationType.Sound | UIUserNotificationType.Alert | UIUserNotificationType.Badge, categories: nil))
          }
          else //iOS7
          {
              application.registerForRemoteNotificationTypes( UIRemoteNotificationType.Badge |
                  UIRemoteNotificationType.Sound |
                  UIRemoteNotificationType.Alert )
          }
  
       var pushManager:PushNotificationManager  = PushNotificationManager.pushManager();
      pushManager.delegate = self;
  
      // handling push on app start
      PushNotificationManager.pushManager().handlePushReceived(launchOptions);
  
      // make sure we count app open in Pushwoosh stats
      PushNotificationManager.pushManager().sendAppOpen();
  
      // register for push notifications!
      PushNotificationManager.pushManager().registerForPushNotifications();
  
      UIApplication.sharedApplication().applicationIconBadgeNumber = 1;
      UIApplication.sharedApplication().applicationIconBadgeNumber = 0;
  </code></pre>
  
  <p>Here is Screenshot: <img src="https://i.stack.imgur.com/QYjok.png" alt="enter image description here"></p>
  
  <p>Error: <code>EXE_BAD_INSTRUCTION</code> for <code>var pushManager:PushNotificationManager  = PushNotificationManager.pushManager()</code></p>