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
Flutter support for Apple Watch #28901
Comments
wait #15288 |
This comment has been minimized.
This comment has been minimized.
#15288 is closed now. Is there some basic instructions available so I can test to build simple flutter app for watchOS simulator? |
bump I went through, cleaned up my plugins and enabled bitcode support throughout the project, I still get errors saying that flutter cannot be found and that its not supported. |
This comment has been minimized.
This comment has been minimized.
You can write a native apple watch app and you can communicate with flutter via streams, you do have to link up the app yourself but it can be done. |
But that’s not a Flutter app on the Watch. Flutter should run on an Apple Watch as AFAIK everything it needs to run on iOS is available also in watchOS. I’ve already developed an application for watchOS with SwiftUI and I was quite impressed on how well it performs without draining the battery. So I think Flutter will also perform quite well on watchOS as it has many similarities with SwiftUI. |
@peazz can please you share a bit more detail on how you would link a Flutter iOS App with a Watch OS App (written in Swift) using streams? Do you know of any examples in the App Store where the devs have done this so we can test out the UX of both? (Thanks!) Obviously this thread is for adding Apple Watch support to Flutter and that will be amazing, |
It’s done the same way a native iPhone app is linked with a Watch app. You just use streams to route payloads from/to Flutter. |
I think this likely needs some documentation help from both the framework and tool teams --- assigning appropriate labels. Feel free to re-label if I'm wrong.. |
To support a real Flutter watch app, there's more than documentation work to be done. The engine would need to create a version of the Flutter framework APIs that links on and subclasses WatchKit or SwiftUI instead of UIKit, similar to the Figuring out bitcode was blocking that work, I believe. @dnfield Does that all sound right? |
Yes - the bitcode piece should not be a blocker anymore, but there still needs to be embedding code written for WatchKit. AFAIK, this is not on anyone's radar actively. But it should be possible to do. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as off-topic.
This comment was marked as off-topic.
Hi! I have a question: Why do we have to set bitcode when adding Apple Watch app? |
Apple will reject your app if |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
There is no update. When there is an update someone will likely comment on this issue. Please just 👍 to be subscribed to notifications instead of adding noise. |
Now that bitcode is no longer required for watchOS applications, is there any other requirement that prevents flutter from supporting WatchOS? Thanks in advance! |
A similar question was asked about tvOS, my answer at #47928 (comment) is also applicable to watchOS. Substitute "tv" with "watch" as you read 🙂
(the wireless part of this comment likely isn't relevant for watches paired to an iPhone, but it would still require tooling work to make it a new recognized target device type)
(the display hooked up is not relevant for watchOS, but keeping watches paired to iPhones upright in a testing lab is a whole can of worms)
Additionally, the watchOS SDK is more different compared to iOS than the tvOS SDK is, so would also need to implement the WatchKit semantics in the Flutter embedder, |
Hello @jmagman thanks for the overview on what needs to be done. My question is is the Flutter team even considering working on this? Because there are some custom engines that we can currently use to run Flutter on apple Tv, so it seems the that the challenge is not really making it possible but instead how the Flutter team would maintain the support for Apple TV. One experience I had was, I was able to build/run Flutter on Apple TV, and the only problem that made me discontinue the project was because Plugins (shared_preferences specifically) wasn't work and I didn't have deep knowledge of the Flutter engine to do the necessary changes. |
@pedromassango |
Plugins are a pain point for custom embedders. For example the eLinux embedder made their own plugins: https://github.com/sony/flutter-elinux-plugins Example camera plugin: Tooling code that parses it: https://github.com/sony/flutter-elinux/blob/51a1d685901f79fbac51665a967c3a1a789ecee5/lib/elinux_plugins.dart#L76 There's been a little work supporting sharing more code between macOS and iOS plugins (#115337) so in theory a plugin could support Apple TV and watchOS as well in a shared iOS/macOS directory, but Flutter tooling doesn't support that right now. |
Latest status: #28901 (comment)
is it possible to create a watchOS application with flutter ?
The text was updated successfully, but these errors were encountered: