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
260
Live Renderingとの上手い付き合い方
worlddowntown
1
500
20150225_iqon.pdf
worlddowntown
0
76
ios_push_local_notification
worlddowntown
0
110
iqon_ios_growth_hack
worlddowntown
3
4.3k
Other Decks in Programming
See All in Programming
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
760
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
260
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.5k
[JAWS-UG横浜 #76] イケてるアップデートを宇宙いち早く紹介するよ!
maroon1st
0
460
nekko cloudにおけるProxmox VE利用事例
irumaru
3
430
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
Zoneless Testing
rainerhahnekamp
0
120
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
250
CSC305 Lecture 26
javiergs
PRO
0
140
今年のアップデートで振り返るCDKセキュリティのシフトレフト/2024-cdk-security-shift-left
tomoki10
0
200
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
GraphQLとの向き合い方2022年版
quramy
44
13k
Designing Experiences People Love
moore
138
23k
Designing for Performance
lara
604
68k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Bash Introduction
62gerente
608
210k
Six Lessons from altMBA
skipperchong
27
3.5k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
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!