0
我試圖讓服務器功能和XMPP配置爲:XMPPFramework服務器功能
_xmppCapabilitiesStorage = [XMPPCapabilitiesCoreDataStorage sharedInstance];
_xmppCapabilities = [[XMPPCapabilities alloc] initWithCapabilitiesStorage:_xmppCapabilitiesStorage];
_xmppCapabilities.autoFetchMyServerCapabilities = YES;
日誌說:
SEND:
<?xml version="1.0" encoding="utf-8"?>
<iq type="get" to="myserver.im" id="4FE37B35-8078-41B0-BCAF-DC6CFF04DD33">
<query xmlns="http://jabber.org/protocol/disco#info"/>
</iq>
RECV:
<?xml version="1.0" encoding="utf-8"?>
<iq xmlns="jabber:client" type="result" id="4FE37B35-8078-41B0-BCAF-DC6CFF04DD33" from="myserver.im" to="[email protected]/MyChatClient">
<query xmlns="http://jabber.org/protocol/disco#info">
<identity category="account" type="registered"/>
<identity category="pubsub" type="pep"/>
<feature var="http://jabber.org/protocol/pubsub#retrieve-default"/>
<feature var="urn:myserver:im:groupchat#sync"/>
<feature var="http://jabber.org/protocol/pubsub#purge-nodes"/>
<feature var="vcard-temp"/>
<feature var="http://jabber.org/protocol/pubsub#subscribe"/>
<feature var="http://jabber.org/protocol/pubsub#subscription-options"/>
<feature var="http://jabber.org/protocol/pubsub#create-nodes"/>
<feature var="http://jabber.org/protocol/pubsub#outcast-affiliation"/>
<feature var="http://jabber.org/protocol/pubsub#get-pending"/>
<feature var="http://jabber.org/protocol/pubsub#multi-subscribe"/>
<feature var="http://jabber.org/protocol/pubsub#presence-notifications"/>
<feature var="urn:myserver:im:groupchat"/>
<feature var="urn:xmpp:ping"/>
<feature var="jabber:iq:register"/>
<feature var="http://jabber.org/protocol/pubsub#delete-nodes"/>
<feature var="urn:myserver:im:filetransfer"/>
<feature var="http://jabber.org/protocol/pubsub#config-node"/>
<feature var="http://jabber.org/protocol/pubsub#retrieve-items"/>
<feature var="http://jabber.org/protocol/pubsub#auto-create"/>
<feature var="http://jabber.org/protocol/disco#items"/>
<feature var="http://jabber.org/protocol/pubsub#item-ids"/>
<feature var="http://jabber.org/protocol/pubsub#meta-data"/>
<feature var="jabber:iq:roster"/>
<feature var="urn:xmpp:mam:1"/>
<feature var="http://jabber.org/protocol/pubsub#instant-nodes"/>
<feature var="http://jabber.org/protocol/pubsub#modify-affiliations"/>
<feature var="http://jabber.org/protocol/pubsub#persistent-items"/>
<feature var="http://jabber.org/protocol/pubsub#create-and-configure"/>
<feature var="http://jabber.org/protocol/pubsub"/>
<feature var="http://jabber.org/protocol/pubsub#publisher-affiliation"/>
<feature var="http://jabber.org/protocol/pubsub#access-open"/>
<feature var="http://jabber.org/protocol/pubsub#retrieve-affiliations"/>
<feature var="jabber:iq:version"/>
<feature var="http://jabber.org/protocol/pubsub#retract-items"/>
<feature var="urn:xmpp:time"/>
<feature var="http://jabber.org/protocol/pubsub#manage-subscriptions"/>
<feature var="jabber:iq:privacy"/>
<feature var="jabber:iq:last"/>
<feature var="http://jabber.org/protocol/commands"/>
<feature var="http://jabber.org/protocol/offline"/>
<feature var="urn:xmpp:carbons:2"/>
<feature var="http://jabber.org/protocol/address"/>
<feature var="http://jabber.org/protocol/pubsub#publish"/>
<feature var="http://jabber.org/protocol/pubsub#collections"/>
<feature var="http://jabber.org/protocol/pubsub#retrieve-subscriptions"/>
<feature var="http://jabber.org/protocol/disco#info"/>
<feature var="jabber:iq:private"/>
<feature var="http://jabber.org/protocol/rsm"/>
</query>
</iq>
以後怎麼檢查哪些功能確實存在?我在XMPPCapabilities
或XMPPCapabilitiesCoreDataStorage
中看不到任何功能列表。我錯過了什麼嗎?例如,我想檢查<feature var="urn:myserver:im:filetransfer"/>
是否存在。 XMPPFramework在哪裏保存並保存了功能列表?任何提示都非常感謝。
我覺得這個鏈接有用:http://jonathonstaff.com/blog/tackling-file-transfers-with-the-xmppframework/ – Jay
@Jay謝謝,我已經檢查過了,但是這並沒有說明XMPPFramework在哪裏保存了這些功能列表。我正在調試框架以找出答案。 –