title: Open the youtube app from flutter app on iOS
body: <p>I basically want to open a specific youtube video from my app, when a button is pressed. If the youtube app is installed on the user's device, then the video should be opened in the youtube app (and not in the browser or a separate webview).</p>
  
  <p>I used the <code>url_launcher</code> package for that, and it works fine on android. However on iOS the youtube app is not opened even if it is installed, instead a separate web window is opened, where the corresponding youtube url is shown as a webpage.</p>
  
  <p>I thought, that I could override this behaviour like so:</p>
  
  <pre><code>_launchURL() async {
    if (Platform.isIOS) {
      if (await canLaunch('youtube://www.youtube.com/channel/UCwXdFgeE9KYzlDdR7TG9cMw')) {
        await launch('youtube://www.youtube.com/channel/UCwXdFgeE9KYzlDdR7TG9cMw');
      } else {
        if (await canLaunch('https://www.youtube.com/channel/UCwXdFgeE9KYzlDdR7TG9cMw')) {
          await launch('https://www.youtube.com/channel/UCwXdFgeE9KYzlDdR7TG9cMw');
        } else {
          throw 'Could not launch https://www.youtube.com/channel/UCwXdFgeE9KYzlDdR7TG9cMw';
        }
      }
    } else {
      const url = 'https://www.youtube.com/channel/UCwXdFgeE9KYzlDdR7TG9cMw';
      if (await canLaunch(url)) {
        await launch(url);
      } else {
        throw 'Could not launch $url';
      }
    }
  }
  </code></pre>
  
  <p>but it didn’t work. In case you wonder, I use the following imports:</p>
  
  <pre><code>import 'dart:io' show Platform;
  import 'package:url_launcher/url_launcher.dart';
  </code></pre>
  
  <p>I am pretty sure, the <code>youtube://</code> URL-Scheme works (launches the YouTube app), because I tested it on third party apps (Launch Center Pro and Pythonista).</p>
  
  <p>The last thing I was not able to test, is if the <code>Platform.isIOS</code> is really true on my IPhone.</p>
  
  <p>Is there a working way, to open the YouTube App from flutter?</p>