applicazza / whatsapp_stickers

A Flutter plugin for adding stickers to WhatsApp.
MIT License
17 stars 36 forks source link

The "WhatsApp is not installed" exception doesn't throw on iOS #16

Open timekone opened 3 years ago

timekone commented 3 years ago

On Android, when WhatsApp is not installed, the WhatsappStickers.sendToWhatsApp() method throws WhatsappStickersException with WhatsappStickersException.cause "WhatsApp is not installed on target device!". This makes it fairly easy to show a dialog to users prompting them to install WhatsApp.

Unfortunately, on iOS, no exception is thrown. Instead, the following message appears 3 times in the console: -canOpenURL: failed for URL: "whatsapp://" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"

It would be great if iOS had the same behavior as Android.

whatsapp_stickers: 0.0.4 iOS: 14.4

sajawalFl commented 2 years ago

It throws an error WhatsApp is not installed on target device! even though it is (android)