Openfire get full JID from xmpp server or client for IQ Request

I am working on an iOS app that uses the XMPPFramework and openfire xmpp server. I am almost done, but am stuck with getting my iOS to receive IQ request. I was able to receive messages and send IQ request but not receive IQ requests.

I tried sending the IQ request from iOS client and the XMPP server, but the iOS app just ignored the IQ request. After a long time of research, I narrowed down my issue. It turns out that I was sending IQ request to the bare JID. The Bare JID was routed to the server and not directly to the client.

The solution that I found was to get the full JID and set the “to” IQ message to the full JID and not the bare JID. I am having difficulties figuring out how I can get the resource, or make the bare JID to a full JID.

Could someone please give me some suggestions? I want to be able to get a list of all the full JID given an username.