Application launched from Safari Displays: do you want to allow this page to open "(null)"?

I am writing a Mac OS application in Go / Objective-C. Suffice it to say that I do not use Xcode and built the application package manually. This is what the file system hierarchy looks like

${APPNAME}.app
  Contents
    MacOS
      ${APPNAME} (binary)
  Resources
    Base.lproj
      InfoPlist.strings (text)
  Info.plist (text)

The bunch starts up fine. The application works as expected. I have a CFBundleURLTypes dictionary in my Plist file that defines the URL scheme for my application.

<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleURLName</key>
        <string>${APPNAME}</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>zzz</string>
        </array>
    </dict>
</array>

(Note: ${APPNAME}- this is something like “MyApp.” This is not a Java-style “reverse DNS string” type string).

When I click on a link in Safari that uses the zzz: // scheme, I get a message that says:

Do you want to allow this page to open "(null)"?

Why? I defined my application name both in the Info.plist file and in the InfoPlist.strings file.

InfoPlist.strings :

CFBundleName = "My Wonderful Application"
0
1

, - . Mac , , .

: , , . Finder, Safari Apple "(null)".

. Mac ( ) , .

0

Source: https://habr.com/ru/post/1666651/


All Articles