diff options
author | Rui Marinho <me@ruimarinho.net> | 2017-02-01 23:21:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-01 23:21:19 +0000 |
commit | 72699e34b2f4b3e8a939eebe03240ca7511b50e7 (patch) | |
tree | 6122783d062af13ae998198a7cf4c98819ac6262 | |
parent | 8d4e38a86fc87690507a14fb0704c9ea5fbfeab2 (diff) | |
download | xamarin-forms-72699e34b2f4b3e8a939eebe03240ca7511b50e7.tar.gz xamarin-forms-72699e34b2f4b3e8a939eebe03240ca7511b50e7.tar.bz2 xamarin-forms-72699e34b2f4b3e8a939eebe03240ca7511b50e7.zip |
[iOS,macOS] Use NS constructor from string to parse correctly the string (#734)
-rw-r--r-- | Xamarin.Forms.Platform.iOS/Forms.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Xamarin.Forms.Platform.iOS/Forms.cs b/Xamarin.Forms.Platform.iOS/Forms.cs index d6e7e07f..d51e1495 100644 --- a/Xamarin.Forms.Platform.iOS/Forms.cs +++ b/Xamarin.Forms.Platform.iOS/Forms.cs @@ -228,10 +228,11 @@ namespace Xamarin.Forms public void OpenUriAction(Uri uri) { + var url = NSUrl.FromString(uri.ToString()) ?? new NSUrl(uri.Scheme, uri.Host, uri.LocalPath); #if __MOBILE__ - UIApplication.SharedApplication.OpenUrl(new NSUrl(uri.AbsoluteUri)); + UIApplication.SharedApplication.OpenUrl(url); #else - NSWorkspace.SharedWorkspace.OpenUrl(new NSUrl(uri.AbsoluteUri)); + NSWorkspace.SharedWorkspace.OpenUrl(url); #endif } |