More Related Content Similar to Handoff from Safari (20) More from Yuichi Yoshida (9) Handoff from Safari1. UIKit
Handoff from Safari
Fly to iOS
Yuichi Yoshida
Chief engineer, DENSO IT Laboratory, Inc.
#yidev20140927
@sonson_twit
© 2014 Yuichi Yoshida, all rights reserved. Redistribution or public display not permitted without written permission from Yuichi Yoshida.
2. 自己紹介
2tchの中の人
• iOS好きです
• 2tch(2ちゃんねるビューア)
• iOS SDK Hacksなど
• 研究
• コンピュータビジョン
• 機械学習
• 研究・開発
• 画像検索サービス
• 車向けのサービスやハードウェア
6. Handoffの種類
• Safariを呼ぶ
• URLを渡すだけ
• ネイティブアプリケーション
• 受信側にコードが必要
• インストールされていれば自動起動する
• Safariからネイティブアプリケーションを呼ぶ
• 署名した対応アプリ一覧JSONが必要
9. 準備
• 対応ハードウェアを買う
• MacBook Air (Mid 2011以降)
• MacBook Pro (Mid 2012以降)
• Retina MacBook Pro (全機種)
• iMac (Late 2012以降)
• Mac Mini (Mid 2011以降)
• Mac Pro (Late 2013以降)
• http://www.ipadmod.netより
• iOS
• iPhone 5以降、iPad(第4世代)、iPad Air、iPad mini、iPad
mini Retinaディスプレイモデル、iPod touch(第5世代)
13. 手順
いろいろ
• iOS側のentitlementにサーバのドメインを追加
• JSONを作る
• JSONに署名する
• iOSの持つリストに入ってる認証局の証明書が必要
• 実はApple自身が認証局になってる
• なのでAppleの開発者の署名でおk
• httpsで通信できるサーバにJSONを置く
• ファイル名 apple-app-site-association
• ルートに置く必要がある
15. さらに手順
サーバサイドと署名
• キーチェーンから"iPhone Distribution: <Your name>
(XXXXXXXXXX)" を dist.p12 として書き出す.
• 秘密鍵,証明書を作成
• echo '{"activitycontinuation":{"apps":
["XXXXXXXXXX.com.example.myApp"]}}' > json.txt
• 秘密鍵と証明書で署名
• ファイル名をapple-app-site-associationにする
• ドメインのルートにコピーする
16. 認証局
https
署名
同じ証明書じゃなくておk
JSON
ファイル
サーバ:example.com
associated domains
example.com
18. まとめ
You get to try it.
• Handoffについて
• 使えるデバイスは限定される
• SafariからiOSのアプリケーションを起動するHandoff
19. More Information
Yuichi Yoshida
http://github.com/sonsongithub/
@sonson_twit
sonson.jp
http://sonson.jp
Apple Handoff プログラミングガイド
https://developer.apple.com/jp/devcenter/ios/library/
documentation/HandoffProgrammingGuide.pdf
Getting started with Handoff
http://www.slideshare.net/yoshidayuichi1/yidev
SlideShare - yoshidayuichi1