UIWebView and UIWebViewDelegate in tvOS - uiwebview

I understand that it is currently prohibited to use UIWebView for App Store apps. However, I've seen from jcesarmobile's answer that it is possible to still use it. Based on this method, is there a way to also use UIWebViewDelegate or another way to detect if the UIWebView has loaded or is still loading?

Related

Is it safe to use webview tag in Electron?

In Electron's webview documentation, there is this warning:
Electron's webview tag is based on Chromium's webview, which
is undergoing dramatic architectural changes. This impacts the
stability of webviews, including rendering, navigation, and event
routing. We currently recommend to not use the webview tag and to
consider alternatives, like iframe, Electron's BrowserView, or an
architecture that avoids embedded content altogether.
It recommends not to use webview, however none of the alternative such as iframe or BrowserView can fit my use case as well as webview does. So I wonder if the warning above recommends not to use webview only because the API and architecture can change in the future or is there any known security issues with webview right now? And in general, what I care the most is: Is it safe to use webview (in term of security) right now?
This has been answered https://github.com/electron/electron/issues/18187.
Webviews run in a separate process and have node integration disabled by default, so there shouldn't be any major reason why they're less secure than the alternatives. You'll definitely want to use the webPreferences option to enable sandboxing, disable the remote module, enable context isolation, etc. (example for BrowserView).
However, there's a fair number of bugs in webviews right now, some recent examples:
#17890
#18019
#18177
Most of these aren't present in BrowserView, so you definitely want to use that instead if it's at all possible to do so.

Patterns and Practices for communication between Web Extensions and a web app

I'm developing an extension and I'm a bit stuck about the communication between the web-app, the content-script of the extension, and the communication between the content-script and the background-script. It seems to be that HTML5 Messaging API is to be used, but how to do that in a precise context is not only hard to understand and implement, but also confusing due to differences of approach in Browsers (which seemingly support the same API).
For example, Firefox doesn't recognise the externally_connectable in manifest.json, which is where one assigns permissions for the hosts where requests originate from. So how does Firefox expect you the developer to assign the permissions? I assume it expects you do that within the content-script?
Particularly, I'm confused about what is the best way to exchange data between the app and the content/background script. Is the best way postMessage / addListener methods and do they work in all contexts; or as someone mentioned: window.dispatchEvent should be preferred?
All guides relevant to the point above are appreciated.
Messages coming from outside the extension is not something I have experience with (and I'm not sure that's what you mean).
You should make sure you thoroughly understand the chrome extensions overview which is definitely required reading.
re Window.dispatch and using other APIs, my suggestion is stick to the chrome.xxx APIs unless there's something they can't do.
There are 3 scopes potentially in your extension that can only communicate by messaging but the messaging is simple to implement and actually can lead to good designs.
Content scripts are the key to interacting with the page itself but their scope isn't the same as the page, the js is isolated but they can access the DOM of course.
Content scripts can be loaded when every page loads or just some pages by including them in the manifest. Or powerfully, they can be injected by the background page or the popup - so if you're intention is to control from the popup, you can use programmatic injection - a useful pattern is that the popup (or background) can launch a url in a tab, inject jquery (any version because it's isolated), then inject the content script, the content script can then use $(document).ready() to wait for the page to be loaded (don't have to use jQuery but the fact that you can without caring whether the page has jQuery or not, or what version it might have) is useful.
If you already knew this much, you might not be as confused as you think :)

A default and easy way to display a spinner while performing lengthy operations

I'm transferring huge chunks of data while my users work with their forms. Besides trying to optimize the code to ensure for the fastest connections, I'd like to display a spinning image in the middle of the form to notify the user that the software is sweating it's parts of to get the info as quickly as possible.
I'd like to point to following considerations.
Can I use an arbitrary animated image (e.g. abc.gif)?
Is it possible (suggested, even) to use the default spinner seen in the CRM?
Can such a solution be applicable even for older versions of CRM?
IS is possible (recommended, maybe) to use jQuery and it's cool effects?
Yes you can use any animated gif. Add as a web resource in CRM 2011.
You can take the default spinner and add as a web resource. I'd strongly recommend you don't try and address it directly.
Yes but the way you manage your scripts is less prescribed. No solutions or web resources to use in CRM4.
Absolutely. See below.
The jQuery plugin BlockUI is one of the most popular for potentially long running OData calls from which you need to prevent further UI interaction.
Since you'll need to attach directly to a DOM element it's use won't be supported. However, as long as you stick with attaching to the <body> element and avoid digging too far down into the DOM like for example onto the markup for specific form sections you'll be OK.
For CRM 2011 we use our own Web Resource to wrap BlockUI providing a very simple API enforcing consistent binding to the <body> element which also checks for the inclusion of jQuery and BlockUI scripts (Web Resources) on the form.
Same deal applies for CRM 4 but script management is much more down to how your team are currently managing customisations and dependencies.
The easier you can make it to use, the less likely other developers on the team are to go off and try and roll their own causing horrible inconsistencies in the final UX.

Load an nib file at server in the iPhone application

Question
I want to load a nib file at Server to an application running in Phone.
My Approach
I currently pass an xml file from the server to my iPhone applicaiton giving a basic detail of the layout (For eg TableView or Navigation Bar etc)
Problem with My Approach
Its a very time consuming and not a generic method for the Dynamically updating/controlling the UI from the server.
So the better way of solving this problem is to have various dynamic nib at the server and load the appropriate .nib file based on flow of application.
Is it possible to load a nib file from the server to my iPhone application ?
I have found a solution to this issue i have mentioned.
please check the
Session 117 - Building a Server-driven User Experience
in the WWDC 2010
Thanks
I don't think anything like that would/should be possible. Reason being that Apple has a set User Interface Guideline which are strictly checked during the approval period of an application. If it were possible to add dynamic nibs that would essentially by pass the whole "verification" process me thinks.

Hosting Google Apps UI in my app

I'm investigating the possibility of re-using Google Apps/Docs in a local hybrid desktop/browser application.
I've been going through the Google documentation on manipulating docs, eg. the Spreadsheet. I can't seem to find any info on actually hosting the UI. Is this possible, or does it require some form of permission from Google?
You want to basically embed an browser control in your application pointed at the URL of a Google Apps doc? You could use the Google Document List API to retrieve the documents for a user, then use the URLs of those documents in your embedded browser control.
You don't need Google's permission to do that; you're writing a browser with some extra smarts built in.
What do you mean by "hosting the UI?" These apps are HTML/CSS/JavaScript. Are you thinking about embedding them in AIR or Titanium, or in some kind of web control in another app?
i briefly looked into doing this, and figured if i really wanted to i could just load the gdocs page content dynamically, and use javascript to strip away the superflous elements like header and footer. but instead i'll probably just use an OS alternate because they have come a long way and I want rich hooks.

Resources