简体   繁体   中英

How do I share a link to Whatsapp on Xamarin.iOS?

I'm working on a cross-platform PLC project on Xamarin.Forms. Specifically on iOS and Android.

In one of the views I have 3 sharing buttons, one for Whatsapp, one for Snapchat and one for general sharing. The idea is that when the user taps on one of these he sends an invitation (a deep link) to his friends trough social media.

I've implemented some android-specific code to share a link trough Whatsapp or Snapchat when tapping those buttons, and to show the normal sharing screen to pick an app on the other share button. For this I just used Intent.SetPackage method to share on the specific apps.

On iOS however, even tho there's a code to open the general sharing screen, I couldn't find any code to send the link to Whatsapp or Snapchat specifically.

My question would be, is there a way to achieve this on iOS?

最后,我们找不到要查找的内容,但是我们注意到应用程序通常在iOS上只有一个通用的共享按钮,因此我们只在iOS中保留了普通的共享代码。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM