Check the output panel in XCode for the error displayed. One common error is "The resource could not be loaded because the App Transport Security policy requires the use of a secure connection".
You can resolve this issue by updating the info.plist file.
- From your project's target, open info.plist.
- Add a key named App Transport Security Settings as a Dictionary.
- Add a subkey named Allow Arbitrary Loads as a Boolean with a value set to YES.
You can also update the source code of info.plist:
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> </dict>
Updated 8 days ago