tvOSを拡張する

 tvOSを拡張する

#potatotips

8e2e0edcf1ffc34e5fbc9ccf7c9a1328?s=128

Noritaka Kamiya

November 24, 2015
Tweet

Transcript

  1. extension AppleTV { } tvOSΛ֦ு͢Δ @nolili Noritaka Kamiya

  2. None
  3. None
  4. None
  5. ! Apple TV & tvOS

  6. None
  7. None
  8. None
  9. None
  10. None
  11. None
  12. " 10-foot user interface Siri Remote # Keyboard/Web Experience $

  13. 200MB Max, No Storage, No Web Views: Is tvOS the

    Future of Apps? https://realm.io/news/is-tvos-the-future-of-apps/
  14. Handoff is *not* supported in tvOS. The NSUserActivity class will

    be marked as unavailable in the next documentation release. https://forums.developer.apple.com/thread/16962
  15. • Handoff % • Multiple connectivity % • Keychain Sharing

    %
  16. Core Bluetooth is Available! ㊗

  17. Restricted Act as Central. not peripheral 2 devices

  18. Apps Communicate with Bluetooth LE Devices • Wearable(HeartRate Monitor, Bike

    Speed Cadence…) • Home(Not HomeKit) • …etc
  19. CBCentralManager Peripheral

  20. Communicate with iOS/Mac Apps

  21. CBCentralManager CBPeripheralManager

  22. None
  23. Be aware •MTU (20 bytes) • Low level I/O programming

    is required • JSON is too heavy • Async Hell...
  24. *OEFY      ʜ  $POUFOU )FBEFS

    0CKFDU*% ʜ ʜ %BUB Y Y Y Y Y ʜ ʜ Packet Structure(example)
  25. CBMutableCharacteristic(type: TVMessageCharacteristic.UUID, properties: .Write, value: nil, permissions: .WriteEncryptionRequired) Encryption pitfall

    x
  26. None
  27. Restricted Act as Central. not peripheral 2 devices

  28. Be aware •MTU (20 bytes) • Low level I/O programming

    is required • JSON is too heavy • Async Hell...
  29. extension AppleTV { } tvOSΛ֦ு͢Δ @nolili

  30. References “CoreBluetooth is indeed available on this platform. “ https://forums.developer.apple.com/thread/17457

    “CoreBluetooth only allows 2 accessories on tvOS. If you want to attach more devices, you may want to look at using Bonjour over the Wifi or ethernet network.” https://forums.developer.apple.com/thread/18751 Core Bluetooth Framework Reference https://developer.apple.com/library/tvos/documentation/CoreBluetooth/Reference/CoreBluetooth_Framework/ Bluetooth Low Energy: The Developer's Handbook https://www.safaribooksonline.com/library/view/bluetooth-low-energy/9780132888394/ Sample Code: BluetoothExampleTV https://github.com/nolili/BluetoothExampleTV BTLE Central Peripheral Transfer https://developer.apple.com/library/ios/samplecode/BTLE_Transfer/Introduction/Intro.html