gpt4 book ai didi

ios - 如何从 XMPPRoster 获取好友?

转载 作者:行者123 更新时间:2023-11-28 19:03:20 25 4
gpt4 key购买 nike

我这样尝试:

XMPPRosterMemoryStorage *xmppRosterMemStorage = [[XMPPRosterMemoryStorage alloc] init];
XMPPRoster *xmppRoster = [[XMPPRoster alloc] initWithRosterStorage:xmppRosterMemStorage
dispatchQueue:dispatch_get_main_queue()];
[xmppRoster addDelegate:self delegateQueue:dispatch_get_main_queue()];
xmppRoster.autoAcceptKnownPresenceSubscriptionRequests = true;
xmppRoster.autoFetchRoster = true;
[xmppRoster activate:xmppStream];
[xmppRoster fetchRoster];

但是 xmppRoster 是空的。为什么?

最佳答案

名册项存储在[xmppRosterMemStorage mainThreadManagedObjectContext]中,您可以将它与NSFetchedResultsController一起用作UITableView的数据源,请参阅 iPhoneXMPP 示例XMPPFramework 源代码

关于ios - 如何从 XMPPRoster 获取好友?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22780945/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com