aboutsummaryrefslogtreecommitdiffstats
path: root/CopyMailto/DefaultURLHandler.m
AgeCommit message (Collapse)Author
2018-09-05setDefaultURLHandler: Remove `NSLog`sTeddy Wing
These debug logs are no longer necessary now that we know that it works.
2018-09-05Remove unused `saveDefaultURLHandler`Teddy Wing
No longer planning on using this method. Ideally there would be a way to save and restore the old default "mailto" handler bundle identifier, but that's just too much of a pain and I don't want to bother.
2018-09-05Turn off SandboxTeddy Wing
Turns out you can't register yourself as the default app handler when in a sandbox, which apparently is the default when creating a new Xcode project. > that’s all…. except that I’m running my application in a Sandbox > environment, and it returns the error -54 ! > > After trying to find a solution for this, and on the > devforums.apple.com forum, it seems that there is currently no > solution, Apple just decided to remove that feature since Yosemite…. > It still works on Mavericks. That of course very disappointing, and > even not mentioned in the Apple’s documentation. (https://blog.sovapps.com/make-your-application-reply-to-mailto-links/) Fuck that. Turn off sandboxing. Yay it works now.
2018-09-05DefaultURLHandler: Add `saveDefaultURLHandler`Teddy Wing
This method is supposed to set CopyMailto as the default application for "mailto" URLs. But it keeps giving me a `-54` error, or `202` status code on the shell. WTF is going on?
2018-09-05saveDefaultURLHandler: Simplify `CFStringRef` creationTeddy Wing
Turns out `CFStringRef` can be "toll-free bridged" with `NSString`, allowing us to simplify the call.
2018-09-05Add `DefaultURLHandler`; Get current handler for `mailto` URLsTeddy Wing
Add a class to get the current bundle handler for `mailto` URLs. It will be extended to set CopyMailto as the default handler after saving the original.