A sends request to B

didSend IQ :<iq type="set"><query xmlns="jabber:iq:roster"><item jid="B@msg.myapp.com"/></query></iq>
Presence sent <presence type="subscribe" to="B@msg.myapp.com"/>
didReceive IQ :<iq xmlns="jabber:client" type="set" id="519-24946" to="A@msg.myapp.com/d18fdedf"><query xmlns="jabber:iq:roster"><item jid="B@msg.myapp.com" subscription="none"/></query></iq>
didReceive IQ :<iq xmlns="jabber:client" type="result" to="A@msg.myapp.com/d18fdedf"/>
didReceive IQ :<iq xmlns="jabber:client" type="set" id="817-24947" to="A@msg.myapp.com/d18fdedf"><query xmlns="jabber:iq:roster"><item jid="B@msg.myapp.com" ask="subscribe" subscription="none"/></query></iq>

B receives request from A

Presence received from===A@msg.myapp.com to==B@msg.myapp.com of type===subscribe

B responds to A on accept

Presence sent <presence type="subscribed" to="A@msg.myapp.com"/>
didSend IQ :<iq type="set"><query xmlns="jabber:iq:roster"><item jid="A@msg.myapp.com"/></query></iq>
Presence sent <presence type="subscribe" to="A@msg.myapp.com"/>
didReceive IQ :<iq xmlns="jabber:client" type="set" id="647-24949" to="B@msg.myapp.com/f0b1eb2b"><query xmlns="jabber:iq:roster"><item jid="A@msg.myapp.com" subscription="from"/></query></iq>
didReceive IQ :<iq xmlns="jabber:client" type="set" id="852-24951" to="B@msg.myapp.com/f0b1eb2b"><query xmlns="jabber:iq:roster"><item jid="A@msg.myapp.com" subscription="from"/></query></iq>
didReceive IQ :<iq xmlns="jabber:client" type="result" to="B@msg.myapp.com/f0b1eb2b"/>
didReceive IQ :<iq xmlns="jabber:client" type="set" id="379-24952" to="B@msg.myapp.com/f0b1eb2b"><query xmlns="jabber:iq:roster"><item jid="A@msg.myapp.com" ask="subscribe" subscription="from"/></query></iq>
didReceive IQ :<iq xmlns="jabber:client" type="set" id="294-24955" to="B@msg.myapp.com/f0b1eb2b"><query xmlns="jabber:iq:roster"><item jid="A@msg.myapp.com" subscription="both"/></query></iq>
Presence received from===A@msg.myapp.com to==B@msg.myapp.com of type===subscribed
Presence received from===A@msg.myapp.com to==B@msg.myapp.com of type===available

A receives response from B

didReceive IQ :<iq xmlns="jabber:client" type="set" id="580-24950" to="A@msg.myapp.com/d18fdedf"><query xmlns="jabber:iq:roster"><item jid="B@msg.myapp.com" subscription="to"/></query></iq>
Presence received from===B@msg.myapp.com to==A@msg.myapp.com of type===subscribed
Presence received from===B@msg.myapp.com to==A@msg.myapp.com of type===available
didReceive IQ :<iq xmlns="jabber:client" type="set" id="328-24953" to="A@msg.myapp.com/d18fdedf"><query xmlns="jabber:iq:roster"><item jid="B@msg.myapp.com" subscription="to"/></query></iq>
Presence received from===B@msg.myapp.com to==A@msg.myapp.com of type===subscribe
Presence sent <presence type="subscribed" to="B@msg.myapp.com"/>
didReceive IQ :<iq xmlns="jabber:client" type="set" id="992-24954" to="A@msg.myapp.com/d18fdedf"><query xmlns="jabber:iq:roster"><item jid="B@msg.myapp.com" subscription="both"/></query></iq>