Question

I am going to implement StoreKit in an iPhone application and wanted to know if there is any experience out there already that could point out any pitfalls or traps in using StoreKit?

I know the API is new - but there is some premium content in my app that I would like to ask users to pay for and this seems an ideal way to do it - rather than directing them to a website for separate payment on their subscription.

I also assume there are guidelines for how you list an app in the app store to make clear that the app is free to install - but you must upgrade for certain functionality.

UPDATE (from comments): You cannot convert a FREE app into a paid app - so the user must first install it at the minimum cost before you can then use the StoreKit API to charge for additional software.

2ND UPDATE: You can now use the API in Free Apps - Apple changed the rules recently


Can anyone recommend a good application that uses the StoreKit API that I might model the user interaction on?

Was it helpful?

Solution

Things to think about when implementing StoreKit:

  1. When you call [[SKPaymentQueue defaultQueue] restoreCompletedTransactions]; sometimes you get the (void)paymentQueueRestoreCompletedTransactionsFinished:(SKPaymentQueue *)queue callback before (and sometimes long before) the - (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions call back. (Also sometimes transactions are missing.)

  2. Sometimes when you add a purchase to the Queue with [[SKPaymentQueue defaultQueue] addPayment:payment]; the transaction is removed from the queue and the only feedback you get is: - (void)paymentQueue:(SKPaymentQueue *)queue removedTransactions:(NSArray *)transactions

  3. User cancelations returns a wide variety of error messages and some error conditions return the SKErrorPaymentCancelled error code. Specifically:

    • if the user hits cancel when prompted with 'You have already purchased this product' the transaction error is nil.
    • if the user hits cancel when prompted with 'Sign in: [Use Existing Account] [Create New Account] [Cancel]' the error code is SKErrorUnknown.
    • if the user hits [OK] instead of canceling when prompted to enter a password and hasn't entered a password, the error code is SKErrorPaymentCancelled.

  4. Don't forget to implement other SKRequest callbacks:

    - (void)request:(SKRequest *)request didFailWithError:(NSError *)error;

    - (void)requestDidFinish:(SKRequest *)request

OTHER TIPS

I think one has to consider the current state of ratings and reviews. Customers have been trending toward the negative (to the detriment of many great developers) in their impression of applications.

I suspect that SK will give your customers yet another reason to be "upset" with your application.

You will have to be careful how you represent your "premium" or "additional" content. Bear in mind that up until now, customers have been getting free updates to there apps. There is bound to be a backlash from customers dependent upon your execution and you target market.

In fact, it will probably provide a boost to your sales if you advertise: "I do not charge for additional content". I can see this being a new trend in attract customers by assuring them that $1.99 IS $1.99.

So, in addition to customer perception you must maintain the back-end infrastructure to save customer records for recovery. I realize the prospect of open-ended profit seems enticing, but there is much to consider before implementing this for your apps.

I made a nice wrapper around StoreKit framework. the wrapper is available here

Just be careful to read the documentation well, and do all of the things necessary to re-load data on secondary devices.

Keep in mind there is a difference between consumable things (don't have to support free re-purchase on other devices) and non-consumable items (where you do, which sounds like what you have).

Also, the single biggest tip I've heard is when testing, log out of your own iTunes account on the phone and log into the account you are using for testing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top