title: IOS push notification issue on appcelerator
body: <p>i have a big problem on my IOS app. I follow the guide provide by appcelerator documentation to setup my iOS push notification. All seemed work fine, on my appcelerator dashboard i see under the device section my device registered with its token, and when i send a push notification on the detail's push (in push notification log) i read my id device number with a perfect Success(1).</p>
  
  <p>But on my device i didn't receive any notification. I tried with my app opened and with my app closed, but nothing has showed. I don't know why this happen. On my android all work fine. Here my code:</p>
  
  <pre><code>//PUSH NOTIFICATION
  var Cloud = require("ti.cloud");
  //controllo se ho un token
  var deviceToken = Ti.App.Properties.getString("deviceToken");
  
  if ( deviceToken == "" || deviceToken == null) {
      requireToken();
  } else {
  
      if ( Ti.App.Properties.getString("subscribed") !== "true" ) {
          subscribeToChannel(deviceToken);
      }
  
  }
  
  //chiedo un token
  function requireToken() {
  
      // Check if the device is running iOS 8 or later
      if (Ti.Platform.name == "iPhone OS" &amp;&amp; parseInt(Ti.Platform.version.split(".")[0]) &gt;= 8) {
       Ti.API.warn( "entrato nella versione" )
          // Wait for user settings to be registered before registering for push notifications
          Ti.App.iOS.addEventListener('usernotificationsettings', function registerForPush() {
  
              // Remove event listener once registered for push notifications
              Ti.App.iOS.removeEventListener('usernotificationsettings', registerForPush); 
  
              Ti.Network.registerForPushNotifications({
                  success: deviceTokenSuccess,
                  error: deviceTokenError,
                  callback: receivePush
              });
          });
  
          // Register notification types to use
          Ti.App.iOS.registerUserNotificationSettings({
              types: [
                  Ti.App.iOS.USER_NOTIFICATION_TYPE_ALERT,
                  Ti.App.iOS.USER_NOTIFICATION_TYPE_SOUND,
                  Ti.App.iOS.USER_NOTIFICATION_TYPE_BADGE
              ]
          });
  
      }
  
      // For iOS 7 and earlier
      else {
  
          Ti.Network.registerForPushNotifications({
              // Specifies which notifications to receive
              types: [
                  Ti.Network.NOTIFICATION_TYPE_BADGE,
                  Ti.Network.NOTIFICATION_TYPE_ALERT,
                  Ti.Network.NOTIFICATION_TYPE_SOUND
              ],
              success: deviceTokenSuccess,
              error: deviceTokenError,
              callback: receivePush
          });
  
      }
  
      function deviceTokenSuccess(e) {
          Ti.API.warn( "token ricevuto" )
              Ti.App.Properties.setString("deviceToken", e.deviceToken);
          subscribeToChannel(e.deviceToken);
      }
      function deviceTokenError(e) {
         //error action
      }
  
  }
  
  //controllo se sono iscritto alle notifiche push
  if ( Ti.App.Properties.getString("subscribed") !== "true" ) {
      subscribeToChannel(deviceToken);
  }
  
  
  function subscribeToChannel (_deviceToken) {
          Ti.API.warn( "subscribe fatta" )
      Cloud.PushNotifications.subscribeToken({
          device_token: _deviceToken,
          channel: "ios_alerts",
          type: Ti.Platform.name == 'android' ? 'android' : 'ios'
      }, function (e) {
          if (e.success) {
                  Ti.App.Properties.setString("subscribed", "true");
          }
      });
  
  };
  
  function receivePush(e) {
      Ti.API.warn("alert ricevuto" + JSON.stringify(e) )
      alert(e)
  }
  </code></pre>