私はxmpframeworkでiphoneアプリを作成していますが、すべてうまくいきますが、私のプロフィール画像を次のコードで更新したいと思います。私はいくつかの不正な再帰的なvCard-temp要求をサーバーに持ってきました。しかし、写真が更新され、私の名簿のすべての友人に通知されました。出力と説明私はこれまでのところ、以下のこの問題を引き起こすが、私はそれを修正することができます。ここで、iは把握することはできません見つけたもの(iOS)ジャバーサーバーへの再帰vCard-tempリクエスト?
my vCardTemp: *nil description*
MyApp[60625:6c1b] XMPPvCardCoreDataStorage: Triggering save (pendingRequests=0)
MyApp[60625:207] MyAppDelegate: xmppStream:didReceiveIQ: - E49C843A-5A05-4148-A4CF-B400062A83C0
MyApp[60625:207] MyAppDelegate: xmppStream:didReceivePresence: - <presence xmlns="jabber:client" from="[email protected]/1948110991326183732515886" to="[email protected]/1948110991326183732515886">
<status>At work</status>
<x xmlns="vcard-temp:x:update">
<photo>1f6401ddea76826fddc4cd7ddc17741db6c9dabc</photo>
</x>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://code.google.com/p/xmppframework" ver="VyOFcFX6+YNmKssVXSBKGFP0BS4="></c>
<x xmlns="vcard-temp:x:update">
<photo>c3b2d65259a4fc1d37e56777697d4f5a9730fb03</photo></x><c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://code.google.com/p/xmppframework" ver="VyOFcFX6+YNmKssVXSBKGFP0BS4="></c>
</presence>
MyApp[60625:5323] XMPPRosterCoreDataStorage: handlePresence:xmppStream:
//repeat start from here, and the DidReceivePresence: will grow into tons of lines with the samthing
MyApp[60625:207] XMPPRosterCoreDataStorage: userForJID:xmppStream:managedObjectContext:
MyApp[60625:1e0b] XMPPRosterCoreDataStorage: userForJID:xmppStream:managedObjectContext:
MyApp[60625:207] XMPPRosterCoreDataStorage: resourceForJID:xmppStream:managedObjectContext:
MyApp[60625:5323] XMPPvCardCoreDataStorage: Triggering save (pendingRequests=0)
MyApp[60625:207] MyAppDelegate: xmppStream:didReceiveIQ: - (null)
MyApp[60625:1e0b] XMPPvCardCoreDataStorage: Triggering save (pendingRequests=0)
MyApp[60625:207] MyAppDelegate: xmppStream:didReceivePresence: - <presence xmlns="jabber:client" from="[email protected]/1948110991326183732515886" to="[email protected]/1948110991326183732515886">
<status>At work</status>
<x xmlns="vcard-temp:x:update">
<photo>1f6401ddea76826fddc4cd7ddc17741db6c9dabc</photo>
</x>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://code.google.com/p/xmppframework" ver="VyOFcFX6+YNmKssVXSBKGFP0BS4="></c>
<x xmlns="vcard-temp:x:update">
<photo>c3b2d65259a4fc1d37e56777697d4f5a9730fb03</photo>
</x>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://code.google.com/p/xmppframework" ver="VyOFcFX6+YNmKssVXSBKGFP0BS4="></c>
<x xmlns="vcard-temp:x:update">
<photo>c3b2d65259a4fc1d37e56777697d4f5a9730fb03</photo>
</x>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://code.google.com/p/xmppframework" ver="VyOFcFX6+YNmKssVXSBKGFP0BS4=">
</c>
</presence>
//repeat the above in the rest of the output with more and more "vcard-temp:x:update"
以下
//I clicked on the button
-(void)updatevCardButtonClicked{
XMPPvCardTemp *vCardTemp = [[[self appDelegate] xmppvCardTempModule] myvCardTemp];
NSLog(@"my vCardTemp: %@", vCardTemp);
NSData *tempImage = [self getDataFromImage:[self resizeImage:userImage]];
[vCardTemp setPhoto: tempImage];
[[[self appDelegate] xmppvCardTempModule]updateMyvCardTemp:vCardTemp];
}
。
//i found that these two "SEND" cause the problem, the app just keep sending these two
SEND: <iq type="get" to="[email protected]"><vCard xmlns="vcard-temp"/></iq>
SEND: <presence>
<x xmlns="vcard-temp:x:update">
<photo>1f6401ddea76826fddc4cd7ddc17741db6c9dabc</photo>
</x>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://code.google.com/p/xmppframework" ver="VyOFcFX6+YNmKssVXSBKGFP0BS4="/>
<x xmlns="vcard-temp:x:update">
<photo>1f6401ddea76826fddc4cd7ddc17741db6c9dabc</photo>
</x>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://code.google.com/p/xmppframework" ver="VyOFcFX6+YNmKssVXSBKGFP0BS4="/>
<x xmlns="vcard-temp:x:update">
<photo>f93ee3918c7baaf095edb9f6bede892c603161af</photo>
</x>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://code.google.com/p/xmppframework" ver="VyOFcFX6+YNmKssVXSBKGFP0BS4="/>
<x xmlns="vcard-temp:x:update">
<photo>f93ee3918c7baaf095edb9f6bede892c603161af</photo>
</x>
<c xmlns="http://jabber.org/protocol/caps" hash="sha-1" node="http://code.google.com/p/xmppframework" ver="VyOFcFX6+YNmKssVXSBKGFP0BS4="/>
</presence>
//this presence keep growing as you can see the repeated parts