Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
In-App Purchase / Subscription with StoreKit
Search
WorldDownTown
June 30, 2016
Programming
3
3k
In-App Purchase / Subscription with StoreKit
『WWDC16. Meetup @Wantedly with 日本経済新聞社』の登壇資料
WorldDownTown
June 30, 2016
Tweet
Share
More Decks by WorldDownTown
See All by WorldDownTown
WWDC動画鑑賞会📹🍱を支える技術 / WWDC Video Lunch
worlddowntown
0
250
Live Renderingとの上手い付き合い方
worlddowntown
1
480
20150225_iqon.pdf
worlddowntown
0
59
ios_push_local_notification
worlddowntown
0
95
iqon_ios_growth_hack
worlddowntown
3
4.2k
Other Decks in Programming
See All in Programming
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
930
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
200
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
1
170
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
340
Site Reliability Engineering for GMO
pyama86
8
1k
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
1
100
What We Can Learn From OSS
inouehi
0
420
Code Reviews
bkuhlmann
4
890
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
370
Ruby Pattern Matching
bkuhlmann
0
930
SIMD Parallel Programming with the Vector API
josepaumard
0
170
[技育CAMPアカデミア]アイディアを形に!【超入門】スマホアプリ開発〜リリースまでの流れをご紹介
teamlab
PRO
0
370
Featured
See All Featured
VelocityConf: Rendering Performance Case Studies
addyosmani
320
23k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
125
32k
Statistics for Hackers
jakevdp
789
220k
A Tale of Four Properties
chriscoyier
151
22k
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
7
1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
A Modern Web Designer's Workflow
chriscoyier
689
190k
What’s in a name? Adding method to the madness
productmarketing
PRO
16
2.6k
Optimising Largest Contentful Paint
csswizardry
8
2.4k
Adopting Sorbet at Scale
ufuk
68
8.6k
Transcript
In-App Purchase / Subscription with StoreKit
Keisuke Shoji @WorldDownTown VASILY, Inc.
In-App Purchase େ͖ͳൃද͕͋Γ·ͨ͠Ͷ (WWDCͷલʹ)
Introducing Expanded Subscriptions in iTunes Connect (Session 301) Using Store
Kit for In-App Purchases with Swift 3 (Session 702)
Introducing Expanded Subscriptions in iTunes Connect (Session 301)
In-App Purchase?
In-App Purchase • Consumable (LINEͷίΠϯ) • Non-consumable (ࠂඇදࣔΦϓγϣϯ) • Non-renewable
subscriptions (Quizlet) • Auto-renewalbe subscriptions (Apple Music) • Free subscriptions (Newsstand)
In-App Purchase • Consumable • Non-consumable • Non-renewable subscriptions •
Auto-renewalbe subscriptions • Free subscriptionsɹ2016ळ͔Βdeprecated
Auto-renewable subscriptions
Auto-renewable subscriptions ։ൃऀͷച্͕Ξοϓ
Auto-renewable subscriptions ։ൃऀͷച্͕Ξοϓ • ച্ͷ70→85% • ద༻ϦϦʔε͔Β1ޙ • ͢ͰʹϦϦʔε͔Β1ܦա͍ͯ͠Δσϕϩούʔʹద༻ࡁ Έ
Auto-renewable subscriptions ΧςΰϦ੍ݶͷഇࢭ
Auto-renewable subscriptions ΧςΰϦ੍ݶͷഇࢭ • 2016ळʙ • ϧʔϧ·ͩ໌จԽ͞Ε͍ͯͳ͍ ex) ͨͩͷջதి౮ΞϓϦʹ͑ͳ͍ͱ͔ •
͜Ε·Ͱ৹͕ࠪ௨Βͳ͔ͬͨΧςΰϦͰɺ৹ࠪʹ௨ΔΑ͏ ʹͳͬͨ
Auto-renewable subscriptions Subscription Groups ࠓ·Ͱ
Auto-renewable subscriptions Subscription Groups 2016ळʙ SubscriptionάϧʔϓʹෳͷΛแͰ͖Δ
Auto-renewable subscriptions Subscription Groups AppStoreΞϓϦͰҙͷϓϥϯʹมߋՄೳ
Auto-renewable subscriptions Territory Pricing ࠃ͝ͱʹTierͷΓସ͕͑Մೳ
Auto-renewable subscriptions Customrer Retension ্͛ͨ࣌͠… ࠓ·Ͱϝʔϧͷ௨ͷΈ
Auto-renewable subscriptions Customrer Retension ্͛ͨ࣌͠… 2016ळʙ PUSH௨དྷΔ
Auto-renewable subscriptions Customrer Retension 240ԁʹ্͛͢Δ͕ɺطʹߪೖࡁΈͷ Ϣʔβʔʹ120ԁͷ··ఏڙ͢Δ͜ͱ ͕Ͱ͖Δ
Auto-renewable subscriptions • ऩӹͱΧςΰϦͷخ͍͠ΈΜͳخ͍͠ʂ • (্͕ͬͨऩӹͰAppStoreͷࠂങͬͯͶ) • Androidʹಉ͡ػೳ͕ͳ͍ͷʹɺiOS͚ͩԼ͛ͬͯͷ… • ݸਓ։ൃऀʹخ͍͔͠
Using Store Kit for In-App Purchases with Swift 3
In-App Purchase Auto-renewable subscriptions Λ͜Ε͔Β࣮͢Δ͋ͳͨ
͜ͷಈըݟͳ͍͍ͯ͘Ͱ͢
iOS 10ʹͳͬͯߪೖॲཧͷϑϩʔ มΘΒͳ͍
In-App Purchase ϓϩάϥϛϯάΨ Πυ https://developer.apple.com/jp/documentation/ StoreKitGuide.pdf ϨγʔτݕূϓϩάϥϛϯάΨΠυ https://developer.apple.com/jp/documentation/General/ ValidateAppStoreReceipt/Introduction.html#//apple_ref/doc/
εϥΠυͷίʔυ͕ಈ͔ͳ͍
εϥΠυͷίʔυ͕ಈ͔ͳ͍
StoreKit API Diff in iOS 10 https://developer.apple.com/library/prerelease/content/ releasenotes/General/iOS10APIDiffs/Swift/StoreKit.html
StoreKit API Diff in iOS 10 Enumͷͷ಄จࣈ͕খจࣈʹͳͬͨ enum SKPaymentTransactionState :
Int { case Purchasing ! case purchasing
StoreKit API Diff in iOS 10 ͳϝιου໊͕γϯϓϧʹͳͬͨ // SKPaymentQueue func
addTransactionObserver(_ observer: SKPaymentTransactionObserver) ! func add(_ observer: SKPaymentTransactionObserver)
Receipt Validation
Receipt Validation StoreKitͰߪೖྃޙɺAppStore͔Βड͚औΕΔϨγʔτใ (ߪೖͷূ໌ॻ) ↓ վ᜵͞ΕΔةݥੑ͕͋Δ
Receipt Validation ΞϓϦͰݕূ ❌ΞϧΰϦζϜެ։͞Ε͍ͯΔ͕ෳࡶ ❌αϯϓϧίʔυ͕ͳ͍ ❌OSS͋Δʹ͋Δ͕… rmaddy/VerifyStoreReceiptiOS
Receipt Validation αʔόʔαΠυͰݕূ • ࣗલͰϗετ͢ΔαʔόʹϨγʔτΛ͛Δ • αʔόˠAppStoreʹϨγʔτΛ͛ͯݕূ͢Δ ✅ෳࡶͳϩδοΫΛ࣮͢Δඞཁ͕ແ͍
Φεεϝ SwiftyStoreKit ˒900+ https://github.com/bizz84/ SwiftyStoreKit In-App Purchaseʹඞཁͳॲཧ͕΄ͱΜ Ͳೖ͍ͬͯΔ
·ͱΊ • Auto-renewable subscriptions ։ൃऀͷऩӹ͕Ξοϓ • Auto-renewable subscriptions ͷΧςΰϦ੍ݶ͕ͳ͘ͳΔ •
iOS10ʹͳͬͯIn-App PurchaseͷΈมΘΒͣ • StoreKitϝιου໊ͷมߋ͕΄ͱΜͲ • ϨγʔτݕূαʔόʔͰΔͷ͕Φεεϝ
Thank You!