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 6252191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:45:10+00:00 2026-05-24T13:45:10+00:00

I am creating a sample app for in app purchase. I have implemented for

  • 0

I am creating a sample app for in app purchase. I have implemented for one product I used the following code in which I can implement the for one product purchasing, but if suppose there are more than one product then how can I get the list of all the identifiers for all the products available. Hope I am clear with the question.

I have used the following code for for one product as below.

- (void)viewDidLoad {
[super viewDidLoad];


if ([SKPaymentQueue canMakePayments]) {
        NSLog(@"Parental-controls are disabled");

        SKProductsRequest *productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObject:@"com.companion.onemonth"]];
        productsRequest.delegate = self;
        [productsRequest start];
    } else {
        NSLog(@"Parental-controls are enabled");
        //com.companion.onemonth ;
    }
}


    - (IBAction)purchase {
    SKPayment *payment = [SKPayment paymentWithProductIdentifier:@"com.companion.onemonth"];
    [[SKPaymentQueue defaultQueue] addTransactionObserver:self];
    [[SKPaymentQueue defaultQueue] addPayment:payment];
}

Through this code I can get for one product but dont know how to get multiple identifiers at run time.

  • 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-05-24T13:45:11+00:00Added an answer on May 24, 2026 at 1:45 pm

    Put all your defined products hardcoded into the NSSet of SKProductsRequest:

    [NSSet setWithObjecta:@"com.companion.onemonth", @"com.companion.twomonth"], nil)

    and you you get an NSArray of available products in the delegate method:

    (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response;
    

    SKProductsResponse will have an array of your products.

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

Sidebar

Related Questions

Does anyone have a hello world sample or tutorial for creating an Eclipse plugin
I found one sample application from the Blackberry knowledgebase. From that application I have
My custom capistrano task app:sample fails with the following error message: mnylen ilmo-on-rails $
I'm creating a little web app where people can choose colors for different parts
I am creating a calendar based app. I have two dates say present date,
HI, I am creating an App in which countdown will be running. I want
Is there more comprehensive sample of creating Google App Engine App using GData Python
I am creating an iphone app with objective-c. I have a math problem I
I have looked at the sample generated by xcode when creating a new UISplitView
Im creating a sample RUBY ON RAILS APP and storing sessions in DB The

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.