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

5分でSharePlay入門

tokorom
June 23, 2021

 5分でSharePlay入門

#potatotips #74 https://potatotips.connpass.com/event/214754/

- WWDC21
- iOS 15
- SharePlay
- Group Activities

tokorom

June 23, 2021
Tweet

More Decks by tokorom

Other Decks in Programming

Transcript

  1. 4IBSF1MBZͱ͸ ར༻γʔϯ • Ұॹʹөը΍εϙʔπΛࢹௌ͢Δ • ήʔϜͷεʔύʔϓϨΠΛࣗຫ͢Δ • ཱྀߦͷͱ͖ͷࣸਅΛ༑ਓ΍Ո଒ͱҰॹʹݟΔ • άϧʔϓͰ͓ֆඳ͖͢Δ

    • Swift PlaygroundsͰҰॹʹSwiftΛֶͿ • ෆಈ࢈ΞϓϦͰ৽͍͠ՈͷީิΛ;ͨΓͰ୳͢ • ࣮Ոͷ྆਌͕ΞϓϦͷ࢖͍ํ͕Θ͔Βͳ͍ͷΛαϙʔτ͢Δ
  2. ಈըͷ4IBSF1MBZͷ࣮૷αϯϓϧ struct SampleActivity: GroupActivity { static let movieURL: URL? =

    URL(string: "...") static let activityIdentifier = "..." var metadata: GroupActivityMetadata { var metadata = GroupActivityMetadata() metadata.fallbackURL = Self.movieURL metadata.title = "Sample" metadata.subtitle = "WWDC19 Session Video" return metadata } } (SPVQ"DUJWJUZΛ༻ҙ
  3. ಈըͷ4IBSF1MBZͷ࣮૷αϯϓϧ let activity = SampleActivity() async { switch await activity.prepareForActivation()

    { case .activationDisabled: break case .activationPreferred: activity.activate() case .cancelled: break default: () } } (SPVQ"DUJWJUZΛΞΫςΟϕʔτ
  4. ͦͷଞ w 1JDUVSFJO1JDUVSFͷαϙʔτ w 4IBSF1MBZதͷಈըΛςϨϏʹ"JS1MBZ w Ұ෦ͷϢʔβʔ͚ͩಈըΛר͖໭͢ʢҰ࣌తʹಉظ͠ͳ͍ʣͳͲͷΧελϜ w $.ͳͲ͕ڬ·ΕΔಈը΁ͷରॲ w

    "71MBZFSҎ֎ͷΧελϜಈըϓϨΠϠʔͷαϙʔτ w ࠶ੜಉظʹؔΘΒͳ͍ࣗ༝ͳΠϕϯτૹड৴ w ΞϓϦΛΠϯετʔϧ͍ͯ͠ͳ͍ϢʔβʔΛ"QQ4UPSFʹ༠ಋ w αΠϯΞοϓ΍ߪೖ͕ඞཁͳ৔߹ͷରॲ w 8FCϖʔδʢNBD04ͷ4BGBSJʣͰͷϝσΟΞڞࢹௌͷαϙʔτʂ
  5. w .FFU(SPVQ"DUJWJUJFT w $PPSEJOBUFNFEJBFYQFSJFODFTXJUI(SPVQ"DUJWJUJFT w #VJMEDVTUPNFYQFSJFODFTXJUI(SPVQ"DUJWJUJFT .PSF*OGPSNBUJPO w %FTJHOGPS(SPVQ"DUJWJUJFT IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED

    IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED w $PPSEJOBUFNFEJBQMBZCBDLJO4BGBSJXJUI(SPVQ"DUJWJUJFT IUUQTEFWFMPQFSBQQMFDPNWJEFPTQMBZXXED ˞ຊࢿྉʹܝࡌ͍ͯ͠ΔεΫϦʔϯγϣοτ͸্ه88%$ηογϣϯϏσΦΑΓൈਮͨ͠΋ͷͰ͢