1

我正在尝试让我的 Mac OS X 应用程序响应自定义 URL,例如 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>

PS 我已经使用 Qt Creator 创建了我的应用程序。我还尝试在 XCode 中使用自定义 URL 方案创建 HelloWorld 应用程序,并且一切正常。

4

0 回答 0