I am having trouble with the Xamarin.form WebView.
I am trying to implement a webview tag in xaml and display an Amazon page as an example.
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns: x="http://schemas.microsoft.com/winfx/2009/xaml"
x: Class="SampleClass.Amazon"
xmlns: i18n = "clr-namespace: SampleClass; assembly=SampleClass"
Title="{i18n:Translate Amazon}">
<AbsoluteLayout>
<WebView Source="{StaticResource AmazonURL}"
AbsoluteLayout.LayoutBounds = "0,0,1,1"
AbsoluteLayout.LayoutFlags="All"/>
</AbsoluteLayout>
</ContentPage>
"Also, ""AmazonURL"" in the code is defined in ""App.xaml""
"<x:String x:Key="AmazonURL">http://amzn.to/1UKGpN9</x:String>
Now, when I check the actual machine and simulator (iOS), it doesn't show as follows:
The following page is displayed in Safari.
After checking, it does not appear in shortened URLs, but in normal URLs.
Usually, the string is longer at the URL, so to display it as a shortened URL
What should I do?
Professor, please.
"App Transport Security has blocked a cleartext HTTP" error appears.
If you search Google, you will find out the cause.
In this Info.plist configuration example, "Enable ATS by default and list domains not covered by ATS in Info.plist" I would add the following to the Info.plist
file under the XXX.iOS
project (I personally think it would be easier to edit with a text editor):
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>amzn.to</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
You should now be allowed to connect to amzn.to
and be able to view it in WebView.
547 Who developed the "avformat-59.dll" that comes with FFmpeg?
549 PHP ssh2_scp_send fails to send files as intended
537 Uncaught (inpromise) Error on Electron: An object could not be cloned
709 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
548 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.