Slide 1

Slide 1 text

In-App Purchase / Subscription with StoreKit

Slide 2

Slide 2 text

Keisuke Shoji @WorldDownTown VASILY, Inc.

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

Introducing Expanded Subscriptions in iTunes Connect (Session 301)

Slide 6

Slide 6 text

In-App Purchase?

Slide 7

Slide 7 text

In-App Purchase • Consumable (LINEͷίΠϯ) • Non-consumable (޿ࠂඇදࣔΦϓγϣϯ) • Non-renewable subscriptions (Quizlet) • Auto-renewalbe subscriptions (Apple Music) • Free subscriptions (Newsstand)

Slide 8

Slide 8 text

In-App Purchase • Consumable • Non-consumable • Non-renewable subscriptions • Auto-renewalbe subscriptions • Free subscriptionsɹ2016೥ळ͔Βdeprecated

Slide 9

Slide 9 text

Auto-renewable subscriptions

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

Auto-renewable subscriptions ΧςΰϦ੍ݶͷഇࢭ • 2016೥ळʙ • ϧʔϧ͸·ͩ໌จԽ͞Ε͍ͯͳ͍ ex) ͨͩͷջதి౮ΞϓϦʹ͸࢖͑ͳ͍ͱ͔ • ͜Ε·Ͱ৹͕ࠪ௨Βͳ͔ͬͨΧςΰϦͰ΋ɺ৹ࠪʹ௨ΔΑ͏ ʹͳͬͨ

Slide 14

Slide 14 text

Auto-renewable subscriptions Subscription Groups ࠓ·Ͱ

Slide 15

Slide 15 text

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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

Using Store Kit for In-App Purchases with Swift 3

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

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

Slide 30

Slide 30 text

StoreKit API Diff in iOS 10 Enumͷ஋ͷ಄จࣈ͕খจࣈʹͳͬͨ enum SKPaymentTransactionState : Int { case Purchasing ! case purchasing

Slide 31

Slide 31 text

StoreKit API Diff in iOS 10 ৑௕ͳϝιου໊͕γϯϓϧʹͳͬͨ // SKPaymentQueue func addTransactionObserver(_ observer: SKPaymentTransactionObserver) ! func add(_ observer: SKPaymentTransactionObserver)

Slide 32

Slide 32 text

Receipt Validation

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

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

Slide 35

Slide 35 text

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

Slide 36

Slide 36 text

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

Slide 37

Slide 37 text

·ͱΊ • Auto-renewable subscriptions ։ൃऀͷऩӹ഑෼͕Ξοϓ • Auto-renewable subscriptions ͷΧςΰϦ੍ݶ͕ͳ͘ͳΔ • iOS10ʹͳͬͯ΋In-App Purchaseͷ࢓૊Έ͸มΘΒͣ • StoreKit͸ϝιου໊ͷมߋ͕΄ͱΜͲ • Ϩγʔτݕূ͸αʔόʔͰ΍Δͷ͕Φεεϝ

Slide 38

Slide 38 text

Thank You!