タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

iosとnsurlprotocolに関するtasanobuのブックマーク (2)

  • iOS Advent Calendar 2011 5日目 / NSURLProtocolの使い方 : As Sloth As Possible

    どうも、「iOS Advent Calendar 2011」5日目担当のfaultierです。つい最近使ったのでNSURLProtocolネタで。 NSURLProtocolって何? Foundationフレームワークで最初から扱えるプロトコルはhttp、https、ftp、fileの4つ。これ以外のプロトコルでの通信をNSURLConnectionやNSURLDownloadなどで扱う場合や、特定のリクエストに限って特別な処理をしたい場合などに、NSURLProtocolを継承して登録することで使えるようになる。ちなみに、他のアプリからopenURLしたときにアプリを起動させるカスタムURLスキームとはまた別なので注意。こちらはアプリ内でURL Loading Systemを使うときにだけ影響するもの。 使い方 最低限必要なのは、+canInitWithRequest:、+canonic

    iOS Advent Calendar 2011 5日目 / NSURLProtocolの使い方 : As Sloth As Possible
  • NSURLProtocol Tutorial

    Update 9/3/14: This tutorial has now been updated for iOS 8 and Swift; check it out! NSURLProtocol is like a magic key to the URL. It lets you redefine how Apple’s URL Loading System operates, by defining custom URL schemes and redefining the behavior of existing URL schemes. Does that sound magical? It should. Because, if you look for it, I’ve got a sneaky feeliing you’ll find URLs — much like lo

  • 1