Repository navigation
Explore home widgets for iOS 14 #60026
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.e: OS-version specificAffects only some versions of the relevant operating systemAffects only some versions of the relevant operating systemengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform teamwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Description
Might be challenging considering that the APIs expect serializable archived views from swift UI.
Based on a new Widget build target extension in the xcode project. We'll have to try it out first.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.Affects or could affect many people, though not necessarily a specific customer.e: OS-version specificAffects only some versions of the relevant operating systemAffects only some versions of the relevant operating systemengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specificallyiOS applications specificallyteam-iosOwned by iOS platform teamOwned by iOS platform teamtriaged-iosTriaged by iOS platform teamTriaged by iOS platform teamwaiting for responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Activity
noahjoshua commentedon Jun 22, 2020
I'm planning on just exposing my flutter data in swift and then learning swift UI for the widgets...
sathwikdoddi commentedon Jun 29, 2020
Any guesses as to when iOS 14 Homescreen widgets for flutter will be available?
fadhlisulaimi commentedon Jul 4, 2020
@sathwikdoddi i think it will take a while. The current flutter version itself isn't compatible with ios14 and xcode 12. This will be the highest priority for the flutter team right now. And ios widgets is something new, it's developed mostly using swift UI and xcode (if im correct). Integrating that building tools itself for flutter wont be easy as we developed flutter using VSC or android studio. I can talk more about this but u get my point
dancojocaru2000 commentedon Sep 16, 2020
A temporary workaround would be a way to facilitate easy data communication between the widget written with SwiftUI and the app written in Flutter.
aytunch commentedon Sep 16, 2020
Since home widgets are something completely new for iOS users, they will most probably have an extra interest towards apps utilizing this feature and these apps will have higher downloads. Thats my humble opinion. So I believe supporting home widgets asap while it is still new is a very important topic. Can someone explain why is it difficult to implement this feature in terms of swiftUI?
fadhlisulaimi commentedon Sep 17, 2020
@aytunch
If I can answer on behalf of the community here, I believe it's not difficult to implement home widgets using swift UI. Just that we have to learn swift UI and implement it on native iOS side. Most of us here only have knowledge in Dart/Flutter and we dont know how to code in native Android/iOS. So learning how to code in swift UI is another obstacle for us if we wanna implement widgets in iOS. Likewise for Android widgets as well, i think one has to code in native Java/Kotlin too.
aytunch commentedon Sep 17, 2020
@fadhlisulaimi So what you are saying is, Platform Channels can not be used in this scenario. It is not as simple as waiting for someone to write a plugin for camera/etc. Every developer needs to code these widgets through native ways. If that's true, it might not still be the end of the world. How hard can it be to display a very basic and simple UI? no state management no nothing. We just need to supply SwiftUI with some simple data stream and expect to see the widget UI reflect this data. How does the data transfer supposed to happen if we are ok with writing swiftUI? can you please share your thoughts
?
fadhlisulaimi commentedon Sep 17, 2020
@aytunch
Swift UI is a declarative UI framework similar to Flutter. Meaning you develop the UI and logic on the fly (same with Flutter). Correct me if im wrong, but creating a flutter package or library to cater to this is nearly impossible as different users has differents way of designing the widget UI.
We can use platform channels to pass information or data between native OS and Flutter but let's say you have created the iOS widget you want using Flutter, how are you suppose to pass this info and translate it in native SwiftUI code. The only way I can think of is creating the UI using Swift UI and pass whatever data you wanna show using platform channels.
But there is another problem. Based on the official documentation it's stated that platform channels only support languages Objective-C, Java, Kotlin and Swift (via Objective-C interop). Swift UI is not yet supported. So this is another challenge we have to face.
minikin commentedon Sep 17, 2020
@fadhlisulaimi
Swift UIis not a language it's a framework written inSwift. It's not a big deal and definitely not a deal-breaker for me that Flutter doesn't have the possibility to create a home widget.What would be great and a time saver that's to have Swift support in pigeon.
Maybe @gaaclarke can share some plans about that, pls?
Jeremywhiteley commentedon Sep 17, 2020
Looks like they made progress with React Native.
Maybe this will help? https://link.medium.com/nbeePxDoR9
15 remaining items
imReker commentedon Nov 6, 2020
Guys, I'm making a Home Widget demo for both iOS and Android by using Flutter directly.
Project is here: https://github.com/imReker/FlutterHomeWidget
ABausG commentedon Nov 6, 2020
I'm the one from twitter. I have published a first rough Version here:
https://pub.dev/packages/home_widget
It supports Interfaces to send Data to both Android and iOS
I have added a guide on the necessary steps for both platforms in the README
If you have a question or find an issue please file it in the repository:
https://github.com/ABausG/home_widget
juliavi commentedon Nov 12, 2020
Thanks! worked perfectly!
ztigunes commentedon Dec 13, 2020
According to the apple review document, the home widget should not just open. If the application is opened from the home widget, how can I understand and redirect the page.
Piinks commentedon Oct 11, 2023
@xster or maybe @leighajarett is this a dupe of #26134? If so, we can close to consolidate there.
github-actions commentedon Nov 1, 2023
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
github-actions commentedon Nov 15, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.