Issue
I am new to xamarin and swift and I am creating a demo and in that, I have to write down some iOS related code which is mentioned below in code but the code is swift and I want to add that code in my .cs file so that I can use it with my UI page and it is giving errors as mentioned in the below image. It would be great if you can guide me with this and provide me with what code should I need to write and where.
UIApplication.shared.open(redirectUrl, options: [:], completionHandler: { success in
if success {
// Handle success.
} else {
// Handle failure. Most likely app is not present on the user's device. You can redirect to App Store using these links:
}
})
Solution
This should work for you. My advise, please refer to the official documentation it's all there.
var param = new NSDictionary();
UIApplication.SharedApplication.OpenUrl(new NSUrl("https://google.com"), param, (completed) =>
{
if (completed)
{
}
else
{
}
});
Answered By - saket kumar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.