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

[quick_actions] Extract iOS implementation into a separate package. #4702

Merged
merged 15 commits into from
Feb 8, 2022

Conversation

mvanbeusekom
Copy link
Contributor

@mvanbeusekom mvanbeusekom commented Jan 26, 2022

Moves the native iOS implementation from the quick_actions package into its own quick_actions_ios package. I also duplicated the method channel implementation as suggested in issue flutter/flutter#94224.

Temporarily marks quick_actions as unpublishable to allow the implementations to be moved, rather than copied and deleted, in order to better preserve git history. A follow-up PR will restore it to publishable form.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter]. (Note that unlike the flutter/flutter repo, the flutter/plugins repo does use dart format.)
  • I signed the [CLA].
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I listed at least one issue that this PR fixes in the description above.
  • 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 updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test exempt.
  • All existing and new tests are passing.

Creates a new `quick_actions_ios` directory and adds
the following meta-data files:
- `AUTHORS`: copied from the `quick_actions` package and added my name;
- `CHANGELOG.md`: new file adding description for release 0.6.0+9;
- `LICENSE`: copied from the `quick_actions` package;
- `README.md`: new file adding the standard platform implementation
  description;
- `pubspec.yaml`: new file adding package meta-data for the
  `quick_actions_ios` package.
A one to one copy of the `quick_actions/ios` folder to
`quick_actions_ios/` using the following command:
```
cp -R ./quick_actions/ios ./quick_actions_ios/
```
For the Cocaopod package to be registered correctly the .podspec file
name needs to match the name of the Flutter package.
This commit makes a direct copy of the `quick_actions/example` app to
the  `quick_actions_ios` package. After the copy the `example/android`
folder is removed as it doesn't serve a purpose in the WKWebView specific
package. Commands run where:
```
cp -R ./quick_actions/example ./quick_actions_ios/
rm -rf ./quick_actions_ios/example/ios
```
Duplicates the default method channel implementation from the platform
interface package into the iOS specific package (see issue
flutter/flutter#94224).
Updates the method channel implementation by:
- Renaming the class from `MethodChannelQuickActions` to
  `QuickActionsIos`;
- Adding implementation of the `registerWith` method;
- Renaming the method channel on the Dart side.
Duplicates the method channel implementation tests and update them so
they test the `QuickActionsIos` class (see also issue
flutter/flutter#94224).
Updates the code in example app to work with the new quick_actions_ios
package.
Exclude the quick_actions_ios package from the build all plugins app
CI step as it currently conflicts with the ios implementation that
is still part of the quick_actions package.
@mvanbeusekom mvanbeusekom force-pushed the issue/94224_quick_actions_ios branch 2 times, most recently from a45e70c to ee28283 Compare February 8, 2022 11:38
Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

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

LGTM with one last thing I missed.

packages/quick_actions/quick_actions/pubspec.yaml Outdated Show resolved Hide resolved
@mvanbeusekom mvanbeusekom added the waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land. label Feb 8, 2022
@fluttergithubbot fluttergithubbot merged commit 9d32c83 into flutter:main Feb 8, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p: quick_actions platform-ios waiting for tree to go green (Use "autosubmit") This PR is approved and tested, but waiting for the tree to be green to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants