Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No implementation found for method launch app/checkAvailability #8

Open
ukeOnFire opened this issue Aug 8, 2019 · 1 comment
Open

Comments

@ukeOnFire
Copy link

hi @pichillilorenzo
I have just started to make an app iOS compatible and it seems that what has worked fine on Android is causing problems on iOS.

I tried to check the app 'calshow://', here's the exception for one of the calls:

#0      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:314:7)
<asynchronous suspension>
#1      AppAvailability.checkAvailability (package:flutter_appavailability/flutter_appavailability.dart:38:42)

Thanks for your work, it's amazingly smooth on Android!

@pankti16
Copy link

Use a try-catch block:

try{
      print(await AppAvailability.checkAvailability(Platform.isIOS ? "youtube://" : "com.google.android.youtube"));
      AppAvailability.launchApp(Platform.isIOS ? "youtube://" : "com.google.android.youtube").then((_) 
      {
          print("App launched!");
      }).catchError((err) {
           Scaffold.of(context).showSnackBar(SnackBar(
               content: Text("App not found!")
           ));
          print(err);
       });
     }
     catch(ex)
     { 
        print(ex);
        Scaffold.of(context).showSnackBar(SnackBar(
                        content: Text("App not found!")
                    ));
     }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants