How to implement in-app purchase and start monetizing your iPhone and iPad apps with the iTunes billing

2,576 views
2,458 views

Published on

A guide to help you start monetizing iPhone and iPad apps with in-app purchase

A presentation given at MacWorld Mobile Asia in Hong Kong back in November 2010

© 2010 - Copyright Bitsmedia Pte Ltd

Published in: Technology, Economy & Finance
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,576
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • good afternoon\n- thank you to Paul and Kathy\n\ntoday I’ll b speaking abt IAP, great topics\n\nTwo words abt myself and bitsmedia\n- am Erwan, bitsmedia on twitter\n-20 yrs in Asia\n-run iOS development company in Singapore, we do B2B and B2C\n\nhow many of you monetize your app?\nhow many already use in-app purchase?\n\ni’ll try to convince u\n\n\n\n
  • 4 main topics i wanna cover today about IAP\n
  • 4 main topics i wanna cover today about IAP\n
  • 4 main topics i wanna cover today about IAP\n
  • 4 main topics i wanna cover today about IAP\n
  • LEt’s start to look at why you should care abt in-app purchase\n
  • - unlock features\n- buy remote content and services\n- sell: content, functionalities, services, subscriptions\n\nrules: digital items only. No physical goods or services.\ndelivered to the app that it was purchased from\n\nlet’s look at some facts and numbers\n
  • - unlock features\n- buy remote content and services\n- sell: content, functionalities, services, subscriptions\n\nrules: digital items only. No physical goods or services.\ndelivered to the app that it was purchased from\n\nlet’s look at some facts and numbers\n
  • - unlock features\n- buy remote content and services\n- sell: content, functionalities, services, subscriptions\n\nrules: digital items only. No physical goods or services.\ndelivered to the app that it was purchased from\n\nlet’s look at some facts and numbers\n
  • 2% of applications use in-app purchases\n26% of revenue in top 100 grossing is generated by apps that use in-app purchase. Means it includes the app price\n\nnow that you are convinced, let’s move on and see how you can im[plement it\n
  • 2% of applications use in-app purchases\n26% of revenue in top 100 grossing is generated by apps that use in-app purchase. Means it includes the app price\n\nnow that you are convinced, let’s move on and see how you can im[plement it\n
  • \n
  • You need a valid “iOS Paid App” contract with Apple. \nThe free app contract is not enough as you need to provide apple with your bank and tax details.\n\ntest with sandbox\nnot simulator, device only (so no live demo today)\ntied to specifc country (use +email)\n(sign out before testing).\n\nno promo codes\n
  • Reference name = internal us only\n\nProduct ID needs to be unique: use reverse DNS naming\n\nNon-consumable - default product type:\n\nCleared for sale !!! \n
  • I’ll show you later in the presentation how to display the local price in the local currewncy of the user\n
  • let’s now have a look on how the actual coding works\n\nApple has made this extremely simple. You’ll be disappointed if you expect me to show u many may lines.\n\n\n
  • before I show you the actual code to integrate SK\n\nTo give you a quick overview, here are 2 diagrams taken from the Apple’s developer portal)\n//sorry apple i know it’s NDA but am trying to get more developer wotk with u\n\nthe list could be retrieved from a server\n\nthe receipt could be verified with a server\n
  • 5 easy steps !!!!\n\nthat’s it, 5 ez steps to start making additional revenues from your apps\n
  • 5 easy steps !!!!\n\nthat’s it, 5 ez steps to start making additional revenues from your apps\n
  • 5 easy steps !!!!\n\nthat’s it, 5 ez steps to start making additional revenues from your apps\n
  • 5 easy steps !!!!\n\nthat’s it, 5 ez steps to start making additional revenues from your apps\n
  • 5 easy steps !!!!\n\nthat’s it, 5 ez steps to start making additional revenues from your apps\n
  • am sure u guys already know how to import the framework but just in case\n\nclass method called “canMakePayments” on the SKPaymentQueue\nreturns BOOL\n
  • Here we us the SKProductRequest class\n\nyou request product details for the product id that u have\n\nand then you implement the delegate method to make sure that you receive it.\n
  • Here we us the SKProductRequest class\n\nyou request product details for the product id that u have\n\nand then you implement the delegate method to make sure that you receive it.\n
  • now that you have a product and that your user has selected it to buy.\n\nwe add an SKPayment object to the SKPaymentQueue class (it’s a singleton)\n\nmyObserver implements the SKPaymentTransactionObserver protocol\n\nmake the observer a singleton, initialize it from app delegate and add as the\n
  • myObserver implements the SKPaymentTransactionObserver protocol\n\none method only\n\nmake the observer a singleton, initialize it from app delegate and add as the\n\n\n//send {receipt-data:...} to https: //buy.itunes.apple.com/verifyReceipt\n//receive {status:0} if verified\n
  • \n
  • there are things you can’t do. Like selling physical goods or services.\nWhat you sell from the app has to be delivered to THAT very app.\n\ntest test test... all scenario: parental control, no app store, no network connection, various devices/OS\n\ninitialize the observer as a Singleton\nJSON object, JSON response\n\nThere are lots of opensource JSON library you can use.\nWe now use TouchJSON.\n\nthe receipt-data is obtained in SKPaymentTransaction.transactionReceipt\nuse SKPaymentTransaction.originalTransaction for restored ones.\n\nTell the Muslim Pro story for UI Marketing Optimization \n
  • there are things you can’t do. Like selling physical goods or services.\nWhat you sell from the app has to be delivered to THAT very app.\n\ntest test test... all scenario: parental control, no app store, no network connection, various devices/OS\n\ninitialize the observer as a Singleton\nJSON object, JSON response\n\nThere are lots of opensource JSON library you can use.\nWe now use TouchJSON.\n\nthe receipt-data is obtained in SKPaymentTransaction.transactionReceipt\nuse SKPaymentTransaction.originalTransaction for restored ones.\n\nTell the Muslim Pro story for UI Marketing Optimization \n
  • there are things you can’t do. Like selling physical goods or services.\nWhat you sell from the app has to be delivered to THAT very app.\n\ntest test test... all scenario: parental control, no app store, no network connection, various devices/OS\n\ninitialize the observer as a Singleton\nJSON object, JSON response\n\nThere are lots of opensource JSON library you can use.\nWe now use TouchJSON.\n\nthe receipt-data is obtained in SKPaymentTransaction.transactionReceipt\nuse SKPaymentTransaction.originalTransaction for restored ones.\n\nTell the Muslim Pro story for UI Marketing Optimization \n
  • there are things you can’t do. Like selling physical goods or services.\nWhat you sell from the app has to be delivered to THAT very app.\n\ntest test test... all scenario: parental control, no app store, no network connection, various devices/OS\n\ninitialize the observer as a Singleton\nJSON object, JSON response\n\nThere are lots of opensource JSON library you can use.\nWe now use TouchJSON.\n\nthe receipt-data is obtained in SKPaymentTransaction.transactionReceipt\nuse SKPaymentTransaction.originalTransaction for restored ones.\n\nTell the Muslim Pro story for UI Marketing Optimization \n
  • there are things you can’t do. Like selling physical goods or services.\nWhat you sell from the app has to be delivered to THAT very app.\n\ntest test test... all scenario: parental control, no app store, no network connection, various devices/OS\n\ninitialize the observer as a Singleton\nJSON object, JSON response\n\nThere are lots of opensource JSON library you can use.\nWe now use TouchJSON.\n\nthe receipt-data is obtained in SKPaymentTransaction.transactionReceipt\nuse SKPaymentTransaction.originalTransaction for restored ones.\n\nTell the Muslim Pro story for UI Marketing Optimization \n
  • \n
  • How to implement in-app purchase and start monetizing your iPhone and iPad apps with the iTunes billing

    1. 1. In-App Purchases MacWorld Mobile Hong-Kong 17 November 2010 Erwan Macé Bitsmedia Pte Ltd @bitsmedia #macworldmobile #gsma #machk
    2. 2. In-App Purchases MacWorld Mobile Hong-Kong 17 November 2010 Erwan Macé Bitsmedia Pte Ltd @bitsmedia #macworldmobile #gsma #machk
    3. 3. In-App Purchases In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    4. 4. In-App PurchasesIn-App Purchases: why you should care In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    5. 5. In-App PurchasesIn-App Purchases: why you should carePreparing your app on iTunesConnect In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    6. 6. In-App PurchasesIn-App Purchases: why you should carePreparing your app on iTunesConnect Integrating StoreKit In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    7. 7. In-App PurchasesIn-App Purchases: why you should carePreparing your app on iTunesConnect Integrating StoreKit Optimizations In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    8. 8. In-App PurchasesIn-App Purchases: why you should carePreparing your app on iTunesConnect Integrating StoreKit Optimizations In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010 (1) GSMA Q4 2009 - (2) Gartner
    9. 9. Why You Should Care“In App Purchase allows you to embed a store directly within your application” In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    10. 10. Why You Should Care“In App Purchase allows you to embed a store directly within your application” A new way to monetize your apps In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    11. 11. Why You Should Care“In App Purchase allows you to embed a store directly within your application” A new way to monetize your appsStart selling content, features or services from within your app In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    12. 12. Why You Should Care 2% of applications In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010 (1) Distimo - 16 Nov 2010
    13. 13. Why You Should Care 2% of applications 16% Regular paid apps 10% Paid apps with in-app Free apps with in-app 74% In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010 (1) Distimo - 16 Nov 2010
    14. 14. Why You Should Care 2% of applications 16% Regular paid apps 10% Paid apps with in-app Free apps with in-app 74% 26% of revenue In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010 (1) Distimo - 16 Nov 2010
    15. 15. In-App PurchasesIn-App Purchases: why you should carePreparing your app on iTunesConnect Integrating StoreKit Optimizations In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    16. 16. iTunesConnect : Preparing your App In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    17. 17. iTunesConnect : Preparing your App In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    18. 18. iTunesConnect : Preparing your App In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    19. 19. iTunesConnect : Preparing your App Non-Consumable Products : persistent and across devices Consumable Products : can be repurchased over and over Subscriptions : non-persistent but shared across devices In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    20. 20. iTunesConnect : Preparing your App In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    21. 21. iTunesConnect : Preparing your AppLocalized Name, Description and Price will be retrieved from the Store by your application In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    22. 22. In-App PurchasesIn-App Purchases: why you should carePreparing your app on iTunesConnect Integrating StoreKit Optimizations In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    23. 23. Integrating StoreKit In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    24. 24. Integrate StoreKit In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    25. 25. Integrate StoreKit1. Import the framework In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    26. 26. Integrate StoreKit 1. Import the framework2. Check ability to make purchases In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    27. 27. Integrate StoreKit 1. Import the framework2. Check ability to make purchases 3. Retrieve product information In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    28. 28. Integrate StoreKit 1. Import the framework2. Check ability to make purchases 3. Retrieve product information 4. Initiate a transaction In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    29. 29. Integrate StoreKit 1. Import the framework2. Check ability to make purchases 3. Retrieve product information 4. Initiate a transaction 5. Handle the response In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    30. 30. Integrate StoreKit1. Import the framework#import <StoreKit/StoreKit.h> //make sure to add StoreKit.framework to your project In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    31. 31. Integrate StoreKit1. Import the framework#import <StoreKit/StoreKit.h> //make sure to add StoreKit.framework to your project2. Check ability to make purchases[SKPaymentQueue canMakePayments] In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    32. 32. Integrate StoreKit 3. Retrieve product informationNSSet *productSet = [NSSet setWithObjects:@"com.yourCompany.yourApp.yourProduct",nil]];SKProductsRequest *rq = [[SKProductsRequest alloc] initWithProductIdentifiers:productSet];rq.delegate = self; //make sure to add SKProductsRequestDelegate to your header[rq start];[rq release]; In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    33. 33. Integrate StoreKit 3. Retrieve product information- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response{ for (SKProduct *aProduct in response.products) { //retrieve and display name, description and local price for each product NSString *productName = [aProduct localizedTitle]; NSString *productDescription = [aProduct localizedDescription]; NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; [numberFormatter setFormatterBehavior:NSNumberFormatterBehavior10_4]; [numberFormatter setNumberStyle:NSNumberFormatterCurrencyStyle]; [numberFormatter setLocale:[aProduct priceLocale]; NSString *formattedPriceString = [numberFormatter stringFromNumber:[aProduct price]]; [numberFormatter release]; } for (NSString *invalidProductIds in response.invalidProductIdentifiers) { //handle invalid product ids. This list is usually empty }} In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    34. 34. Integrate StoreKit4. Initiate a transactionSKPayment *payment = [SKPayment paymentWithProductIdentifier:product.productIdentifier];//product is instance of SKProduct [[SKPaymentQueue defaultQueue] addTransactionObserver:myObserver];[[SKPaymentQueue defaultQueue] addPayment:payment]; In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    35. 35. Integrate StoreKit5. Handle the response- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions{ for (SKPaymentTransaction *transaction in transactions) { switch (transaction.transactionState) { case SKPaymentTransactionStatePurchased: //deliver product break; case SKPaymentTransactionStateFailed: if (transaction.error.code != SKErrorPaymentCancelled){ //handle-display error } break; case SKPaymentTransactionStateRestored: //deliver product break; case SKPaymentTransactionStatePurchasing: // break; } }} In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    36. 36. In-App PurchasesIn-App Purchases: why you should carePreparing your app on iTunesConnect Integrating StoreKit Optimizations In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    37. 37. Optimizations In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    38. 38. OptimizationsRead the Docs and check the Rules In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    39. 39. Optimizations Read the Docs and check the RulesInitialize the observer in ApplicationDidLaunch In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    40. 40. Optimizations Read the Docs and check the Rules Initialize the observer in ApplicationDidLaunch Restore transactions[[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    41. 41. Optimizations Read the Docs and check the Rules Initialize the observer in ApplicationDidLaunch Restore transactions[[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; Validate the transaction receipt//send {receipt-data:...} to https: //buy.itunes.apple.com/verifyReceipt//receive {status:0} if verified In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    42. 42. Optimizations Read the Docs and check the Rules Initialize the observer in ApplicationDidLaunch Restore transactions[[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; Validate the transaction receipt//send {receipt-data:...} to https: //buy.itunes.apple.com/verifyReceipt//receive {status:0} if verified UI, Value, Marketing In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    43. 43. Contactserwan@bitsmedia.com @bitsmedia www.bitsmedia.comwww.erwanmace.com In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010
    44. 44. Contactserwan@bitsmedia.com @bitsmedia www.bitsmedia.comwww.erwanmace.comDiscover and share iPhone apps withyour Facebook friends. Try it ! In-App Purchases MacWorld Mobile Hong-Kong - 17 Nov. 2010

    ×