사용자가 수신자의 메시지를 탭하면 상세보기 컨트롤러를 열어야하는 iMessage Extension을 개발 중입니다. 그러나 현재 탭핑 된 메시지를 구분하는 방법이 수신자 또는 발신자의 것입니다 (사용자 자신의 메시지).iMessage 확장 프로그램의 해당 메시지를 보낸 사람 또는받는 사람에게서 식별하는 방법은 무엇입니까?
2
A
답변
1
MSMessage
은 senderParticipantIdentifier
을 보유합니다.
MSConversation
s localParticipantIdentifier
및 remoteParticipantIdentifiers
과 비교할 수 없습니다.
좀 더 자세한 내용은 this WWDC 21016 video에서 확인할 수 있습니다.
0
대체 식별자가 있습니다. 당신은 어떤 논리적 관계를 구현해야 : -
우리는 다음 단계로 수행 할 수:
i) All the user must have UNIQUE-ID in your application like Passport-No,Bank Account Number.
ii)When send is tap on iMessage in compact mode then Unique-ID must be send to Server along with data like price,game move or so on . Server Fill the entry of Unique ID along with data in there Table.
iii)When User(sender or receiver) Taps the iMessage:- Unique-id on iMessage must be send to server along with the URL which we parse from the iMessage.
로직은 서버 측에서 시작 -
은그래서 서버 탭 후 고유-ID를받을 iMessage의 그래서 우리는 메시지 도움말을 만들 때 전에 데이터를 저장 한 표 테이블에 저장된 고유 ID을 비교하고 는 iMessage를의 탭 후 고유-ID을받을 수 있습니다. 둘 다 동일하면 발신자가 인 것으로 분명히 말할 수 있습니다. 수신자는 iMessage를 탭합니다. 주요 응용 프로그램이 우리가 주 응용 프로그램으로 이동 처음 에있는 UNIQUE-ID의
iv)On the response of above third steps :- Server will send the status 0 or 1 : If the server send the status 0 then it means it is sender itself else it is receiver have tap the iMessage .
를 구성하는 경우 우리가 쉽게 그룹 기능을 가능하게 UNIQUE-ID 에 의해을 공유하고 그룹에 의해 UNIQUE-ID를 공유하면 에 처음으로 iMessage 확장이 적용되고 앱이 까지 계속 유지됩니다.