yhatt / marp

The site of classic Markdown presentation writer app
https://yhatt.github.io/marp/
MIT License
7.89k stars 398 forks source link

iOS Support #180

Closed pataiji closed 5 years ago

pataiji commented 7 years ago

I want to use marp on a iPad.

krokofant commented 7 years ago

Since marp is based on Electron which supports Windows, Linux and macOS I doubt this is possible without a major overhaul to support a cordova-like build.

dimkir commented 7 years ago

Great question, but the short answer is NO.

Electron (which in 2014 used to be called "atom-shell"), is basically bundle of Chromium + Nodejs + bit of magic. When you add Electron to your project, behind the scenes Chromium and Nodejs are downloaded and added to your system. On Desktops those will run as "normal applications with full(ish) access to the system" (files, sockets, etc; no need for root/admin even). But on mobile systems all apps must be run "in a sandbox" (remember granting permissions to the app?). When running "in the sandbox" they do not have full access to the OS and it's resources. Thus even simple NodeJS file access APIs may not work properly. This "sandbox environment" makes porting Electron to mobile platforms highly unlikely.

You can see original discussion of this problem here (note that they still call Electron - "atom-shell") https://github.com/electron/electron/issues/5541

Another big problem you would hit on mobile devices - requirement for different UI language. Imagine running Marp, VSCode or Atom editor on the phone? What size is the font supposed to be, in order to be readable on small screen? How would you even access top menu bar? Thus this particular UI language problem IMHO is even more serious than technical limitations of porting Electron to mobile OSes.

UPDATE 1 There seems to be talk about being able to port Electron it to Android but this would be a major PITA and seems like noone wants to throw time into that. Also iOS seems to be a no-no anyways.

ps. however if you're interested in "in reverse" process: build an app in Ionic and then package it with Electron this seems to be possible

yhatt commented 5 years ago

Marp Next is planning to migrate into web-based app. Even though it, iOS support had blocked by the critical rendering bug in WebKit. (Bug 23113)

But recently this problem has been improved. We have created polyfill for WebKit browser for our Marpit framework. By this polyfill, the technology preview of Marp Web can be worked in Safari now!

marp-on-ios

Because we made an outlook on iOS support, I've marked Supports in Marp Next tag to this issue.

pataiji commented 5 years ago

That's the best news in 2019!