Last active
June 15, 2016 12:44
-
-
Save cezheng/bc68cc72594fb9f55d4dfd2fe532642f to your computer and use it in GitHub Desktop.
Setting default browser on OSX (swift 2.2)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/swift | |
| import Foundation | |
| import CoreServices | |
| let bundleId: CFString = "xxx.xxx.xxx" as NSString | |
| LSSetDefaultHandlerForURLScheme("http" as NSString, bundleId) | |
| LSSetDefaultHandlerForURLScheme("https" as NSString, bundleId) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment