Talk to MacOSX app from Chrome Extension - objective-c

I have a chrome extension running in my browser. I also have a Mac OSX app I wrote in Swift/Objective-c in Xcode. I am wondering how this chrome extension can talk to the Mac OSX app on the same computer.
I am aware of the Chrome Extension API, but do not know how I can capture the information from that is sent by Chrome in Swift. Does anyone know how to do this?
Thanks

There are two broad approaches you can take.
Native Messaging API. This does have the limitation that Chrome must launch the process (and communicate to it via STDIO) - you cannot attach to an existing process. The upside - the communication channel is pretty secure.
Your native app can expose a web server (or better yet, a WebSockets server) on a local port. The extension can then try to connect to this port and talk to your app. The downside is that anything (at least on the machine) can connect to your native app.
This is a frequently used approach; for example, 1Password or various IDE integrations work this way.
You could combine the two approaches to launch the app with a "launcher" Native Host if it's not running.

Related

Stream video from a stand alone desktop application(not browser) to a remote desktop application(not browser)

I'm trying to build a live video streaming application from a usb camera to an application running on a remote desktop. I've researched protocols like RTMP, RTSP, WebRTC. According to my understanding I can't use webRTC since it's only compatible in the browser and I'm not building my application for a browser here. Please help me choose the right protocol and also the media server.
You can, and many applications do, use WebRTC outside the browser. WebRTC implementations are available for many different platforms including iOS, Android and embedded systems.
You can even use Headless Chrome if you want to use the Chrome APIs without the visual parts of the browser.

Using Electron based app as a web server

I'm developing a cross-platform application (Windows/Linux/macOS), which:
Should be able to run locally as a desktop application
Should be able to run on a remote machine, preferably with the same UI as on local.
So far Electron looks good enough for the first bullet.
The question is about the second one. I'd like to reuse both the logic and the UI from the local scenario for the remote scenario. In other words, I'd like to use Electron based application as a web server and connect to it via browser.
Is there any way to do that?
You can create a remote web server without Electron, just with Node.js, and deliver a web page like a PHP server for example.
But if you want to deliver a complete remote UI and manage the window remotely, that's VERY complicated to do... That needs to configure a lot of things and manage connections between client and server, using asynchronous keyboard & mouse and encryption to secure the communications.
You want a hybrid app I think, like a few of them that out out there (i.e. Slack). Generally there's a web app plus an Electron client version with some shared UI code but it's not Electron all around. The main point of electron is to be a local web server acting as a desktop app. You could certainly keep it all node though.

Launching Chromecast from WebRTC

As indicated in an original question: Cast Sender running on Android Chrome or Firefox
Is there a way to launch Chromecast via WebRTC?
I have no doubt that when launched CC will be as big as the original iPhone, and the only thing preventing full HTML5 functionality is using the DIAL protocol.
As I already know this isn't possible, #ali-naddaf could you enter this as a feature request by any chance please?
WebRTC is working great on our dev CC devices, the only thorn is having to use the Chrome extension to launch it before using WebRTC and WebSockets to take over. Avoiding DIAL for launching pure web apps would be a real killer deal IMO.
BTW, I haven't been able to find a formal way to make feature requests so this Q/A mechanism was my approach.

PPAPI Plugin and Chromium OS

I'm looking to use Chromium OS for a specific business application, but I need access to local serial and USB ports. My reading of the Chromium docs says NPAPI plugins are not supported in Chrome OS, only PPAPI (Pepper). I'm a bit confused about PPAPI, as all docs talk about this in the context of Native Client, which as it's a sandboxed environment, cannot access local resources.
So my basic question is: Is it possible to write a PPAPI browser plugin that will work like a regular NPAPI browser plugin to access local resources?
Currently, no. NPAPI plugins are on the way out, Native Client is a sandboxed environment, and Pepper's interfaces are designed to mirror those available elsewhere on the web platform (e.g. Javascript). So a good place to look for future interfaces would be draft web standards and HTML5/JS addons, e.g. for gamepads (https://wiki.mozilla.org/GamepadAPI) or cameras (http://developers.whatwg.org/video-conferencing-and-peer-to-peer-communication.html )

How to Test Sencha Touch apps in windows

So I am developing a Sencha Touch application in Windows. I want to test how this is going to behave on iPhone/Android/BlackBerry phones.
I'd rather not make it public just to test it by navigating to it from each OS physically, although I will be doing that before our official release. How can I emulate the phones on windows. Is there anything I can use to emulate Blackberry/iPhone on a windows machine just to test how the web page is going to be rendered in those devices?
I know the Android emulator I can run through Eclipse, but what about the other two?
You need a Mac to run the iPhone/iPad simulator. Blackberry can be done on windows though: http://www.blackberry.com/developers/downloads/simulators/
You might also consider delivering them to these devices as apps using phonegap, which plays nicely with sencha touch.
If you just want to see how the app would look and behave while developing, just use Google Chrome. You can enable the very good 'developer tools' to do various checks.
Install and run on Ripple Chrome Extension
Check out the number of devices / platforms it supports
...
...
iPhone 3G / 4
iPad
Nexus One
Nexus S etc..
In order to start developing applications using Sencha Touch, it is highly
recommended that you have a working web server where you can host your
application. It's possible to develop Sencha Touch applications, viewing local
folders with your web browser. Without a web server you won't be able to test
your application using any mobile devices.
You can run the application on your web browser by using:
http://localhost/your_app_folder
Using Safari web browser to examine your Sencha Touch application during
development, and the Safari Web Inspector is a huge part of that. Both Chrome
and Firefox have similar tools (Chrome Developer Tools and Firebug for Firefox),
but as iOS devices use Safari for their web browser.