It doesn't seem to be possible to have a Nativefier app open up links from other apps. This works with Epichrome, but Nativefier apps are much nicer to use.
Try to drag URL to dock icon of Nativefier app - nothing happens.
Use Choosy to set up custom rule to open Nativefier app as browser for certain links - app comes to foreground but doesn't open link.
Version of Nativefier 7.4.0
Version of Node.jsv6.9.1
OS: macOS 10.12.5
Architecture: x86
Hi @dsemaya, thanks for the feedback ๐. Not sure I want to file this as feature request though, such a feature would be precisely opposed to Nativefier's main goal, which is precisely to bundle applications.
Closing, but feel free to argue if I'm missing your point, and we can re-open.
Reopening this.
The use case is Google Docs. Each document is a unique URL. I want to create a Docs app, a Slides app, and a Sheets app. I want to edit documents in windows, each within their own app, like a native office suite (Office/iWork). In order to do this I need my Nativefier apps to receive URLs.
If someone sends me a link to a doc in Gmail, I want my Gmail Nativefier app to open the document in my Docs app, not a browser tab. There's no way to do that if the Docs app can't receive URLs.
This use case is very similar to iOS. There are native apps for Google Docs, Sheets, and Slides. When you tap on a link to a doc the OS intelligently opens the Docs app, not a web page in Safari. I want to create the same thing.
If Nativefier could just receive HTTPS URLs to start with, Choosy or Browser Fairy can handle which app should launch for each URL domain. Long term it would be great if apps could register their own URL helper scheme.
From an outsider's perspective this initial functionality doesn't seem particularly difficult. Just open whatever HTTP URL is passed through, as long as it matches the internal-urls regex. It's very similar to Gmail spawning secondary windows except the URLs are coming from outside the app, not inside.
It also seems to fit perfectly within Nativefier's goal of taking popular web apps and making them feel native. That's exactly what I'm trying to do.
Therefore, in response:
You have to open a one-time URL?
โ Use your browser ๐.
Each Doc has a unique URL. I open countless unique Docs URLs daily.
It's a one-time URL but you want it to be isolated?
โ Open it in an incognito window in your browser.
I don't want to edit Docs in a browser tab, I want to edit them in my Docs app. The Docs app is a superior experience since it feels like a native word processor. The windows are cleaner and each document has its own window.
It's not a one-time URL but a frequently-used app?
โ Well, nativefy it.
It is a very frequently used app, but I need it to open the proper URL for each document link when I click on it in other apps.
@dsemaya thanks for the clarification ๐. Makes sense, now that I know your use case is opening URLs "for the same app". Your first-time description sounded like dragging youtube.com on a facebook app, which made no sense.
Re-opening (which only means the issue is open, no guarantee anyone will work on that).
I have the same issue - I have created a "Jira" app and want urls to specific issues to open in my "Jira" app.
This issue was mixing two concerns; claryfing them based on feedback from @jancbeck on #604. The two concerns are:
Looks like the "open-url" event could be helpful:
app.on('open-url', function(event, url) {
console.log("Open URL: " + url);
event.preventDefault();
});
Tried adding that to main.js and manually editing Info.plist to support http(s) but I'm not getting anything back in the console.
It is a macOS-only feature, but I'm testing on macOS.
I installed Choosy, but I don't see how that helps:
app.asana.com to Asana.app:
Now, while that app activates (or launches) when I click an Asana link, it doesn't actually navigate there. What do I do?
@ELLIOTTCABLE you reproduced what this issue is about. You could submit a PR or just hope somebody else pics it up.
For macOS, does Electron's 'open-url' event do this behavior?
@ronjouch I found what appears to be a Choosey equivalent for Windows, BrowserSelector . Any progress on getting Nativefier to support the core of this issue?
Hi, another great alternative for choosy on macOS is Finicky: it's open-source, in active development and more customizable for power users.
Concerning the actual issue, @jancbeck 's solution sounds promising. Did you have any luck getting that to work?
UPDATE: sorry just saw #767 , thanks @dahjelle ! This feature would be really great.
Most helpful comment
Reopening this.
The use case is Google Docs. Each document is a unique URL. I want to create a Docs app, a Slides app, and a Sheets app. I want to edit documents in windows, each within their own app, like a native office suite (Office/iWork). In order to do this I need my Nativefier apps to receive URLs.
If someone sends me a link to a doc in Gmail, I want my Gmail Nativefier app to open the document in my Docs app, not a browser tab. There's no way to do that if the Docs app can't receive URLs.
This use case is very similar to iOS. There are native apps for Google Docs, Sheets, and Slides. When you tap on a link to a doc the OS intelligently opens the Docs app, not a web page in Safari. I want to create the same thing.
If Nativefier could just receive HTTPS URLs to start with, Choosy or Browser Fairy can handle which app should launch for each URL domain. Long term it would be great if apps could register their own URL helper scheme.
From an outsider's perspective this initial functionality doesn't seem particularly difficult. Just open whatever HTTP URL is passed through, as long as it matches the internal-urls regex. It's very similar to Gmail spawning secondary windows except the URLs are coming from outside the app, not inside.
It also seems to fit perfectly within Nativefier's goal of taking popular web apps and making them feel native. That's exactly what I'm trying to do.
Therefore, in response:
Each Doc has a unique URL. I open countless unique Docs URLs daily.
I don't want to edit Docs in a browser tab, I want to edit them in my Docs app. The Docs app is a superior experience since it feels like a native word processor. The windows are cleaner and each document has its own window.
It is a very frequently used app, but I need it to open the proper URL for each document link when I click on it in other apps.