Upgrade to Pro — share decks privately, control downloads, hide ads and more …

iOS 16からの ロック画面Widget争奪戦に備える

iOS 16からの ロック画面Widget争奪戦に備える

YUMEMI.swift #15 ~WWDC復習会~

D4f04ef104c8fbfc9caa3c80e41692fd?s=128

Ryo Tsuzukihashi

June 26, 2022
Tweet

More Decks by Ryo Tsuzukihashi

Other Decks in Programming

Transcript

  1. iOS 16からの ϩοΫը໘Widget ૪ୣઓにඋえる YUMEMI.swift #15 ~WWDC復習会~

  2. Self Introduction ᠃ڮ ྋ !UTV[VLJ Ϡϑʔגࣜձࣾ 1BZ1BZϑϦϚ J04ΞϓϦ։ൃ झຯݸਓ։ൃ

  3. My Apps

  4. My Apps 8JEHFUରԠ

  5. Contents 01 LockScreen ৽͍͠ϩοΫը໘ ͷػೳ 02 Color and Rendering ৭ʹ͍ͭͯ

    03 Privacy Ϣʔβʔͷϓϥό γʔΛकΔ 04 Addapted ϓϩδΣΫτʹ௥ Ճ͢Δ
  6. New Lock Screen

  7. None
  8. None
  9. None
  10. New Widget

  11. Complicatioins? l ΞϓϦʹؔ͢ΔλΠϜϦʔͰؔ ࿈ੑͷߴ͍৘ใΛ΢ΥονϑΣ Πεʹදࣔͤ͞Δ l ෳࡶͳ৘ใΛͻͱ໨ͰཧղͰ͖ Δ΋ͷ l XBUDI04͔Β4XJGU6*Ͱ࡞Ε

    Δ
  12. accessoryCircular

  13. accessoryRectangular

  14. accessoryInline

  15. accessoryCorner

  16. Color and Rendering watch face ͱ LockScreenͷ ϨϯμϦϯάͷҧ͍Λ஌Δ

  17. Color and Rendering

  18. Color and Rendering

  19. Color and Rendering ロック画面にはダークモードの設定がない ため、考慮しなくて良い

  20. fullColor l ࢦఆ͞Εͨ৭௨Γʹදࣔ͞ΕΔ l Χϥϑϧͳݟͨ໨ʹͳΔ l XBUDI04ͷΈ

  21. accented l ࣗಈతʹ৭෇͚͞ΕΔ l ίϯςϯπ͸ͭͷάϧʔϓʹ෼͚ ΒΕϑϥοτʹண৭͞ΕΔ l ݩͷಁ໌౓ͷΈΛอ࣋͢Δ l XBUDI04ͷΈ

  22. accented l XJEHFU"DFOUBCMF l αϒϏϡʔ·ͰΞΫηϯτάϧʔϓ ʹ௥Ճ

  23. accented ΞΫηϯτΧϥʔʹΑͬͯେ͖͘ݟͨ໨͸ҟͳΔ

  24. vibrant ϩοΫը໘ͷϨϯμϦϯάϞʔυ

  25. vibrant ίϯςϯπ͸Ұ౓୤৭͞ΕΔ

  26. vibrant ϩοΫը໘ͷഎܠʹ߹Θͤͯࣗಈతʹ৭෇͚͞ΕΔ AndroidのMaterial Youと同等

  27. New SwiftUI WidgetΛΑΓྑ͘͢ΔͨΊͷ SwiftUIͷ৽ػೳ

  28. AccessoryWidget Background എܠ͕ඞཁͳ΢ΟδΣοτʹҰ؏ͨ͠എܠΛ༩͑Δ͜ͱ͕Ͱ͖Δ

  29. AccessoryWidgetBackground

  30. ProgressView (interval:coundDown:) Ұ౓ͷΤϯτϦʔͰ8JEHFUΛΞχϝʔγϣϯͤ͞Δ͜ͱ͕Ͱ͖Δ

  31. ViewThatFits ෳ਺ͷ7JFXΛࢦఆ͢Δͱར༻Մೳͳεϖʔεʹऩ·Δ࠷ॳͷίϯς ϯπϏϡʔΛදࣔ͢Δ

  32. Privacy ϩοΫը໘ʹஔ͍ͨ8JEHFUͷ ηΩϡϦςΟΛߴΊΔ

  33. iOS σϑΥϧτͰ͸ ը໘ϩοΫ࣌Ͱ΋ ίϯςϯπ͸දࣔ͞ΕΔ ॏཁͳ৘ใ͸৑௕Խͤ͞Δ

  34. .privacySensitive() iOS15~ https://developer.apple.com/documentation/swiftui/view/privacysensitive(_:)

  35. watchOS ίϯςϯπ͸௿ً౓ʹͳΓ ߋ৽ස౓΋௿͘ͳΔ͕ ίϯςϯπ͸දࣔ͞Εଓ͚ Δ ૷ண͍ͯ͠ΔͱϩοΫঢ়ଶʹͳΒͣඇΞΫςΟϒ࣌ ʹ͸ৗ࣌දࣔϞʔυʹͳΔ

  36. isLuminanceReduced

  37. isLuminanceReduced

  38. ৽͍͠Widgetͷ ௥Ճํ๏ طଘͷϓϩδΣΫτʹ LockScreen༻ͷWidgetΛ௥ Ճ͢Δ

  39. طଘͷXBUDI04ΞϓϦʹద༻ͤ͞Δ 5BSHFUͷ8JEHFU&YUFOUJPOΛෳ੡

  40. طଘͷXBUDI04ΞϓϦʹద༻ͤ͞Δ ໊લΛΑ͠ͳʹม͑Δ

  41. طଘͷXBUDI04ΞϓϦʹద༻ͤ͞Δ #VOEMF*EFOUJGJFSʹ XBUDILJUBQQΛ௥Ճ

  42. طଘͷXBUDI04ΞϓϦʹద༻ͤ͞Δ #VJME4FUUJOHTͰ#BTF4%,Λ XBUDI04ʹมߋ

  43. طଘͷXBUDI04ΞϓϦʹద༻ͤ͞Δ 8BUDI"QQͷ(FOFSBMʹҠΓ ઌ΄Ͳ௥Ճͨ͠8JEHFU&YUFOTJPO Λ௥Ճ͢Δ

  44. طଘͷXBUDI04ΞϓϦʹద༻ͤ͞Δ ४උ׬ྃʂ 8JEHFUʹ৽͍͠ϑΝϛϦʔΛαϙʔτͤ͞Δ

  45. supportedFamiliesʹ௥Ճ

  46. XBUDI04Λར༻͍ͯ͠Δ৔߹

  47. XBUDI04Λར༻͍ͯ͠Δ৔߹

  48. XBUDI04Λར༻͍ͯ͠Δ৔߹ XBUDI04ͷ*OUFOU͸ࣄલʹઃఆ͞ ΕͨϦετΛఏڙ͢Δඞཁ͕͋Δ

  49. 1SFWJFXͷදࣔ QSFWJFX$POUFYU 8JEHFU1SFWJFX$POUFYU GBNJMZYYYY

  50. $BOWBT%FWJDF4FUUJOHT 9DPEF͔Βͷػೳ ΑΓ1SFWJFX͕࢖͍΍͘͢

  51. Widget Family ઃఆͨ͠8JEHFU'BNJMZͷ1SFWJFX Λ֬ೝ͢Δ͜ͱ͕Ͱ͖Δ

  52. Presentation ௨ৗ࣌ ϓϨʔεϗϧμʔ ϩοΫத

  53. variants

  54. ஫ҙࣄ߲

  55. ը૾ͷऔΓѻ͍ʹ஫ҙ

  56. ϑΥϯτ ࣗಈద༻ͤ͞ΔͨΊʹ͸σϑΥϧ τͷϑΥϯτύϥϝʔλͱϑΥϯ τελΠϧΛ࢖͏

  57. ϢʔβʔʹΑΔ8JEHFUͷฤू ؒҧ͍ͬͯͨΒڭ͍͑ͯͩ͘͞🙇 l -PDL4DSFFOͷ8JEHFU͸*OUFOUͷฤू͕ Ͱ͖ͳ͍ʢ؍ଌൣғ಺ l ࣄલʹܾΊΒΕͨύϥϝʔλΛ࢖͏

  58. ·ͱΊ ü ৽͍͠ϩοΫը໘ͷొ৔ʹΑΓɺϢʔβʔ͸Ϣʔε έʔεʹ߹ΘͤͯϩοΫը໘Λม͑Δͱ͍͏͜ͱ͕ ༰қʹͰ͖ΔΑ͏ʹͳͬͨ ü ։ൃऀ΋ϢʔβʔͷࠣࡉͳχʔζʹԠ͑Δ͜ͱ͕Ͱ͖ ΔΑ͏ʹɺ͞·͟·ͳ8JEHFUΛ༻ҙ͢Δ͜ͱͰࠓޙ ͷϩοΫը໘૪ୣઓʹඋ͑·͠ΐ͏ LiveActivitiesのAPI公開が待ち遠しい….

  59. ͓஌Βͤ iOS/Android ΞϓϦΤϯδχΞ࠾༻͍ͯ͠·͢ʂ

  60. Resources • Keynote ◦ https://developer.apple.com/wwdc22/101 • Complications and widgets: Reloaded

    ◦ https://developer.apple.com/videos/play/wwdc2022-10050 Videos: • "QQMFɺJ04Ͱಋೖ͞ΕΔ·ͬͨ͘৽͍͠ϩοΫը໘ͷମݧͱɺڞ ༗ͱίϛϡχέʔγϣϯͷͨΊͷ৽͍͠ํ๏Λൃද ◦ IUUQTXXXBQQMFDPNKQOFXTSPPNBQQMFVOWFJMT OFXXBZTUPTIBSFBOEDPNNVOJDBUFJOJPT • XBUDI04ϓϨϏϡʔ ◦ IUUQTXXXBQQMFDPNKQXBUDIPTXBUDIPTQSFWJFX Articles:
  61. Thanks! Do you have any questions?