iOS11からの位置情報アプリの立ち向かい方

 iOS11からの位置情報アプリの立ち向かい方

WWDCで発表されたiOS11からの位置情報の変更をまとめました。
セッションは以下
https://developer.apple.com/videos/play/wwdc2017/713/

【サンプルコード】
https://github.com/SatoTakeshiX/TryiOS11ForLocation

【発表イベント】
このプレゼンテーションは以下のイベントで発表したものです。

WWDC After Party 2017 @Ebisu
https://pre-wwdc.connpass.com/event/56731/

GEEK GARAGE iOS vol3
https://geekgarage.connpass.com/event/58698/

WWDC - Developer's Living
https://lifull.connpass.com/event/58021/

SWWDC × AKIBA.swift in Sendai
https://classmethod.connpass.com/event/60672/

WWDC2017振り返り勉強会@FiNC
https://finc.connpass.com/event/58947/

53e2d354b3299d64a54af680865516d5?s=128

Sato Takeshi

July 15, 2017
Tweet

Transcript

  1. iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲ ͔͍ํ 2017೥7݄24೔ɹ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 1

  2. ࠤ౻߶࢜ (@hatakenokakashi) MAMORIOגࣜձࣾͱ͍͏མͱ͠෺λά ͷձࣾͰ iOSΤϯδχΞΛ͍ͯ͠·͢ɻ ։ൃ͔ΒAppStore΁ͷϦϦʔε࡞ۀ΋ ͯ͠·͢ɻ ϒϩάɿhttp://blog.personal- factory.com/ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ

    2017/7/24 2
  3. MAMORIO iOS,AndroidͷΞϓϦͰ࢖͑·͢ɻ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 3

  4. ࢝ΊͯͷWWDC iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 4

  5. iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 5

  6. iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 6

  7. iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 7

  8. iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 8

  9. iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 9

  10. iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 10

  11. iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 11

  12. ָ͔ͬͨ͠ʋ(´ʔʆ)ϊ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 12

  13. ͱ͜ΖͰ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 13

  14. ɹΞϓϦʹҐஔ৘ใΛ࢖ ͍ͬͯΔਓ͸͍·͔͢ʁ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 14

  15. ! iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 15

  16. iOS11͔Βೝূ͕มΘΓ ·͢ʂ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 16

  17. Locationͷೝূ͸ • ৗʹڐՄʢAlways) • ͜ͷAppͷ࢖༻தͷΈڐՄ(WhenInUse) ͷ̎ͭ iOS10·Ͱ͸ΞϓϦ͸ϢʔβʔʹͲͪΒ͔ҰํΛ໰͍߹ΘͤΕ ͹Α͔ͬͨ ʮৗʹڐՄʢAlways)ʯ͚ͩͰ࣮૷͕Մೳ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ

    2017/7/24 17
  18. • iOS11͔Β͸ʮ͜ͷAppͷ࢖༻தͷΈڐՄ(WhenInUse)ʯ͕ ඞਢʹͳΓ·ͨ͠ɻ • ͭ·ΓɺࠓʮৗʹڐՄʢAlways)ʯ͚ͩରԠ͍ͯ͠ΔΞϓϦ͸ ʮ͜ͷAppͷ࢖༻தͷΈڐՄ(WhenInUse)ʯ΋ඞཁʹͳΓ· ͨ͠ɻ • ৗʹڐՄ͔͠໰͍߹Θͤͯͳ͍ΞϓϦ΋ڧ੍తʹʮ͜ͷApp ͷ࢖༻தͷΈڐՄʯΛग़͠·͢ʂ

    iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 18
  19. iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 19

  20. iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 20

  21. ৗʹڐՄʢAlways)ͱ͜ͷAppͷ࢖༻தͷΈڐ Մ(WhenInUse)ͷׂ߹ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 21

  22. Info.plistʹҎԼͷΩʔΛೖΕ·͠ΐ͏ • NSLocationWhenInUseUsageDescription • NSLocationAlwaysAndWhenInUseUsageDescription • NSLocationAlwaysUsageDescription Xcode9 bate3Ͱࢼͨ͠ͱ͜Ζ NSLocationAlwaysUsageDescriptionͷΈͩͱҐஔ৘ใ͕

    ։࢝͞Εͳ͔ͬͨɻ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 22
  23. Info.plist <key>NSLocationAlwaysUsageDescription</key> <string>ৗʹڐՄ͢Δ͜ͱͷઆ໌</string> -> Ґஔ৘ใ͕։࢝͞Εͳ͍(´ɾТɾʆ) iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 23

  24. Apple͕ߟ͑ΔೝূͷϕετϓϥΫςΟε • ·ͣ࠷ॳʹʮAppͷ࢖༻தͷΈڐՄ(WhenInUse)ʯΛ໰͍߹ ΘͤΔ • ৗʹڐՄʢAlways)͕ඞཁʹͳͬͨΒͦͷͱ͖ʹ໰͍߹ΘͤΔ ࠷ॳʹৗʹڐՄʢAlways)Λ໰͍߹ΘͤͯϢʔβʔ͕ڋ൱ͨ͠Β ͦͷΞϓϦ͸Ґஔ৘ใΛऔΕͳ͍͔Βɺ·ͣ͸ʮAppͷ࢖༻த ͷΈڐՄ(WhenInUse)ʯΛฉ͖·͠ΐ͏ɻ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ

    2017/7/24 24
  25. iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 25

  26. iOS11͔ΒͷҐஔ৘ใมߋ఺ͦͷ̎ ʮৗʹڐՄ͢ΔʯͷΞϓϦ͸όοΫά ϥ΢ϯυͰ੨͍εςʔλεόʔ͕ग़Δ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 26

  27. iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 27

  28. (ʄoʄ; iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 28

  29. • Appleతʹ͸ɺόοΫάϥ΢ϯυͰԿ͔΍ͬͯΔΞϓϦ͕͋ ΔͳΒϢʔβʔ͸ͦΕΛ֬ೝ͢Δ͢΂Λ࣋ͭ΂͖ͱ͍͏ߟ͑ Έ͍ͨɻ • Ϣʔβʔ͔Βͷ͓໰͍߹Θ͕ͤ૿͑Δ͜ͱ͕༧૝͞Ε·͢ɻ • ΧελϚʔαʔϏεɺϚʔέςΟϯάؚΊͯͲ͏͍ͯ͘͠ͷ ͔Λळ·Ͱʹߟ͑·͠ΐ͏ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ

    2017/7/24 29
  30. iOS11͔ΒͷҐஔ৘ใมߋ఺ͦͷ3 Ґஔ৘ใऔಘதɺൃ৴தͷͱ͖ɺ໼ҹ ΞΠίϯͷৼΔ෣͍͕มΘΓ·͢ɻ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 30

  31. Hollow arrowɿ Ґஔ৘ใΛϦΫΤετ͍ͯ͠Δ ࿮͚ͩɹϢʔβʔ͕Ҡಈ͍ͯ͠ͳ͍࣌ʹ͜͏ͳΔ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 31

  32. Solid arrow: Ґஔ৘ใड৴͍ͯ͠Δɻ ϕλృΓ Ϣʔβʔ͕Ҡಈ͍ͯ͠Δ࣌ʹͳΔ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 32

  33. iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 33

  34. DEMO iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 34

  35. ͓ΘΓ iOS11Ͱ΋ΑΓΑ͍ΞϓϦΛ࡞͍͖ͬͯ·͠ΐ͏ iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ 2017/7/24 35

  36. Session What's New in Location Technologies https://developer.apple.com/videos/play/wwdc2017/713/ DEMO https://github.com/SatoTakeshiX/TryiOS11ForLocation iOS11͔ΒͷҐஔ৘ใΞϓϦͷཱͪ޲͔͍ํ

    2017/7/24 36