Foundry376 / Mailspring

:love_letter: A beautiful, fast and fully open source mail client for Mac, Windows and Linux.
https://getmailspring.com/
GNU General Public License v3.0
15.54k stars 905 forks source link

[Feature Request] iOS Support #1100

Closed dgattey closed 6 years ago

dgattey commented 6 years ago

What would it take to get this project working on iOS? The underlying Mailsync sounds like it'd be compatible since it's C++. There are great wrappers like Ionic/Cordova/etc around a web app framework. Anyone have experience here? I'd love to get a true cross-platform solution working and I love Mailspring on macOS. Mostly just looking for insight and if it's a no-way-it's-impossible or if it's a could-work-with-a-lot-of-effort type deal.

Thanks 😃

bengotow commented 6 years ago

Hey! This is a great question—technically the mailsync core is plain C++ and would definitely compile for iOS (and Android too, though it might get messy.) A bunch of folks have asked for a mobile app, but I've put it off because the existing UI / Electron app isn't really appropriate for mobile - pretty much everything would need to be re-written. There are some aspects of the app that would be nice to keep (eg: swipe to archive in the thread list), but getting a nice experience on mobile would require re-writing that sort of thing using the native APIs. While the whole desktop app is JavaScript, it runs in Node's runtime and not in the standard browser runtime—removing dependencies like fs would be tricky...

It's also becoming really difficult to keep up with the stock mobile apps on iOS and Android—in iOS 12, Apple Mail has some cool behaviors (like the "compose a message on half the screen while looking at another app" UI) that aren't possible for third-party developers. I think doing a Mailspring mobile app would require ~2-3 people working pretty much full-time for a year, and then working on a regular basis to add new features / address SDK changes with each iOS / Android release.

What would actually be great I think is to find an existing mobile email app (maybe something shutting down? 😬 ) and modify it so that snoozed emails, reminders, send laters, etc. are synced with Mailspring! I think that'd be a pretty doable project and might get users the highest bang for their buck. We'll see!

dgattey commented 6 years ago

Yea, that makes sense. Didn't know the state of Electron on mobile and if that was doable. Hear of anything shutting down? I'm in the market for a new email client after Slack bought Astro, and I stumbled on this project. Let me know if you need iOS help in the future :)

IngwiePhoenix commented 3 years ago

This is pretty much a "beating the dead horse" scenario. Seing as it was opened 2018 though, it's quite easy to say that there are other or even new arguments to be made for a mobile version.

First, let's talk about iOS and Android: Electron, as much as I personally have a bit of a disdain towards it as the Chromium engine isn't exactly known to be resource friendly, has become the defacto standard for non-native app developers. As in, develop it in Electron and deploy it wherever it can run (as in, enough resources are available). All the way from a Raspberry Pi to laptops and desktops. But apps like Discord have proven that writing an app for all the platforms is very possible by utilizing the same UI but applying features such as media queries in CSS to make the design responsive. Once the responsiveness is handled, the rest is less of a problem.

So, for Mailspring to have an iOS client, it's mainly the UI that needs rewriting. But, that introduces another question: Running Mailcore2, the C++ stuff. Well, there are two ways to do so: Either as a subprocess, or by using WebAssembly.

I did some experimenting with WebAssembly recently and it's very possible to get applications running tht weren't initially designed to do so. That, and by using a bit of trickery in terms of sockets and EM_ASM, it's possible to allow C++ applications to call into JavaScript for things that aren't native. Like, fetching requests or interacting with sockets. Well, my testing so far has been on Emscripten. But frameworks like Cherp (a soley LLVM based approach) or just plain WASM targeting with wasm32-unknown-wasi and running via Wasmtime or Wasmer is very possible - although WASI does not have a good socket implementation yet, which is possibly a major no-no for a Mailcore2 in WASM implementation as it's whole stick is to interact with mailservers...and, well, that is networking. :) Emscripten does have a bit of support for that, but it's not particularily great, but works for the most part.

Now, one other topic: Linux phones Currently, with Purism and Pine64 working on making linux based smartphones accessible to the market, there is something to be said about a possibility for the convergence of a Linux desktop: It might come to a point where a single linux phone can run full fledged desktop applications that either use libhandy for responsiveness or just plain Electron, since this is already a feature due to how CSS - well, the "browser" - works. There might be a scenario where you have a Linux phone, connect it to something like a NexDock and then use a full desktop.

But convergence and responsibility go a little further and yet below: Phones and tablets If you were to release an iOS and/or Android app, you'd probably end up getting questions from people regarding iPads and Android tablets. Going from a smartphone screen to the width and height of a tablet is also an aspect of responsiveness.

So, the TL;DR of all this:

But this requires development time. It is not impossible - but someone has to actually do it. :) I'd love to have the very same email client running on all the platforms that I use - and I am very platform-fluent. An iPhone for when I am traveling, a MacBook for when I visit friends and family to cover my basic computing needs, a Windows desktop at home that also has Linux on a separate partition for when I work with more specific tools that I could do via WSL or a VM but would love to use my native performance for instead. Just having the same set of apps - Discord, Mailspring, Element - on all of them would be neat. Let's see if we can get there! =)

CodeMouse92 commented 3 years ago

As mentioned above, it would require significant community effort to create a Mailspring client for iOS or Android.

We are in the process of migrating issues to Discourse, which can better facilitate discussion and discovery, and so GitHub Issues can focus on issues that are confirmed and slated for resolution in the near term. Learn more about the changes here.

As part of this, we've migrated this issue to Discourse:

https://community.getmailspring.com/t/ios-or-android-mobile-support/94

Please consider joining that community and continuing the discussion there! Bonus: if you join and reply to the issue, the moderators can make an effort to reassign the post to you, so you get the credit for it.

We're closing and locking the issue here as part of this migration. Rest assured, this doesn't mean the issue is being discarded or ignored.

We hope to see you on Discourse soon!

-The Mailspring Team