telenordigital / connect-ios-sdk

Docs 📒👉
https://telenordigital.github.io/id-docs.telenordigital.com/integrate-ios-sdk.html
Apache License 2.0
9 stars 8 forks source link

Validation of the response of a request to the well known endpoint. #37

Closed SergioDan closed 6 years ago

SergioDan commented 6 years ago

Hi,

I am working on a project that uses this sdk, and I found a crash using a limited or very bad internet connection.

When that request reaches a timeout or the server responds an error, the data is nil, and, as there is no validation, the app crashes.

In order to avoid the crash, I added a simple validation of the callback parameters, and changed the way to create that request, because of the deprecation of [NSURLConnection sendAsynchronousRequest:queue:completionHandler:] method in iOS 9.

In addition, I updated the platform version in the podspec based on the latest version of the aerogearhttp dependency. My experience: when you add and install this pod in a fresh project, and you try to compile that project, you get an error about the iOS version. (see https://github.com/aerogear/aerogear-ios-http/blob/master/AeroGearHttp.podspec)

SergioDan commented 6 years ago

Created a new one, more organized.