Mohammad Sadiq Shaikh
Mohammad Sadiq Shaikh

Reputation: 3200

How to receive native messages from chrome extension to Mac app?

I have a Chrome extension which gets the location URL and I want it to send that URL to a Mac app.

I was able to run this demo, but I don't know how I can receive the message in a Mac app. Where would get I the message?

Upvotes: 2

Views: 292

Answers (1)

itZme
itZme

Reputation: 1439

There are two approaches you can use.

  1. Native Messaging API. This does have the limitation that Chrome must launch the process and communicate to it through stdio, conforming to native message API protocols .
  2. Your native app can expose a web server on a local port. The extension can then try to connect to this port and talk to your app.

I would suggest the first solution as its a pretty secure soultion.

Upvotes: 1

Related Questions