Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

@franciscojma86
Copy link
Contributor

@franciscojma86 franciscojma86 commented Dec 9, 2019

Description

Adds the macos implementation of the url_launcher plugin.
Tested by adding an example app that runs the e2e tests. This example app is a copy of the url_launcher/example app, with a modified pubspec.yaml that depends on url_launcher from pub, and url_launcher_macos from path. There is also a minor change in main.dart where the last widget is removed since there is no macOS implementation for that method.

The Swift implementation of the plugin was ported from https://github.com/google/flutter-desktop-embedding/tree/master/plugins/flutter_plugins/url_launcher_fde

Related Issues

flutter/flutter#41721

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@franciscojma86 franciscojma86 changed the title Url macos [url_launcher] Adds macOS package with example app Dec 9, 2019
@franciscojma86 franciscojma86 removed the WIP label Dec 9, 2019
@franciscojma86 franciscojma86 requested a review from amirh December 9, 2019 22:15
Copy link
Contributor

@amirh amirh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you mention in the PR description that the example app is a copy of the one for url_launcher and call out what has changed (pubspec.yaml and main.dart?)

I'm not qualified to review the Swift code, so RSLGTM for that part.

@@ -0,0 +1,58 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be the the standard license header we use?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, updated

@franciscojma86 franciscojma86 requested a review from amirh December 9, 2019 23:46
Copy link
Contributor

@amirh amirh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@franciscojma86 franciscojma86 merged commit 2f01d48 into flutter:master Dec 10, 2019
@domesticmouse
Copy link
Contributor

Any idea when this will be published on pub.dev? I have a desktop sample app in progress that uses url_launcher and I'd love to drop the reference to url_launcher_fde.

@franciscojma86
Copy link
Contributor Author

@domesticmouse It is on pub.dev now, but not endorsed yet. You can still use it though.

@domesticmouse
Copy link
Contributor

@franciscojma86 I have no idea what endorsed means, but using url_launcher: ^5.3.0 without url_launcher_fde results in a macOS desktop binary that throws MissingPluginException (MissingPluginException(No implementation found for method canLaunch on channel plugins.flutter.io/url_launcher))

@franciscojma86
Copy link
Contributor Author

Endorsed means that you would just be able to use url_launcher: ^5.3.0 and should work, but in this case you have to do a bit more. Try adding to your pubspec:

url_launcher: ^5.3.0
url_launcher_macos: ^0.0.1

sungmin-park pushed a commit to sungmin-park/flutter-plugins that referenced this pull request Dec 17, 2019
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants