-
Notifications
You must be signed in to change notification settings - Fork 28.8k
Make plugins Swift-first on macOS #33997
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
Merged
stuartmorgan-g
merged 1 commit into
flutter:master
from
stuartmorgan-g:macos-swift-plugins
Jun 6, 2019
Merged
Make plugins Swift-first on macOS #33997
stuartmorgan-g
merged 1 commit into
flutter:master
from
stuartmorgan-g:macos-swift-plugins
Jun 6, 2019
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instead of sharing the iOS codepath that uses an ObjC generated plugin registrant and expecting plugins to have an ObjC interface layer, switch to generating a Swift registrant and expecting plugins to have a Swift interface. This means plugins on macOS that use Swift won't need an ObjC wrapper, and plugins that use ObjC will need a Swift wrapper (inverting the structure relative to iOS).
stuartmorgan-g
added a commit
to stuartmorgan-g/flutter-desktop-embedding
that referenced
this pull request
Jun 6, 2019
Updates the example, testbed, and plugins on macOS to account for flutter/flutter#33997 example_plugin is now entirely Swift, with the ObjC wrapper removed; the other plugins remain ObjC for now, with a Swift wrapper. The podspecs have been adjusted to remove the public ObjC headers. The example has been switched from an empty ObjC registrant to an empty Swift registrant, and testbed has been updated with the results of re-running `flutter run` with the new tooling support, and switched to calling the Swift registrant as well.
jonahwilliams
approved these changes
Jun 6, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
stuartmorgan-g
added a commit
to google/flutter-desktop-embedding
that referenced
this pull request
Jun 6, 2019
Updates the example, testbed, and plugins on macOS to account for flutter/flutter#33997 example_plugin is now entirely Swift, with the ObjC wrapper removed; the other plugins remain ObjC for now, with a Swift wrapper. The podspecs have been adjusted to remove the public ObjC headers. The example has been switched from an empty ObjC registrant to an empty Swift registrant, and testbed has been updated with the results of re-running `flutter run` with the new tooling support, and switched to calling the Swift registrant as well.
tango5614
added a commit
to tango5614/flutter
that referenced
this pull request
Jun 7, 2019
* master: (25 commits) Increase daemon protocol version for getSupportedPlatforms (flutter#33980) skip web test on crazy import (flutter#34017) Compatibility pass on flutter/foundation tests for JavaScript compilation. (1) (flutter#33349) 0602dbb Roll src/third_party/dart 9dcb026b26..6e0d978505 (72 commits) (flutter#34027) Add chrome stable to dockerfile and web shard (flutter#33787) Codegen an entrypoint for flutter web applications (flutter#33956) Revert "Reland "Text inline widgets, TextSpan rework" (flutter#33946)" (flutter#34002) Revert "Re-add deprecated method for plugin migration compatibility. (flutter#34006)" (flutter#34022) Remove print (flutter#34004) Manual roll the engine to land the timing API (flutter#33989) Make plugins Swift-first on macOS (flutter#33997) Re-add deprecated method for plugin migration compatibility. (flutter#34006) make sure version check includes hotfixes (flutter#33459) Respond to AndroidView focus events. (flutter#33901) Add 'doctor' support for Windows (flutter#33872) Add use_frameworks to macOS Podfile template (flutter#33987) [Material] Create a themable Range Slider (continuous and discrete) (flutter#31681) Updating names to correct versioning convention (flutter#33865) Whitelist adb.exe heap corruption exit code. (flutter#33951) [flutter_tool] Fix 'q' for Fuchsia profile/debug mode (flutter#33846) ...
kiku-jw
pushed a commit
to kiku-jw/flutter
that referenced
this pull request
Jun 14, 2019
Instead of sharing the iOS codepath that uses an ObjC generated plugin registrant and expecting plugins to have an ObjC interface layer, switch to generating a Swift registrant and expecting plugins to have a Swift interface. This means plugins on macOS that use Swift won't need an ObjC wrapper, and plugins that use ObjC will need a Swift wrapper (inverting the structure relative to iOS).
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Instead of sharing the iOS codepath that uses an ObjC generated plugin
registrant and expecting plugins to have an ObjC interface layer, switch
to generating a Swift registrant and expecting plugins to have a Swift
interface.
This means plugins on macOS that use Swift won't need an ObjC wrapper,
and plugins that use ObjC will need a Swift wrapper (inverting the
structure relative to iOS).
Related Issues
None
Tests
I added the following tests: None
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.///
).flutter analyze --flutter-repo
) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?
This is a breaking change for desktop, but desktop is explicitly unstable at the moment.