-
Notifications
You must be signed in to change notification settings - Fork 143
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
feat: support iOS #381
Comments
Thanks for starting this crucial service for the Flutter ecosystem. |
the code push service available in China? |
We have not tested in China yet. Happy to work with you to figure it out. Please reach out on Discord: https://discord.gg/shorebird See also #435 |
Super egerly waiting for code push for iOS. App updates takes more time in case of iOS rather than Android. If would be nice if iOS support can also be prioratized? |
Seconded. We are waiting for this to be supported before adopting Shorebird! |
Would love iOS support. I build a multiplayer app (android + ios, and flutter web planned to launch soon), so not having iOS is a bit of a deal breaker :/ |
Huh, a GitHub issue that actually encourages +1 and "me too" (count this as a "me too") |
Agreed, Flutter is the best way to do cross platform. So iOS support is a hard requirement for me. Support that and I'm onboard :) |
👍 |
code push is not allowed by the app store guidelines
|
@nilsreichardt it does make an exception for JavaScript code that works for ReactNative apps. Not sure how that enables Dart code push, especially considering you probably won't be pushing Dart code but pushing AOT snapshots instead. |
Dart has lots of ways to compile to interpreted code (including JavaScript). We're evaluating exactly which set of options will provide the best experience for devs, but whatever we release will of course help devs comply with the App Store guidelines. Code Push is incredibly common in the industry. All the largest apps I know of use some form of code push. Many use JavaScript yes (via React Native, WebViews, ionic, or just running JS in JavaScriptCore), others also use other interpreted languages (like lua in games). Code Push (despite earlier complaints from stores) is very well trodden ground, the question is just how best to wire it up for Dart, since as others have suggested Dart (intentionally) does not use interpreted code on iOS today. I'm working on writing up our options now, which may include us even writing our own (new) interpreter for Dart. We'll see. |
@aler Apple allows it as long as it's not introducing new functionality. Hotfixes are completely fine to be updated over the air. With Shorebird it will be down to us developers to follow the guidelines or not. |
Just wanted to note that I've started working on planning our iOS support. It may take us several weeks to get something working though. Will update when I know more. |
Code push makes sense only in iOS |
I'm genuinely curious about how you accomplish this. If anyone's interested, here are the "notes on codepush". |
Just find out shorebird , we are a flutter team that maintains a a white label e-learning app. |
Hi, with iOS support I will subscribe. Flutter developer here that also hates the app store approval processes :) |
It works! https://youtu.be/7KDgFvdogsE We have some work before it's ready for production, but we'll be releasing initial support to customers in the coming days/weeks. |
@eseidel In your prior comment you noted all the existing publicly known code push on iOS users make use of interpreted languages as explicitly allowed in section 3.3.2 of the Apple Developer Program License Agreement, so now that you've got the post above of the demo of Shorebird working on iOS, are you able to comment on how it works? |
iOS is currently blocked on me fixing a two remaining crashers in our custom Dart interpreter. Our Dart interpreter is based on the Google Dart team's ARM Simulator (which they use for testing/debugging ARM compiler logic from non-ARM machines) and never had support for "ffi" code (which is required by Flutter to run). We added support for ffi (hence our previous demo), but that support is somewhat complicated (I had to write some custom arm64 assembly) and I'm still shaking out the last few bugs. Given the low-level of the system each bug requires several hours of concentrated time to fix. Now that I'm back from FlutterCon this is my #1 priority. Good news is we also have a Dart compiler expert joining us in 2 weeks time, at which point our pace on iOS should dramatically increase (since I have other responsibilities beyond iOS hacking). Thanks for your patience. Two known blockers:
You can see other known iOS issues (which will not block release) with iOS label: ios |
We ended up taking the Dart "Simulator" and modifying it to support Flutter. So it's an interpreter, yes, but the odd part is that the format that it interprets is a subset of ARM64, which is less efficient than say the previous Dart interpreter was (which interprets a higher-level format). The benefit of using a subset of ARM64, is that it makes the second part of our design easier/possible, in that we intend to only run your new code in the interpreter, and whenever possible have our fork of Dart know how to jump back into the pre-compiled (and pre-signed) ARM64 code included in the IPA. That second part (which we're currently calling the "linker") doesn't work yet, but will soon. Right now focused on fixing bugs in our interpreter so that part can launch and we'll follow up with the (massive) speed improvements from the "linker" in the weeks after "iOS preview" launches. |
Thanks @eseidel, that all makes sounds reasonable given the requirements of Apples TOS and I must say wow, its a very impressive technical achievement to get that done! Using the ARM64 simulator actually does make very good sense given your requirements here and is really a variation on the use of WASM by both browsers, other app clients and server-side. And thank you for being so open about the details on the implementation and your plan for supporting iOS. To be honest, your responses here have actually completely changed my outlook on Shorebird: from being ambivalent about it due to Apple TOS restrictions, to now being excited about the possibilities it brings to Flutter app dev-ops and to being happy to use it with both my own apps and recommend it on future client projects. Very much looking forward to being able to test out Shorebird on Android and iOS in the near future 👍🏻 |
I've spent the last week working on #829, turns out it blocks any progress on #654 as well. I'm close. I have my in-ffi-callback-calling-back-to-Simulator trampoline working, it's able to call Dart code and have the Dart code execute and return. Currently the Dart code is smashing the C stack so it crashes after executing the Dart, but I think I know why and I'm hopeful I may be able to get past that today. 🤞 Given how difficult modifying this code is (for me) I don't have a firm timeline on when iOS preview will be ready, but I'm still trying to ship it in the next two weeks (July) as promised. As we announced yesterday, @kmillikin is joining our team in two weeks and I expect will greatly accelerate our work here. He knows the Dart VM, compilers and assembly much better than I do. I'm still hoping to have iOS Preview launched before he joins and then he and I will work to finish the (probably couple months of) work to get iOS up to full speed execution and reach feature parity with our Android offering. |
As of 0.11.0, Shorebird now supports iOS! 🎉 We've called this "alpha" as there may be unforeseen bugs in this first release. The main work to this release was building a custom interpreter for Dart for iOS. This was done as part of complying with the App Store guidelines. In this alpha release, Dart code always runs in this interpreter (even with no updates) which makes it needlessly slow. We'll be making this all much faster in the coming months. Please let us know if you encounter any issues! I'm closing this issue for now. Lots left to do, but we'll track that work in other issues. |
A placeholder bug for our eventual iOS support. Please feel encouraged to upvote this bug to let us know if this is important to you.
The text was updated successfully, but these errors were encountered: