title: Sending float to parameter of incompatible type id
body: <p>I'm in the middle of creating a button that uses core data to save a name, xCoordinate, and yCoordinate of a point annotation. I can successfully persist the name, but I keep getting this error when I try to save a coordinate. I've logged the correct data, I just can't seem to save it.</p>
  
  <p>When I try to setValue for the newPOI, I get an error that reads:
  Sending 'float' to parameter of incompatible type 'id'.</p>
  
  <p>In the data model, the attribute is set to float.
  self.latitude and self.longitude are of type float. </p>
  
  <p>My method is a little rough because I'm relatively new to this, but I would appreciate any feed back you could give me concerning the error. Below is my code for the method. I don't understand where 'id' comes into play here.</p>
  
  <pre><code>-(void) saveSelectedPoiName:(NSString *)name withY:(float)yCoordinate withX:(float)xCoordinate{
      self.pointFromMapView = [[MKPointAnnotation alloc] init];
      self.annotationTitleFromMapView = [[NSString alloc] init];
  
      AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
      NSManagedObjectContext *context = [appDelegate managedObjectContext];
  
      self.annotationTitleFromMapView = name;
      self.latitude = yCoordinate;
      self.longitude = xCoordinate;
  
      NSEntityDescription *entityPOI = [NSEntityDescription entityForName:@"POI" inManagedObjectContext:context];
      NSManagedObject *newPoi = [[NSManagedObject alloc] initWithEntity:entityPOI insertIntoManagedObjectContext:context];
      //create new POI record
      [newPoi setValue:name forKey:@"name"];
      [newPoi setValue:yCoordinate forKey:@"yCoordinate"]; &lt;---error happens here for yCoordinate.
  
      NSError *saveError = nil;
  
      if (![newPoi.managedObjectContext save:&amp;saveError]) {
          NSLog(@"Unable to save managed object");
          NSLog(@"%@, %@", saveError, saveError.localizedDescription);
      }
  }
  </code></pre>