There are two solutions for this :
Solutions 1 :
Info.plist
file add a dictionary with key 'NSAppTransportSecurity
''Allow Arbitrary Loads'
Plist
structure should appear as shown in below image.
Solution 2 :
Info.plist
file add a dictionary with key 'NSAppTransportSecurity
'NSExceptionDomains
''MyDomainName.com'
of type NSDictionaryNSIncludesSubdomains
' of type Boolean
and value set as YES
NSTemporaryExceptionAllowsInsecureHTTPLoads
' of type Boolean
and value set as YES
Plist
structure should appear as shown in below image.
Solution 2 is preferred since it allows only selected domain whereas solution 1 allows all insecure HTTP connections.