skip to Main Content
var phoneNumber = "917390123456";
var urlString = "whatsapp://send?phone=$phoneNumber";

// Convert the String URL to a Uri object
final Uri url = Uri.parse(urlString);

if (await canLaunchUrl(url)) {
    await launchUrl(url);
}

How can I use the Launcher_url for IOS

I get the error:

PlatformException (PlatformException(channel-error, Unable to establish connection on channel., null, null))

2

Answers


  1. you can check this dependency, which will help you send messages
    https://pub.dev/packages/whatsapp

    Login or Signup to reply.
  2. Add these lines to your /ios/Runner/Info.plist file if you want to use external links.

    <key>LSApplicationQueriesSchemes</key>
    <array>
      <string>sms</string>
      <string>tel</string>
    </array>
    

    You can also use this link : https://wa.me/$phonenumber

      launchUrl(Uri.parse("https://wa.me/91xxxxxxxx?text=Hello"),
       mode: LaunchMode.externalApplication,);
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search