Chromium WebView instead of Native WebView - macos

Is it possible to use a Chromium webview instead of the native webview on OSX?
I am guess it is a products like Sencha Desktop Packager exist.
As far as I can tell there drop no convenient libraries/wrappers, but most searches for OSX dev return results for a certain handheld device.
Note
So far I have found CEF and CEFSimpleSample

It's possible to use a Chromium webview instead of a native webview. But the documentation to code such a thing is very rare and poor.
The Chromium Embedded Framework Forum is a good place to ask questions.
I would highly recommend you to alter the CEFSimpleSample because there is a "Chromium Webview" included which works.

Related

Need to convert a legacy safari extension into Safari App Extension. Searching for documentation, starting steps and tutorials on Xcode

I have a legacy safari extension which I need to convert into Safari App Extension to submit into Extension Gallery. I am new to Xcode therefore, not familiar with it's build and run process. I tried looking into official documentation from developer.apple.com but it is so abstract.
Why do we need to create a parent app in Xcode before creating a
safari extension target?
If so what parent app template should I
choose? Cocoa App?
Where I can find starter tutorials on Xcode?
What is the submission process to Extension Gallery?
How can add the extension under development to my safari through xcode for testing?
I heard they need the URL for extension to approval, when we are submitting extension through developer account why to host it on URL?
Any documentation or answers to the above questions would be very helpful. Thank you.
On 2. and 3, I had the same struggles - I wrote up a tutorial on basic style sheet injection in Safari App Extensions here: https://ulyngs.github.io/blog/posts/2018-11-02-how-to-build-safari-app-extensions/
I'm converting the legacy safari extension to safari app extension too and have some answers for your questions:
Because app extension is more as functional extension then safari browser extension and could bring more features to you. And as per Apple says: safari app extension gives more communication and data exchange between Safari and your native app, docs.
But I have no more ideas if you only want an extension for safari why this is only way to do extensions.
Yes, you should use the Cocoa App template. If you don't need the window for your app, you can remove it simply in Main.storyboard or make app as a "service".
A lot of docs from Apple I've read but understood a bit then expected. So I found some youtube channels (they are 2 or more years old but some things seems don't changed) Some vieos here and the Osx Dev Daily playlist on this channel. And of course official swift docs if you select swift for your app as PL.
I haven't read about this, but think it must be submitted with your Cocoa App.
First of all you should to run your app target and only after this you should run your extension target and choose "Safari" in showed window to run in. If you have no the signing at the moment so ensure to enable "Allow unsigned extensions" in Development > Allow unsigned extensions in Safari app.
Don't meet this info, could you share it, pls? (sry, don't have enough knowledges)
Hope, it helps to you!
P.S. also recomend to see the converting docs, but it may be insufficient for converting :)
EDIT: it's seems to be incorrect to remove app window or change the default menus created by Cocoa App template for app submit for App Store. Some people got negative decision of app submit because of menus changes of redundant items or app have poor functionality or has not it at all. So consider to read the submit docs.
Please, share your experience when you'll have success app submit!
EDIT 2: Today I found template in Xcode 10.1 that can be used for Safari Extensions directly. It is as previous workflow (template Cocoa App + add extension target) but there is safari extension target already included
The app window and menu is simplified for developers:
So you don't need work with your app and you can concentrate on extension only.

Is it possible to use the chrome engine in my windows app?

I am developing an app in windows 10 (UWP) and I am using the D3 engine for some visualizations. As I have found out it's using Microsofts Edge engine to render everything, obviously it doesn't handle D3's animations as well as Chrome does.
Is there a way to attach the chrome engine to my app to render the animations sufficiently enough without any lag ?
I have searched around and found out about 'ChromeEmbedded', can anyone tell me if this is the correct way to go : https://en.wikipedia.org/wiki/Chromium_Embedded_Framework
I don't think that you can pull this off. ( Is it possible to use Chromium Embedded Framework (CEF) inside Windows Store Apps ) And even if you could https://msdn.microsoft.com/en-us/library/windows/apps/dn764944.aspx §10.2.1 and §10.2.2 probably prohibits you from doing this.

WebView vs WKWebView on OSX

Apple's documentation suggests using WkWebView for new development, although it seems to have a typo where it recommends WKWebView over UIWebView in the mac developer library.
For new development, employ this class instead of the older UIWebView class.
The typo is probably because they are trying to unify the OSX and iOS interface to the web view by using the same header for both.
However, WKWebView doesn't have all the functionality that WebView has in OSX. For example, you can get access to DOM nodes in the native interface in WebView but I don't see any way of doing this from Swift/Objective-C in WKWebView.
For my purposes, it seems like WebView is what I need, but I'm weary of starting a project that relies on an API that will be removed. However, I don't see any mention of intent to deprecate WebView anywhere in the headers or the documentation.
What makes this even more confusing is the WebKit Framework Reference makes reference to both WK and older web view APIs without clarifying anything.
WKWebView
A WKWebView object displays interactive web content, such as for an in-app browser.
WebView
WebView is the core view class in the WebKit framework that manages interactions between the WebFrame and WebFrameView classes.
Is WebView going away in OSX?
Its not a false alarm. Apple moved Safari off of UIWebView/WebView in 6.0, so security fixes simply aren't happening in the old class as much. For that reason alone you should not use it for new stuff. Apple has been incrementally improving it with every OS release so much is now do-able with private extensions (file:// access, downloads, etc)
That being said, it won't be fully equivalent to old WebView. You can't directly access the DOM anymore because the Network/Rendering/UI processes were split up and you create locks by making element references like that. Use the postMessage() message handler and wkwebview.evaluateJavaScript() and callback-ish/promisy JS code between those two pillars to deal with web<>native interaction asynchronously.
Important
Starting in iOS 8.0 and OS X 10.10, use WKWebView to add web content to your app.
Do not use UIWebView or WebView.
https://developer.apple.com/documentation/webkit/wkwebview

Is it possible to prevent your app from appearing as an extension for specific apps?

I've built an Action Extension for my app, and when i choose to Open In... something from inside of my app, I appear as an extension for myself. This UX is kinda weird, but also, it doesnt even work when i try to be an extension of myself.
I dont see anything in the documentation that specifies responding apps aside from NSExtensionActivationRule?
This is not possible at the moment in iOS 8.0

How does the Mac Web Dash board app work?

Would like to understand how to build a tool like the mac os dash board widget (web clip). Am looking at trying to build it with webkit but not sure if thats the right way to go.
Some thoughts were to using webkit and some DOM to display only the viewport that a user requests.
While this works so well on mac os, am trying to build it on windows with .Net.
Dashboard just uses webkit to display some HTML and JavaScript for the dynamic parts, but there are a couple of extensions. Apple have developer documentation on Dashboard.

Resources