How to handle with a default URL scheme

前端 未结 5 447
花落未央
花落未央 2020-11-27 13:23

I want to build URI (or URL scheme) support in my app.

I do a LSSetDefaultHandlerForURLScheme() in my + (void)initialize and I setted the s

5条回答
  •  悲&欢浪女
    2020-11-27 14:21

    The problem is, how to handle the schemes when they are called.

    That's where the Apple Events come in. When Launch Services wants your app to open a URL, it sends your app a kInternetEventClass/kAEGetURL event.

    The Cocoa Scripting Guide uses this very task as an example of installing an event handler.

提交回复
热议问题