I am trying to implement the map function in my application. However, I would like the latitude and longitude to be transferred to the map from the object that is stored in the master data. However, when starting the application, there is a problem with setting the initial value of the object. I have tried 2 different methods so far, and each of them and the error I get is "Sending" to a double parameter of incompatible type "id". Any help would be greatly appreciated.
NSManagedObject *room = [NSEntityDescription insertNewObjectForEntityForName:@"Room" inManagedObjectContext:context]; double myLatitude = -1.228087; double myLongitude = 52.764397; [room setValue:@"H001" forKey:@"code"]; [room setValue:@"This is a description" forKey:@"roomDescription"]; [room setValue:myLatitude forKey:@"longitude"]; [room setValue:myLatitude forKey:@"latitude"];
source share