Initial work done in https://github.com/aerogear/aerogear-ios-sdk/pull/24 Going to review, improve this changes and close this ticket.