title: iOS/Parse - Sending Push Notifications to Specific User
body: <p>I am working on an app that allows "current user" to view an event posted by another user. When the current user join the event I'd like to send a push notification to the user who posted the event. I have set up push notification for my app with Parse. I am able to send push notifications to all users via a channel, but I still cannot figure out how to send a push notification to the specific user. I am able to receive the push notifications on my phone.</p>
  
  <p>I tried to associate the device with a user with the following code: </p>
  
  <pre><code>PFInstallation *installation = [PFInstallation currentInstallation];
  installation[@"user"] = [PFUser currentUser];
  [installation saveInBackground];
  </code></pre>
  
  <p>Unfortunately - this makes my app crash. Not sure why there is not error message.</p>
  
  <p>I was thinking of using the following code to send the push notification to a specific user. (This is code i got from Parse Documentation) </p>
  
  <pre><code>// Create our Installation query
  PFQuery *pushQuery = [PFInstallation query];
  [pushQuery whereKey:@"injuryReports" equalTo:YES];
  
  // Send push notification to query
  PFPush *push = [[PFPush alloc] init];
  [push setQuery:pushQuery]; // Set our Installation query
  [push setMessage:@"Willie Hayes injured by own pop fly."];
  [push sendPushInBackground];
  </code></pre>
  
  <ol>
  <li>How do you associate the installation with the current user? </li>
  <li>Am I in the right track? </li>
  <li>If you know of a good tutorial, please let me know or if you have implemented something similar and could help me with this problem. </li>
  </ol>
  
  <p>Thank you, </p>