title: How to make a property of a Parse Installation object be a pointer to a User object?
body: <p>Currently, when a user opens my Parse app for the first time, a new <code>Installation</code> object is created on the Parse database with their <code>installationId</code> and other properties. </p>
  
  <p>Once they log in, it updates this <code>Installation</code> object's <code>userId</code> property  with the <code>objectId</code> string of that person's <code>User</code> object. It's nothing more than a string that happens to be equivalent to the respective <code>User</code>s objectId though, what I want is for it to also be a pointer to that <code>User</code> object. </p>
  
  <p>I've tried setting the <code>userId</code> property to be a pointer instead of a string from the website, but this gives me an error from the app stating <code>Error: invalid type for key userId, expected object, but got string</code>, because my iOS code is sending it over as a string, and not as a pointer to the <code>User</code> class. </p>
  
  <p>How can I make the userId string point to the <code>User</code> class from my code? The docs are <a href="https://www.parse.com/docs/ios_guide#objects-updating/iOS" rel="nofollow">here</a>, but I'm having trouble applying it to this use case. </p>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>- (void)viewWillAppear:(BOOL)animated {
      [super viewDidLoad];
      if ([PFUser currentUser]) {
          NSLog(@"User is logged in");
  
          PFInstallation *currentInstallation = [PFInstallation currentInstallation];
          NSString *userId = [PFUser currentUser].objectId;
  
          //userId[@"parent"] = [PFUser currentUser];
  
          [currentInstallation setObject:userId forKey: @"userId"];
          [currentInstallation saveInBackground];
  
      } else {
          NSLog(@"User is not logged in");
          //[welcomeLabel setText:@"Not logged in"];
      }
  }
  </code></pre>