Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare support for HTTPS URLs in Info.plist #1224

Open
sindresorhus opened this issue Mar 11, 2023 · 0 comments
Open

Declare support for HTTPS URLs in Info.plist #1224

sindresorhus opened this issue Mar 11, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@sindresorhus
Copy link

sindresorhus commented Mar 11, 2023

The following works when running the app on macOS:

open -a 'Ice Cubes' 'https://mastodon.social/@sindresorhus/109983299847844086'

However, the app does not declare support for URLs, so sandboxed apps will not be able to open URLs with Ice Cubes.

To fix this, simply add this to Info.plist:

<key>CFBundleURLTypes</key>
<array>
	<dict>
		<key>CFBundleTypeRole</key>
		<string>Viewer</string>
		<key>CFBundleURLSchemes</key>
		<array>
			<string>https</string>
		</array>
	</dict>
</array>

My specific use-case is that I'm adding support for Mastodon in my browser picker app.

@sindresorhus sindresorhus added the enhancement New feature or request label Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Features Requests
Development

No branches or pull requests

1 participant