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

  • Home
  • SEARCH
  • 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 8202679
In Process

The Archive Base Latest Questions

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

Currently I’m working on in-App Purchase functionality, and I am getting below of the

  • 0

Currently I’m working on in-App Purchase functionality, and I am getting below of the error

“Error Domain=SKErrorDomain Code=3 “Cannot connect to iTunes Store” UserInfo=0x1aaf40 {NSLocalizedDescription=Cannot connect to iTunes Store}”

Here is the step.

1) First I have create a one application “inAppPro” and it is under (Status) : “Prepare for upload”

enter image description here

2) I have added 4 Non-Consumable product. and also fill related details.

enter image description here
enter image description here

3) I have also create test user (sandbox) for test in-App purchase product.

4) I have also created provision profile with enable inApp Purchase.

5) I have also created APP ID without (*) wild card.

Here is the code which are currently I’m using.

- (void)viewDidLoad
{
   Detail1 *observer = [[Detail1 alloc] init];

   [[SKPaymentQueue defaultQueue] addTransactionObserver:observer];

   [[SKPaymentQueue defaultQueue] restoreCompletedTransactions];

    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}


- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{

    if ([SKPaymentQueue canMakePayments])
    {
        NSString *product = [NSString stringWithFormat:@"com.companyname.inAppDemo.module%d",ApplicationDelegate.objectID];
        NSLog(@"In-App product for request = %@", product);

        SKPayment *payment = [SKPayment paymentWithProductIdentifier:product];
        [[SKPaymentQueue defaultQueue] addPayment:payment];


    }
    else
    {
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"MyApp" message:@"You are not authorized to purchase from AppStore"
                                                       delegate:self cancelButtonTitle:@"OK" otherButtonTitles: nil];
        [alert show];
        [alert release];
    }
}
- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions
{
    for (SKPaymentTransaction *transaction in transactions)
    {
        switch (transaction.transactionState)
        {
            case SKPaymentTransactionStatePurchased:

                [self completeTransaction:transaction];

                break;

            case SKPaymentTransactionStateFailed:

                [self failedTransaction:transaction];

                break;

            case SKPaymentTransactionStateRestored:

                [self restoreTransaction:transaction];

            default:

                break;
        }           
    }
}
- (void) failedTransaction: (SKPaymentTransaction *)transaction
{   
    if (transaction.error.code != SKErrorPaymentCancelled)      
    {       
        // Optionally, display an error here.   
        NSLog(@"%@",transaction.error);

    }   
    [[SKPaymentQueue defaultQueue] finishTransaction: transaction]; 
}

- (void) completeTransaction: (SKPaymentTransaction *)transaction
{       
    //[[MKStoreManager sharedManager] provideContent: transaction.payment.productIdentifier];   
    [[SKPaymentQueue defaultQueue] finishTransaction: transaction]; 
}

- (void) restoreTransaction: (SKPaymentTransaction *)transaction
{   
    //[[MKStoreManager sharedManager] provideContent: transaction.originalTransaction.payment.productIdentifier];   
    [[SKPaymentQueue defaultQueue] finishTransaction: transaction]; 
}
-(IBAction)btnpurchase:(id)sender
{
    NSLog(@"ProductStatus = %@", ApplicationDelegate.productStatus);

    if ([ApplicationDelegate.productStatus isEqualToString:@"FREE"]) 
    {
        UIAlertView *alert = [[UIAlertView alloc]initWithTitle:nil message:@"This is free for you so ENJOY it!!!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil,nil];
        [alert show];
        [alert release];
    }
    else if ([ApplicationDelegate.productStatus isEqualToString:@"PAID"]) 
    {
        UIAlertView *alert = [[UIAlertView alloc]initWithTitle:nil message:@"You have already purchase it!!!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil,nil];
        [alert show];
        [alert release];
    }
    else
    {
        NSLog(@"Detail1 id for product = %d", ApplicationDelegate.objectID);
        NSString *product = [NSString stringWithFormat:@"com.companyname.inAppDemo.module%d",ApplicationDelegate.objectID];
        NSLog(@"In-App product-id = %@", product);



        SKProductsRequest *request= [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObjects:product,nil]]; 
        request.delegate = self;
        [request start];

    }
}

Please anyone help me out.

Thanks in advance.

  • 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-07T07:16:18+00:00Added an answer on June 7, 2026 at 7:16 am

    You must have valid contracts in effect in the “Contracts, Tax, and Banking” Section.
    And of course, make sure that you use a correct Provisioning Profile and that you have enabled in App Purchase for that ID, and (last) that you have added purchasable items in iTunes Connect (which you did, as your screenshots show).

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

Sidebar

Related Questions

Currently working with converting SQLException error messages into messages that are more useful for
currently, I`m implementing a map App with Mono4Droid and there I`m using a WebView
Currently, I'm working on a project where I have a server - client relationship
Currently I have this code: <?php echo '<meta name=robots content=noindex>'; $arr = json_decode(file_get_contents(http://media1.clubpenguin.com/play/en/web_service/game_configs/ paper_items.json),true);
Currently I am debugging the signing of an Android app. And this would be
currently I'm developing an app for WP7 but came across a little problem with
Currently, my MVC 3 app has a dependency on a static class that is
Currently I have in my code tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(addCompoundToLabel:)]; My code
Currently, I have a GWT based application /app.htm It displays an openId login button
Currently I have a UITableview, I have enough data that cannot be shown entirely

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.