Showing Participant Names in Simulator

Per https://developer.apple.com/videos/play/wwdc2016/224/ (circa 41 minutes), I am attempting to display a participant name in a caption by prefixing the participant's uuidString with a dollar sign. However, when running my iMessage app with the simulator, the UUID is never replaced, resulting in a caption that looks like this: "$E0712CEB-AC45-4343-9ABE-5B264919D9A1 won!" I haven't tried it on a device yet, but will report back when I do. In any case, does anyone have any idea why this isn't working?

Answered by artmin in 155141022

Gilby - this code works for me (in Simluator and device)


        let layout = MSMessageTemplateLayout()
        layout.caption = messageSession == nil ? "$\(conversation.localParticipantIdentifier.uuidString) started a game" :
            "$\(conversation.localParticipantIdentifier.uuidString) made a move"
Accepted Answer

Gilby - this code works for me (in Simluator and device)


        let layout = MSMessageTemplateLayout()
        layout.caption = messageSession == nil ? "$\(conversation.localParticipantIdentifier.uuidString) started a game" :
            "$\(conversation.localParticipantIdentifier.uuidString) made a move"

Bah...just updated to Beta 3, and it works fine now!

Showing Participant Names in Simulator
 
 
Q