26
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Mac OS XのアプリのURLスキームを調べる

Last updated at Posted at 2014-05-27
open dict://この先生きのこるには

などのMacに入れてあるアプリのURLスキームを調べる。

スキーマの定義は、各アプリのContents以下にある Info.plist に定義されている。CFBundleURLTypesのところ。

Dict.appのInfo.plist
・・・
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Viewer</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>x-dictionary</string>
            </array>
            <key>LSIsAppleDefaultForScheme</key>
            <true/>
        </dict>
        <dict>
            <key>CFBundleTypeRole</key>
            <string>Viewer</string>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>dict</string>
            </array>
            <key>LSIsAppleDefaultForScheme</key>
            <true/>
        </dict>
    </array>
・・・

一々、開いてみるのは面倒なので、一気に一覧化する。

find /Applications -name Info.plist -print0 | xargs -0 grep -A 3 CFBundleURLSchemes > ~/scheme.txt
26
25
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
26
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?