Will Apple's Killing WebView in 2020 Mean FoldingText Stops Working?

I know that beginning in April 2020 Apple will reject new apps for the App Store that use WebView, and in December will reject all app updates that use it. This, of course, is to move all developers to WKWebView.

Since FoldingText uses the deprecated WebView, does this mean it will stop working in macOS 10.16? It’s still working for me in 10.15, but I’m moving into a couple of projects where it will be necessary to move to another Markdown editor if FoldingText will stop working this year.

Saw this, and I apologize for jumping on a thread but have been trying to find a good solution to this for years…

I recently migrated from WebView to WKWebView, and was ultimately able to get most things working (sometimes by using some painful workarounds like embedded web servers, but that is another story.)

The one thing I haven’t been able to do is get printing to work properly. If anyone has any good tips on getting printing to work from WKWebView, I would love to hear them! I imagine that would be an issue for TaskPaper as well, unless there is an obvious solution I have just not discovered…

Thanks, and apologies for the quasi- off-topic question.

Hi, Fletcher. Unfortunately, I have no insight at all regarding your question.

I actually use MultiMarkdown Composer as well as FoldingText: I use FoldingText for my writing (since its syntax hiding works best for my concentration), and I use MultiMarkdown Composer for proofreading and editing documents (since version 4 of your app is rock solid with long documents).

I had been wondering before you joined the thread if MultiMarkdown Composer 4 will also be updated with WKWebView, or whether that’s something that will be in an upgrade to version 5.

@Max – thanks for the kind words.

When Brett Terpstra and I decided to work on nvUltra (https://nvultra.com/), one of the decisions we had to make was WKWebView vs WebView. At the time I did not know about the April 2020 deadline (I don’t believe it had been announced at that point, but who knows…) I had previously looked at WKWebView for Composer and I couldn’t get it to work.

  1. The synchronized scrolling functionality required access to the preview DOM, which was not available in WKWebView. I was finally able to provide a javascript workaround and make this work for nvUltra.

  2. We were unable to get WKWebView to properly preview HTML that relied on local files (e.g. images). Remote images (e.g. on http server) worked, but not local files. The workaround we finally used was to run an embedded http server as a proxy. Not ideal, but it does work. This seems to be a bug between WKWebView/sandboxing, rather than an intentional decision by Apple since I couldn’t find any documentation of this, but it could very well have been doing something wrong on our parts. My hope is that we will be able to move away from the web server at some point, but it is not a deal breaker. I have not retested this since the spring, so the situation may have already changed.

  3. We were unable to get printing to work successfully from WKWebView, and the last time I searched many others struggled with the same thing. This would seem to be an oversight and hopefully will be fixed by the time WebView is finally killed off?? Our workaround here was to send the user to their browser, and then print from the browser if a user wants to print the preview. This is certainly less than ideal, but does work…

As development on nvUltra 1.0 is wrapping up, I will then work on migrating the changes back into Composer (I have intentionally factored the code in such a way as to keep the core components identical to allow me to fix bugs once across both apps, rather than doing the same work twice. And most of the code is also written to be compatible with iOS as well, so I can continue to try and get an iOS text editor built that I am happy with. The latest beta of MultiMarkdown Composer for iOS was close, but there were some issues with Spotlight search on iOS that sent me down the nvUltra rabbit hole when I wrote my own text file indexing algorithm…)

So the shorter answer is that Composer will be modified to use WKWebView, and hopefully the few remaining issues with WKWebView will be solved. But if not, I at least have workarounds for the pieces of WKWebView that are broken, even if they are ugly workarounds.

Thanks, Fletcher.

No worries!

And if anyone else stumbles across this thread and has any insights, reach out to me! :wink:

Fortunately TaskPaper uses NSTextView so no a problem there, only FoldingText uses WebView.

I don’t know, but I expect it will continue to work from your description. I wouldn’t be able to submit new updates, but I’m not planning to do that anyway… but I expect the current app to continue working.

Thanks, Jesse.

Sorry – typed one app name instead of the other.