Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8244683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:56:07+00:00 2026-06-07T21:56:07+00:00

How should I implement two consumables with MKStoreKit? If I have two consumables, for

  • 0

How should I implement two consumables with MKStoreKit? If I have two consumables, for example “handful of coins” (10 coins) and “bag with coins” (100 coins). I have two questions:

  1. How should product IDs look like?

  2. How to get overall amount of purchased coins, including ones from handful(s) and from bag(s)?

    Amount = 10*handfuls_purchased + 100*bags_purchased;
    

I’ve read tutorial on official MKStoreKit blog but I still just can’t figure this out.

P.s. I’m using MKStoreKit 3.1 and can’t update to more recent version because of ARC (my project doesn’t support it)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T21:56:09+00:00Added an answer on June 7, 2026 at 9:56 pm

    Your plist’s consumables key should look like this.

    <key>Consumables</key>
        <dict>
            <key>com.yourcompany.yourapp.handfulofcoins</key>
            <dict>
                <key>Count</key>
                <integer>10</integer>
                <key>Name</key>
                <string>CoinsInMyApp</string>
            </dict>
    <key>com.yourcompany.yourapp.bagofcoins</key>
            <dict>
                <key>Count</key>
                <integer>100</integer>
                <key>Name</key>
                <string>CoinsInMyApp</string>
            </dict>
        </dict>
    

    I match the String “CoinsInMyApp” to calculate the number of purchased coins no matter which consumable they come from. In the above example if the user buys 1 bagofcoins and 2 handfulofcoins, MKStoreManager stores 120 for the key CoinsInMyApp.

    methods,

    - (BOOL) canConsumeProduct:(NSString*) productIdentifier
    - (BOOL) canConsumeProduct:(NSString*) productIdentifier quantity:(int) quantity
    

    will tell you if you have enough products.

    When the player uses coins, you should let MKStoreKit know this by calling

    - (BOOL) consumeProduct:(NSString*) productIdentifier quantity:(int) quantity
    

    You can get the number of coins by calling

    [[MKStoreManager numberForKey:@"CoinsInMyApp"] intValue];
    

    PS: You can use MKStoreKit latest version in a non-ARC project by compiling it with the -fobjc-arc flag.

    I wrote about this here http://blog.mugunthkumar.com/articles/migrating-your-code-to-objective-c-arc/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have asp.net usercontrol and I should implement simple client functionality - send two
My app should implement login with facebook but I have noticed that every time
I have an interface for a variety of classes, all of which should implement
How should i implement site with two language that one language direction is rtl.
I have two questions, both related to the same view: so there is view
We have to implement a two tier architecture to distribute a cache from a
Two function should be implemented, and I am wondering what type of validation I
My project is a computer vision java application which should implement the following :
I need a C# library to deal with matrices. It should implement singular value
Should I implement named parameters in Java using Hash tables? I saw this entry:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.