From 964c88a1891ab59eb5bbcc73c8e4a230b8bbe158 Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Mon, 21 Nov 2016 16:55:18 -0800 Subject: [PATCH 1/2] Update open-url docs to mention NSPrincipalClass We got bit by a nasty bug today - if you change your app's info.plist `NSPrincipalClass` to something other to `AtomApplication` (We set it to NylasApplication via a bad find-replace), everything works except open-url is never fired. Add a small reference to the docs so folks know to check this key. --- docs/api/app.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/api/app.md b/docs/api/app.md index ae4685a5a398..fd296dac77ee 100644 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -108,8 +108,9 @@ Returns: * `event` Event * `url` String -Emitted when the user wants to open a URL with the application. The URL scheme -must be registered to be opened by your application. +Emitted when the user wants to open a URL with the application. Your application's +Info.plist file must define the url scheme within the `CFBundleURLTypes` key, and +set `NSPrincipalClass` to `AtomApplication`. You should call `event.preventDefault()` if you want to handle this event. From 0d317a2e498ec23e3557f9c4b28127aa68766f93 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 22 Nov 2016 07:49:56 -0800 Subject: [PATCH 2/2] Add backticks around Info.plist --- docs/api/app.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/app.md b/docs/api/app.md index fd296dac77ee..40bca9c2d469 100644 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -109,7 +109,7 @@ Returns: * `url` String Emitted when the user wants to open a URL with the application. Your application's -Info.plist file must define the url scheme within the `CFBundleURLTypes` key, and +`Info.plist` file must define the url scheme within the `CFBundleURLTypes` key, and set `NSPrincipalClass` to `AtomApplication`. You should call `event.preventDefault()` if you want to handle this event.