0

I am creating this interactive messages app.

Every time I compose a message and send to the other side and use this command:

  [messageTemplateLayout setSubcaption:[NSString stringWithFormat:@"$%@",self.activeConversation.localParticipantIdentifier.UUIDString]];

I get the other side's name.

For example, if I´m on the simulator using Kate and I send a message to John Appleseed, the message is sent with the subcaption John Appleseed and vice-versa. In other words: John Appleseed receives a message with his own name and this is true for Kate too.

Shouldn't the localParticipantIdentifier be who is sending the message?

Duck
  • 34,902
  • 47
  • 248
  • 470

1 Answers1

2

It seems you have come across a known issue with the iPhone simulator. There is an open radar for this issue that says that it works correctly on an actual device but not on the simulator. See this link.

Dean
  • 939
  • 10
  • 30
  • so, it is impossible to identify the local or the remote users correctly? – Duck Sep 14 '16 at 14:19
  • It seems that this bug occurs only on the simulator. From the linked open radar report it seems you can refer to the senderParticipantIdentifier to get the person who is sending the message. – Dean Sep 14 '16 at 14:22
  • ok, but it is very risk to develop something without testing... OK, I can test on the device if it appear correct, but I cannot have the messages back and forth to test the whole thing... anyway, thanks" – Duck Sep 14 '16 at 14:26
  • Oh great, I have tested this on device, sending a message to a friend of mine... I appear on the caption as "mobile user"... I love these half cooked device Apple push to us. – Duck Sep 14 '16 at 14:29