In-App Purchase / Subscription with StoreKit

In-App Purchase / Subscription with StoreKit

『WWDC16. Meetup @Wantedly with 日本経済新聞社』の登壇資料

3d5e25f0ab058f8c44419c1ae41be86e?s=128

WorldDownTown

June 30, 2016
Tweet

Transcript

  1. In-App Purchase / Subscription with StoreKit

  2. Keisuke Shoji @WorldDownTown VASILY, Inc.

  3. In-App Purchase େ͖ͳൃද͕͋Γ·ͨ͠Ͷ (WWDCͷલʹ)

  4. Introducing Expanded Subscriptions in iTunes Connect (Session 301) Using Store

    Kit for In-App Purchases with Swift 3 (Session 702)
  5. Introducing Expanded Subscriptions in iTunes Connect (Session 301)

  6. In-App Purchase?

  7. In-App Purchase • Consumable (LINEͷίΠϯ) • Non-consumable (޿ࠂඇදࣔΦϓγϣϯ) • Non-renewable

    subscriptions (Quizlet) • Auto-renewalbe subscriptions (Apple Music) • Free subscriptions (Newsstand)
  8. In-App Purchase • Consumable • Non-consumable • Non-renewable subscriptions •

    Auto-renewalbe subscriptions • Free subscriptionsɹ2016೥ळ͔Βdeprecated
  9. Auto-renewable subscriptions

  10. Auto-renewable subscriptions ։ൃऀͷച্഑෼͕Ξοϓ

  11. Auto-renewable subscriptions ։ൃऀͷച্഑෼͕Ξοϓ • ച্ͷ70→85% • ద༻͸ϦϦʔε͔Β1೥ޙ • ͢ͰʹϦϦʔε͔Β1೥ܦա͍ͯ͠Δσϕϩούʔʹ͸ద༻ࡁ Έ

  12. Auto-renewable subscriptions ΧςΰϦ੍ݶͷഇࢭ

  13. Auto-renewable subscriptions ΧςΰϦ੍ݶͷഇࢭ • 2016೥ळʙ • ϧʔϧ͸·ͩ໌จԽ͞Ε͍ͯͳ͍ ex) ͨͩͷջதి౮ΞϓϦʹ͸࢖͑ͳ͍ͱ͔ •

    ͜Ε·Ͱ৹͕ࠪ௨Βͳ͔ͬͨΧςΰϦͰ΋ɺ৹ࠪʹ௨ΔΑ͏ ʹͳͬͨ
  14. Auto-renewable subscriptions Subscription Groups ࠓ·Ͱ

  15. Auto-renewable subscriptions Subscription Groups 2016೥ळʙ Subscriptionάϧʔϓʹෳ਺ͷ঎඼Λ಺แͰ͖Δ

  16. Auto-renewable subscriptions Subscription Groups AppStoreΞϓϦ಺Ͱ೚ҙͷϓϥϯʹมߋՄೳ

  17. Auto-renewable subscriptions Territory Pricing ࠃ͝ͱʹTierͷ੾Γସ͕͑Մೳ

  18. Auto-renewable subscriptions Customrer Retension ஋্͛ͨ࣌͠… ࠓ·Ͱ͸ϝʔϧͷ௨஌ͷΈ

  19. Auto-renewable subscriptions Customrer Retension ஋্͛ͨ࣌͠… 2016೥ळʙ PUSH௨஌΋དྷΔ

  20. Auto-renewable subscriptions Customrer Retension 240ԁʹ஋্͛͢Δ͕ɺطʹߪೖࡁΈͷ Ϣʔβʔʹ͸120ԁͷ··ఏڙ͢Δ͜ͱ ͕Ͱ͖Δ

  21. Auto-renewable subscriptions • ऩӹͱΧςΰϦͷ࿩͸خ͍͠ΈΜͳخ͍͠ʂ • (্͕ͬͨऩӹͰAppStoreͷ޿ࠂ࿮ങͬͯͶ) • Androidʹಉ͡ػೳ͕ͳ͍ͷʹɺiOS͚ͩ஋Լ͛ͬͯͷ΋… • ݸਓ։ൃऀʹ͸خ͍͔͠΋

  22. Using Store Kit for In-App Purchases with Swift 3

  23. In-App Purchase Auto-renewable subscriptions Λ͜Ε͔Β࣮૷͢Δ͋ͳͨ΁

  24. ͜ͷಈըݟͳ͍͍ͯ͘Ͱ͢

  25. iOS 10ʹͳͬͯ΋ߪೖॲཧͷϑϩʔ͸ มΘΒͳ͍

  26. In-App Purchase ϓϩάϥϛϯάΨ Πυ https://developer.apple.com/jp/documentation/ StoreKitGuide.pdf ϨγʔτݕূϓϩάϥϛϯάΨΠυ https://developer.apple.com/jp/documentation/General/ ValidateAppStoreReceipt/Introduction.html#//apple_ref/doc/

  27. εϥΠυͷίʔυ͕ಈ͔ͳ͍

  28. εϥΠυͷίʔυ͕ಈ͔ͳ͍

  29. StoreKit API Diff in iOS 10 https://developer.apple.com/library/prerelease/content/ releasenotes/General/iOS10APIDiffs/Swift/StoreKit.html

  30. StoreKit API Diff in iOS 10 Enumͷ஋ͷ಄จࣈ͕খจࣈʹͳͬͨ enum SKPaymentTransactionState :

    Int { case Purchasing ! case purchasing
  31. StoreKit API Diff in iOS 10 ৑௕ͳϝιου໊͕γϯϓϧʹͳͬͨ // SKPaymentQueue func

    addTransactionObserver(_ observer: SKPaymentTransactionObserver) ! func add(_ observer: SKPaymentTransactionObserver)
  32. Receipt Validation

  33. Receipt Validation StoreKitͰߪೖ׬ྃޙɺAppStore͔Βड͚औΕΔϨγʔτ৘ใ (ߪೖͷূ໌ॻ) ↓ վ᜵͞ΕΔةݥੑ͕͋Δ

  34. Receipt Validation ΞϓϦ಺Ͱݕূ ❌ΞϧΰϦζϜ͸ެ։͞Ε͍ͯΔ͕ෳࡶ ❌αϯϓϧίʔυ͕ͳ͍ ❌OSS͸͋Δʹ͸͋Δ͕… rmaddy/VerifyStoreReceiptiOS

  35. Receipt Validation αʔόʔαΠυͰݕূ • ࣗલͰϗετ͢ΔαʔόʹϨγʔτΛ౤͛Δ • αʔόˠAppStoreʹϨγʔτΛ౤͛ͯݕূ͢Δ ✅ෳࡶͳϩδοΫΛ࣮૷͢Δඞཁ͕ແ͍

  36. Φεεϝ SwiftyStoreKit ˒900+ https://github.com/bizz84/ SwiftyStoreKit In-App Purchaseʹඞཁͳॲཧ͕΄ͱΜ Ͳೖ͍ͬͯΔ

  37. ·ͱΊ • Auto-renewable subscriptions ։ൃऀͷऩӹ഑෼͕Ξοϓ • Auto-renewable subscriptions ͷΧςΰϦ੍ݶ͕ͳ͘ͳΔ •

    iOS10ʹͳͬͯ΋In-App Purchaseͷ࢓૊Έ͸มΘΒͣ • StoreKit͸ϝιου໊ͷมߋ͕΄ͱΜͲ • Ϩγʔτݕূ͸αʔόʔͰ΍Δͷ͕Φεεϝ
  38. Thank You!