See https://github.com/tigase/tigase-swift/issues/16
I've fixed the issue in the stable branch and ported it to master. Both versions were checked that they work after this change.
stable
See https://github.com/tigase/tigase-swift/issues/16