rohit1814 / flutter_open_whatsapp

A Flutter plugin to open WhatsApp and send message to single number.
MIT License
22 stars 23 forks source link

Crash on iOS #4

Open brunoramonalmeida opened 4 years ago

brunoramonalmeida commented 4 years ago

Not working on iOS, it crashes.

OS: Mojave 10.14.6 Xcode: 11.2.1 (11B53) Flutter: 1.14.4-pre.17 channel master

Tested on iPhone X

abd0ibrahim commented 4 years ago

@brunoramonalmeida +1

quetool commented 4 years ago

Yep, it does crash...

quetool commented 4 years ago

So, I've made a PR to fix this. https://github.com/rohit1814/flutter_open_whatsapp/pull/7

quetool commented 4 years ago

Anyway, I found this plugin quite useless as per you can simply use launch() function in Dart

dmvvilela commented 4 years ago

launch

How??

quetool commented 4 years ago

launch

How??

launch("whatsapp://send?phone=$phone&text=$text"); or launch("https://api.whatsapp.com/send?phone=$phone&text=$text");

plus, launch() function has a few nice arguments you can play with

dmvvilela commented 4 years ago

Still crashes.. i made it happen using launch with whatsapp api.. but it redirects to the browser before going to the app.

quetool commented 4 years ago

Still crashes.. i made it happen using launch with whatsapp api.. but it redirects to the browser before going to the app.

Did you look inside launch()? There are arguments could help you... Anyway, I think this repo is not the place to discuss it

dmvvilela commented 4 years ago

Yeah true..

But it actually worked.. the canLaunch was returning false so i did not call launch().. but it was because i didnt have whatsapp on the emulator.. on the phone it worked! Thanks!

danielgomezrico commented 4 years ago

Im not sure if this is related to an issue I reported here https://github.com/rohit1814/flutter_open_whatsapp/issues/14, maybe I duplicated it?