All Projects → glawson → electron-deeplink

glawson / electron-deeplink

Licence: other
Node module for Electron apps that sets the default handler for a given protocol (deep links) in both development and production environments.

Programming Languages

typescript
32286 projects
Objective-C++
1391 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to electron-deeplink

Electron Wix Msi
📀 Create traditional MSI installers for your Electron app
Stars: ✭ 197 (+479.41%)
Mutual labels:  electronjs
stepmania-song-manager
Download and update song packs for StepMania with ease.
Stars: ✭ 23 (-32.35%)
Mutual labels:  electronjs
passwall-desktop
PassWall Desktop is the desktop client for PassWall Server written with Electron Vue.
Stars: ✭ 145 (+326.47%)
Mutual labels:  electronjs
Mogollar
A MongoDB UI built with Electron
Stars: ✭ 251 (+638.24%)
Mutual labels:  electronjs
block-photos
A photos app built with Ionic and Blockstack as backend.
Stars: ✭ 24 (-29.41%)
Mutual labels:  electronjs
electron-auth0-login
Helper widget for Auth0 authentication in Electron desktop apps
Stars: ✭ 23 (-32.35%)
Mutual labels:  electronjs
Excel Parser Processor
Simply does the tedious, repetitive operations for all rows of excel files step by step and reports after the job is done. It can download files from URL(s) in a column of Excel files. If a new filename is provided at column B it will rename the file before saving. It will even create sub folders if column C is full with a valid folder name.
Stars: ✭ 177 (+420.59%)
Mutual labels:  electronjs
BeatHub
Small, simple, and fast custom beatmap browser & downloader built with Svelte
Stars: ✭ 13 (-61.76%)
Mutual labels:  electronjs
vnstat-client
GUI Client for vnStat Network Monitor for Linux or GNU/Linux
Stars: ✭ 122 (+258.82%)
Mutual labels:  electronjs
git-issue-react-electronjs
⚙️. ⚛️. A desktop application created with Electronjs and Reactjs to be cross-platform to manage and track GitHub issues.
Stars: ✭ 21 (-38.24%)
Mutual labels:  electronjs
Revolut Emergency
👨‍🚀 Unofficial Revolut PC app – Freeze cards, list transactions, get notifications, contact support
Stars: ✭ 252 (+641.18%)
Mutual labels:  electronjs
Interactive Data Editor
A Software to interactively edit data in a graphical manner
Stars: ✭ 35 (+2.94%)
Mutual labels:  electronjs
web-to-desktop-framework-comparison
This repository was made to create an objective comparison of multiple framework that grant us to "transform" our web app to desktop application formats.
Stars: ✭ 605 (+1679.41%)
Mutual labels:  electronjs
Altus
Desktop client for WhatsApp Web with themes, notifications and multiple account support
Stars: ✭ 203 (+497.06%)
Mutual labels:  electronjs
ViziMessage
Visualize your iMessage history and interactions.
Stars: ✭ 18 (-47.06%)
Mutual labels:  electronjs
Ngtron
Easily serve and build angular based electron applications
Stars: ✭ 178 (+423.53%)
Mutual labels:  electronjs
Minecraft-Box-Launcher
Open source Minecraft Java Edition launcher built with ElectronJS
Stars: ✭ 19 (-44.12%)
Mutual labels:  electronjs
react-electron
Boilerplate for creating an Electron desktop app with React
Stars: ✭ 77 (+126.47%)
Mutual labels:  electronjs
The-Wall
The Wall automatically changes desktop wallpaper based on the tags selected by the user
Stars: ✭ 48 (+41.18%)
Mutual labels:  electronjs
mpk-desktop-app
My Personal Kanban Desktop App is a standalone desktop implementation of the Personal Kanban.
Stars: ✭ 81 (+138.24%)
Mutual labels:  electronjs

MIT license ts glawson

electron-deeplink

Node module for Electron apps that sets the default handler for a given protocol (deep links) in both development and production environments.

This module was inspired due to the lack of protocol support when running non packaged apps on macOS (see app.setAsDefaultProtocolClient for explanation). This module provides full support for running and testing the given protocol in the development environment. It also provides the same protocol support for the production envronment. In other words, protocol management is completly controlled with this module.

Please Note

  • For Production: While electron-deeplink handles setting app.setAsDefaultProtocolClient, you still need to make sure setup the mac bundleId correctly for electron-builder or electron-forge.

Example App

A full working example can be found here

Installation

# If you use npm:
npm install electron-deeplink

# If you use yarn:
$ yarn add electron-deeplink

Usage

In main.js, include the electron-deeplink module and instantiate the Deeplink class towards to begining of main.js.

// main.js
const { app, BrowserWindow } = require('electron');
const { Deeplink } = require('electron-deeplink');
const isDev = require('electron-is-dev');

let mainWindow;
const protocol = isDev ? 'dev-app' : 'prod-app';
const deeplink = new Deeplink({ app, mainWindow, protocol, isDev });

Setup a watch on the deeplink 'received' event

// main.js
deeplink.on('received', (link) => {
    // do stuff here
});

API

creating an instance

const deeplink = new Deeplink([config]);

config

{
    // required
    // type: electron app
    app: [electron.app]

    // required
    // type: app.BrowserWindow
    // Reference to the apps main window
    mainWindow: [main window reference]

    // required
    // type: string
    // String representing the protocol to use. For production, this should be the same as the bundleId set in the build config.
    protocol: [protocol string]

    // optional, default: false
    // type: boolean
    // Represents the app environment
    isDev: boolean

    // optional, default: false
    // type: boolean
    // If true, outputs logging.  Uses electron-log, so files are appened/created for prod.
    debugLogging: boolean

    // optional, default: '/node_modules/electron/dist/Electron.app'
    // type: string
    // String representing the location of Electron relative to the app root.
    electronPath: [string]
}

events

// 'recieved'
// When a "deeplink" is recieved by the module, this event is emitted.

deeplink.on('received', (link) => {
    // do something here
});

Contributors

This repo uses semantic-release for versioning, which uses Angular Commit Message Conventions.

semantic-release is hooked up to CircleCI

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].