Update open-url docs to mention NSPrincipalClass
authorBen Gotow <bengotow@gmail.com>
Tue, 22 Nov 2016 00:55:18 +0000 (16:55 -0800)
committerGitHub <noreply@github.com>
Tue, 22 Nov 2016 00:55:18 +0000 (16:55 -0800)
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

index ae4685a..fd296da 100644 (file)
@@ -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.