title: How to get userInfo JSON Value inside didReceiveRemoteNotification
body: <pre><code>func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject])
  {
          PFPush.handlePush(userInfo)
  
          if application.applicationState == UIApplicationState.Active
          {
              PFAnalytics.trackAppOpenedWithRemoteNotificationPayload(userInfo)
  
              if let msg = userInfo["test"] as? Dictionary&lt;String,AnyObject&gt;
              {
                  print(msg)
              }
          }
  </code></pre>
  
  <p>my userInfo["test"] JSON value is :</p>
  
  <pre><code>&gt; Printing description of userInfo:
  ▿ 3 elements
    ▿ [0] : 2 elements
      - .0 : message
      - .1 : 1235
    ▿ [1] : 2 elements
      - .0 : aps
      - .1 : 0 elements
    ▿ [2] : 2 elements
      - .0 : link
      - .1 : 
  </code></pre>
  
  <p>I can get my userInfo data, but i don't know why my msg value nothing ( not even nil just nothing to show)
  How can i go till print(msg) ? </p>
  
  <p><strong>UPDATED</strong> </p>
  
  <p>Here is what my push like :</p>
  
  <blockquote>
    <p>$this->parsepush->send( array( "channels" => ['test'], "data" => > $post_data ));</p>
  </blockquote>
  
  <p>inside $post_data example :</p>
  
  <blockquote>
    <p>$post_data = 
    json_encode(array
    ('link' => $link, 'message' => $message));\</p>
  </blockquote>
  
  <p>I've tried instruction from, yet i can't do a simple print too.</p>
  
  <p><a href="https://stackoverflow.com/questions/31223835/swift-didreceiveremotenotification-userinfo-cant-get-value">get Value from userInfo</a></p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Still skipped the "aps" part. </p>
  
  <p><a href="https://i.stack.imgur.com/7bkQK.png" rel="nofollow noreferrer">Picture 1</a> </p>
  
  <p><strong>My JSON</strong></p>
  
  <p>Here is my <code>Json</code> looks like : </p>
  
  <pre><code>&gt; {  
    "aps":{  
       "alert":{  
          "title":"$title",
          "body":"$message"
       },
       "badge":"1"
    },
    "adira":{  
       "link":"$link"
    }
  }
  </code></pre>
  
  <p>And this is my Code : </p>
  
  <pre><code>&gt;   func application(application: UIApplication, didReceiveRemoteNotification userInfo: [NSObject : AnyObject]) {
                //  PFPush.handlePush(userInfo)
         // PFAnalytics.trackAppOpenedWithRemoteNotificationPayload(userInfo)
          if let msg = userInfo["message"] as? String {
              print(msg)
              print("a")
          }     
          if let alertDict = userInfo["aps"]?["alert"] as? Dictionary&lt;String, String&gt; {
              print("title : ", alertDict["title"])
              print("body :", alertDict["body"]!)
              print("badge: ", alertDict["badge"]!)
              print("b")
          }      
          if let link = userInfo["link"] as? String {
              print(link)
              print("c")
          }
      }
  }
  </code></pre>
  
  <p>But still i can't get my <code>aps</code> data. still nil or nothing. </p>
  
  <p>If you want a specific code, just click link below :</p>
  
  <p><a href="http://codepad.org/RxrGQ9dV" rel="nofollow noreferrer">Full code AppDelegate.swift</a></p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>i use print(userInfo) directly and the printout is :</p>
  
  <blockquote>
    <p>Object has been saved. 
    [message: iOS push, aps: { }, link: ]</p>
  </blockquote>
  
  <p><strong>Update 2</strong></p>
  
  <p>I tried to push from parse.com, not my website (3rd party). 
  and this is what i get from normal print(userInfo)</p>
  
  <pre><code>&gt; [aps: {
      alert = 12345abc;
      sound = default;
  }]
  </code></pre>
  
  <p>So i guess i'll just changed and add something inside to my JSON From my Website to :</p>
  
  <pre><code>[aps:{
     alert = $message;
     sound = default;
     link = $link;
  }]
  </code></pre>
  
  <p>Something like that ?</p>