我對xmpp使用https://github.com/robbiehanson/XMPPFramework。我正在嘗試獲取特定JID字符串的資源([email protected])。如何使用xmpp獲取資源jidstr iOS sdk
我用下面的代碼
XMPPUserCoreDataStorageObject *user = [[self fetchedResultsController] objectAtIndexPath:indexPath];
NSLog(@"userJID:%@",user.jidStr);
XMPPResourceCoreDataStorageObject* userResource = (XMPPResourceCoreDataStorageObject*)[user resourceForJID:[user.jid bareJID]];
NSLog(@"userResource:%@",userResource);
但問題是userResource返回null。
是否有任何其他途徑來資源[email protected]。這應該是像[email protected]/(userResource)。
你找到任何解決方案,我也面臨着當用戶處於脫機狀態的話,我想資源名稱卻是露出空同issue.I需要。 – Bittoo 2016-10-12 05:21:41