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
Apple In App Purchase
Search
Sing Jie Lee
May 22, 2015
Technology
25
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Apple In App Purchase
Sing Jie Lee
May 22, 2015
More Decks by Sing Jie Lee
See All by Sing Jie Lee
Infocomm Media Youth Festival 2016 - Career Talk
singjie
0
62
Sprite Kit
singjie
0
65
SiriKit
singjie
0
210
React Native
singjie
1
94
Arduino
singjie
0
48
Software Engineering
singjie
0
63
Advanced Core Data
singjie
0
47
Amazon Echo and Home Integration
singjie
0
110
CS3216 Garena Project X
singjie
0
59
Other Decks in Technology
See All in Technology
Multica × 長期記憶:40個のミニプロジェクト管理
eiei114
1
210
『止めない』を設計する — 制約の中で、事業の根幹を支える判断
hiroyaterui
0
230
全員がプロダクトへ向き合う組織を持続成長させるために——組織づくりのフライホイールと4象限 / The Flywheel Model and Four Quadrants for Organizational Design
hiro_torii
4
920
Benchmarking Vector Databases: pgvector vs. LanceDB
tsho
0
150
2026-09-04 SRE Tech Talk #15 怠惰なTerraform / Lazy Terraform
masasuzu
0
230
Bet AI Day 2026丨Production-Ready AI Agents — エンタープライズの実務を任せるための設計と運用
layerx
PRO
4
2.6k
こんなアーキテクチャ図は嫌だ BEYOND THE TIME: 半年後の自分へ贈る15のメッセージ / 15 of Anti-pattern in AWS Architecture Diagrams
naospon
3
270
GuardDuty 検知対応を DevOps Agent で効率化しようとしている話 / GuardDuty Investigations with DevOps Agent
masahirokawahara
1
340
AIで開発は速くなったのに、なぜ現場は楽にならないのか 〜あなたの組織のボトルネックを突き止めるワークショップ〜
jacopen
1
280
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
110
Driving AI Adoption Using In-House GPUs to Serve Qwen
po3rin
2
470
Deploying a Full-Stack Bun-Native Framework on Cloudflare Workers
7nohe
0
110
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
HDC tutorial
michielstock
2
850
Producing Creativity
orderedlist
PRO
348
41k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
370
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Practical Orchestrator
shlominoach
191
12k
Leo the Paperboy
mayatellez
8
2.2k
Amusing Abliteration
ianozsvald
1
290
Mobile First: as difficult as doing things right
swwweet
225
10k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The SEO Collaboration Effect
kristinabergwall1
1
550
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
Transcript
In App Purchase iOS
Why?
Background Story
None
5 types of IAP • Consumable • Non Consumable •
Auto Renewable Subscription • Non-Renewing Subscription • Free Subscription
Products • Products are identified by ProductID • e.g. com.garena.fishfood.100
productID - Product Name (Localized) - Product Price (Tier) - Product Description
Pricing Tier
Pricing Tier
Live/Sandbox App Store Live Sandbox BeeFlight IAP Apple Review Real
AppleID, Real $$ Test AppleID, No $$
Request for SKProduct Add SKProduct to Payment Queue Finish Transaction
ProductID (NSString) 1 2 3 4
Request for SKProduct ProductID (NSString) 1 2 typedef void(^PaymentBlock)(BOOL success);
- (void)buyProductID:(NSString *)productID onCompletion:(PaymentBlock)onCompletion; { NSSet *identifiers = [NSSet setWithObject:productID]; SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:identifiers]; request.delegate = self; [request start]; self.paymentBlock = onCompletion; }
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response { SKProduct *product =
[response.products firstObject]; SKPayment *payment = [SKPayment paymentWithProduct:product]; [[SKPaymentQueue defaultQueue] addPayment:payment]; } Add SKProduct to Payment Queue 3
- (void)paymentCompleted:(SKPaymentTransaction *)transaction { [[SKPaymentQueue defaultQueue] finishTransaction:transaction]; } Finish Transaction
4
IAP Crackable
IAP Crackable
Request for SKProduct Add SKProduct to Payment Queue Verify Transaction
Finish Transaction ProductID (NSString) 1 2 3 4 5
Receive Receipt Our Server Apple Server Verification
Receive Receipt Our Server Apple Server Encrypted receipt Verification
Receive Receipt Our Server Apple Server Encrypted receipt Encrypted receipt
Verification
Receive Receipt Our Server Apple Server Encrypted receipt Encrypted receipt
Decrypted receipt Verification
iOS Client, receive receipt Our Server Apple Server Encrypted receipt
Encrypted receipt Decrypted receipt OK/Not OK Verification
Verification { "receipt": { "original_purchase_date_pst": "2015-05-20 03:26:29 America/Los_Angeles" "unique_identifier": "c1b17ca2d3ceb9b77797fc2c4826ba4aece18370",
"original_transaction_id": "340000068545339", "bvrs": "1.1", "app_item_id": "530942747", "transaction_id": "340000068545339", "quantity": "1", "unique_vendor_identifier": "D39AC063-4817-4DCE-B061-EB5EEE073A5B", "product_id": "com.singjie.btt.full.package", "item_id": "532592602", "version_external_identifier": "11626777", "bid": "com.singjie.BTT", "purchase_date_ms": "1432117589538", "purchase_date": "2015-05-20 10:26:29 Etc/GMT", "purchase_date_pst": "2015-05-20 03:26:29 America/Los_Angeles", "original_purchase_date": "2015-05-20 10:26:29 Etc/GMT", "original_purchase_date_ms": "1432117589538" }, "status": 0 }
Verification { "receipt": { "original_purchase_date_pst": "2012-07-12 05:54:35 America/Los_Angeles" "purchase_date_ms": "1342097675882",
"original_transaction_id": "170000029449420", "original_purchase_date_ms": "1342097675882", "app_item_id": "450542233", "transaction_id": "170000029449420", "quantity": "1", "bvrs": "1.4", "version_external_identifier": "9051236", "bid": "com.zeptolab.ctrexperiments", "product_id": "com.zeptolab.ctrbonus.superpower1", "purchase_date": "2012-07-12 12:54:35 Etc/GMT", "purchase_date_pst": "2012-07-12 05:54:35 America/Los_Angeles", "original_purchase_date": "2012-07-12 12:54:35 Etc/GMT", "item_id": "534185042" }, "status": 0 }
Verification { "receipt": { "original_purchase_date_pst": "2015-05-20 03:26:29 America/Los_Angeles" "unique_identifier": "c1b17ca2d3ceb9b77797fc2c4826ba4aece18370",
"original_transaction_id": "340000068545339", "bvrs": "1.1", "app_item_id": "530942747", "transaction_id": "340000068545339", "quantity": "1", "unique_vendor_identifier": "D39AC063-4817-4DCE-B061-EB5EEE073A5B", "product_id": "com.singjie.btt.full.package", "item_id": "532592602", "version_external_identifier": "11626777", "bid": "com.singjie.BTT", "purchase_date_ms": "1432117589538", "purchase_date": "2015-05-20 10:26:29 Etc/GMT", "purchase_date_pst": "2015-05-20 03:26:29 America/Los_Angeles", "original_purchase_date": "2015-05-20 10:26:29 Etc/GMT", "original_purchase_date_ms": "1432117589538" }, "status": 0 }
Demo
iTunesConnect • Create Products • Create Test Account
Q&A