sharee.bike-App/TINK/TINK.iOS/Device/ExternalBrowseService.cs

24 lines
539 B
C#
Raw Normal View History

2022-08-30 15:42:25 +02:00
using Foundation;
2021-05-13 20:16:41 +02:00
using TINK.iOS.Device;
2022-08-30 15:42:25 +02:00
using TINK.Model.Device;
2021-05-13 20:16:41 +02:00
using UIKit;
2022-08-30 15:42:25 +02:00
using Xamarin.Forms;
2021-05-13 20:16:41 +02:00
[assembly: Dependency(typeof(ExternalBrowseService))]
namespace TINK.iOS.Device
{
2022-09-06 16:08:19 +02:00
public class ExternalBrowseService : IExternalBrowserService
{
/// <summary> Opens an external browser. </summary>
/// <param name="p_strUrl">Url to open.</param>
public void OpenUrl(string p_strUrl)
{
var l_oUrl = NSUrl.FromString(p_strUrl);
if (l_oUrl == null)
return;
2022-08-30 15:42:25 +02:00
2022-09-06 16:08:19 +02:00
UIApplication.SharedApplication.OpenUrl(l_oUrl);
}
}
2021-05-13 20:16:41 +02:00
}