Reputation: 35
I have Xamarin PCL project where I need to show some HTML content in webview. In Android app everything working perfect, but in IOS I have problem with display images. Because its not local content I disable ATS for the app.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads </key>
<true/>
</dict>
Some times I run app webview show image but in most cases its not showing, it just show question mark in a blue square like on attached image.
question mark in a blue square:
Upvotes: 2
Views: 748
Reputation: 2708
You should add as well the key referring to the content of the web views.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads </key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
</dict>
Anyway, I would suggest you include the specific domain you want to exclude from the ATS because unless you have a very good reason for it, Apple will reject your application in the review process.
Upvotes: 1