microsoft / EmbeddedSocial-iOS-SDK

SDK for interacting with the Microsoft Embedded Social service from inside your iOS app
MIT License
19 stars 11 forks source link

SSL/Wifi Errors investigations #693

Open IgorPopov-MS opened 7 years ago

IgorPopov-MS commented 7 years ago

Using Charles I fake https connection, Alamofire returns such error:

"NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)"

screen shot 2017-11-06 at 3 52 59 pm png

Swagger returns result as nil. No error is shown on UI. So in general if we get into non secure connection app runs without crashes and surprises.

Note: in develop plist allows insecure connection, this should be turned off for production.

sharadagarwal commented 7 years ago

@IgorPopov-MS thank you for investigating this. Can you clarify which develop plist setting needs to change? Do you mean that NSAllowsArbitraryLoads needs to be set to false? If we do that, does the Swagger library then throw an error?

IgorPopov-MS commented 7 years ago

by default NSAllowsArbitraryLoads is set to TRUE, in our EmbeddedSocial-Example app which consumes EmbeddedSocialFramework it's explicitly set to FALSE which enables working with Mock Server through HTTP.

So i think its better to turn of this key for release build.

IgorPopov-MS commented 7 years ago

If user connects to "captive portal" nothing happens, the internet is blocked by hotspot and no feed is loaded. When you enable internet connection via "captive portal" app runs as expected. Tested on Mcdonalds hotspot.