Mac OS X在自定义URL方案上启动应用程序

时间:2013-06-26 12:35:01

标签: macos qt url

我正在尝试让我的Mac OS X应用响应自定义网址,例如myurl://foo.bar 我已将必要的行添加到我的Info.plist中,但它不起作用:当我在浏览器中单击自定义URL时,它不会启动我的应用程序。

以下是我的Info.plist文件:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>Remote Dialer</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>Created by Qt/QMake</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
<string>RemoteDialer</string>
<key>CFBundleIdentifier</key>
<string>com.taxisoft.RemoteDialer</string>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>Remote Dialer URL</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>rdialer</string>
        </array>
    </dict>
</array>
</dict>
</plist>

P.S。我使用Qt Creator创建了我的应用程序。我也尝试在XCode中使用自定义URL方案创建HelloWorld应用程序,一切正常。

0 个答案:

没有答案