Re: Any way to intercept the URL-opening mechanism on OS X?
Re: Any way to intercept the URL-opening mechanism on OS X?
- Subject: Re: Any way to intercept the URL-opening mechanism on OS X?
- From: Jens Alfke <email@hidden>
- Date: Wed, 23 Dec 2015 09:25:45 -0800
> On Dec 23, 2015, at 12:36 AM, Rick Mann <email@hidden> wrote:
>
> Hmm, didn't this change in iOS 9 and 10.11 to only work per-app?
NSURLProtocol has _always_ been per-app. It’s not a system extension, it’s a way of hooking into NSURLConnection / NSURLSession in the current process. So it’s not going to help you with what you want.
You can add a key to your app’s Info.plist to register it as a handler for a URL scheme, but then it gets _all_ URLs of that scheme. You could replace the user’s web browser as the http: handler, and then re-dispatch the modified URL to whatever the previous handler app was.
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden