I am trying to fetch data using $http.get() method for hybrid app. This method is perfectly working for browser, android but not for ios. I know about TLS policy, so i have used secured server for this. I got too many post to add following code to Info.plist file
<key>NSAppTransportSecurity</key> <dict> <!--Connect to anything (this is probably BAD)--> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
But this piece of code is already there in the plist. I have also tried to modify the plist file but whenever i run ios project, this file is getting overwrite with default code. I am running with ios 10.
I have noticed one more thing that i am fetching data from local server i.e https://192.168.XXX.XXX in this case i am unable to fetch it with following error :
NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813)
but whenever i use https://www.mydomain.com then it works perfectly.
Where i am wrong ? Please suggest me a way to get ride of it.