我正在制作一个基于iMessage扩展的回合制游戏。
我想要能够检查谁(发送者或接收者)在iMessage被点击时打开它。例如:
如果发件人打开它:
remind them that it is the other persons turn如果接收者打开它:
allow them to take their turn发布于 2016-09-20 07:07:39
您希望根据MSMessage的localParticipantIdentifier检查所选MSConversation的MSConversation。
以下是当MSMessage将变为活动状态时如何执行此操作的示例:
override func willBecomeActive(with conversation: MSConversation) {
if let selectedMessage = conversation.selectedMessage {
if conversation.localParticipantIdentifier == selectedMessage.senderParticipantIdentifier {
// you sent this iMessage
} else {
// you recieved this iMessage
}
}
}https://stackoverflow.com/questions/39583382
复制相似问题