Can someone tell me why I'm getting below connection errors? I'm able to hit the API URL via the browser but when my app is trying to make a connection, errors comes up. Is it my network? Do I need some kind of certificate on my machine?
Can someone tell me why I'm getting below connection errors? I'm able to hit the API URL via the browser but when my app is trying to make a connection, errors comes up. Is it my network? Do I need some kind of certificate on my machine?
I finally got this issue fixed following below steps:
#1. Install Zscaler Root CA on iOS simulator and enable full trust
a. Export Zscaler root CA from my MAC Keychain
b. Drag and drop exported cert on to my Xcode build in iPhone simulator (this will initiate installation)
c. Go to (within the simulator) General Settings -> About -> Certificate Trust Settings and enable full trust for Zscaler Root CA.
#2. Add NSAllowsArbitraryLoads within the Xcode Project
a. Add additional key into Project's info.plist config file
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
The trace shows that the connection to openweathermap.org is passed through the ZScaler security proxy which replaces the root CA in order to intercept and analyze the traffic. Since this root CA is not trusted by your app for this site the connection fails. For more information see Public Key Pinning (PKP) and Zscaler.