3

I'm trying to make an app that can handle http and https URL schemes, so that when you open System Preferences > General, my app will be listed in the dropdown for "Default web browser." Everything I can find seems to say that I just need my Info.plist to include the correct CFBundleURLTypes values to handle the URL schemes I'm interested in.

I believe I'm doing everything right, and I've compared my own Info.plist to other web browsers that show up in that list, but for some reason I can't get my own to appear there. Any idea what I'm doing wrong?

Here's my Info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict><key>NSHighResolutionCapable</key>
<string>True</string>
<key>CFBundleIdentifier</key>
<string>com.micahflee.porcupine</string>
<key>CFBundleName</key>
<string>Porcupine</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>LSBackgroundOnly</key>
<string>0</string>
<key>CFBundleIconFile</key>
<string>icon.icns</string>
<key>CFBundleDisplayName</key>
<string>Porcupine</string>
<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Viewer</string>
    <key>CFBundleURLName</key>
    <string>Web site URL</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>http</string>
      <string>https</string>
    </array>
  </dict>
</array>
<key>CFBundleShortVersionString</key>
<string>{{VERSION}}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleExecutable</key>
<string>MacOS/porcupine</string>
</dict>
</plist>
micah
  • 353
  • 2
  • 10
  • 1
    Possible dupe?: http://stackoverflow.com/questions/49510/how-do-you-set-your-cocoa-application-as-the-default-web-browser – Ssswift Mar 31 '17 at 00:17
  • Does this answer your question? [How do you set your Cocoa application as the default web browser?](https://stackoverflow.com/questions/49510/how-do-you-set-your-cocoa-application-as-the-default-web-browser) – Ivan Ičin Apr 21 '20 at 10:19

0 Answers0