Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何让macOS意识到我的应用程序是一个web浏览器?_Macos_Info.plist - Fatal编程技术网

如何让macOS意识到我的应用程序是一个web浏览器?

如何让macOS意识到我的应用程序是一个web浏览器?,macos,info.plist,Macos,Info.plist,我正在尝试制作一个可以处理http和https URL方案的应用程序,这样当您打开System Preferences>General时,我的应用程序将在“默认web浏览器”下拉列表中列出我所能找到的一切似乎都表明,我只需要我的Info.plist包含正确的CFBundleURLTypes值来处理我感兴趣的URL方案 我相信我做的一切都是对的,我已经将自己的Info.plist与该列表中显示的其他web浏览器进行了比较,但由于某些原因,我无法让自己的浏览器出现在该列表中。知道我做错了什么吗 这是

我正在尝试制作一个可以处理http和https URL方案的应用程序,这样当您打开System Preferences>General时,我的应用程序将在“默认web浏览器”下拉列表中列出我所能找到的一切似乎都表明,我只需要我的
Info.plist
包含正确的
CFBundleURLTypes
值来处理我感兴趣的URL方案

我相信我做的一切都是对的,我已经将自己的
Info.plist
与该列表中显示的其他web浏览器进行了比较,但由于某些原因,我无法让自己的浏览器出现在该列表中。知道我做错了什么吗

这是我的
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>

NShighResolutionable
真的
CbundleIdentifier
豪猪
CFBundleName
豪猪
CbundleInfo字典版本
6
LSBackgroundOnly
0
循环流化床锅炉
icon.icns
CbundleDisplayName
豪猪
CbundleurlTypes
CbundleTypeRole
观众
CFBundleURLName
网站网址
循环流化床锅炉方案
http
https
CbundleShortVersionString
{{VERSION}
CbundlePackageType
应用
Cbundlexecutable
马科斯/豪猪

可能的欺骗?:这是否回答了您的问题?