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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:18:53+00:00 2026-05-17T06:18:53+00:00

I cannot seem to get my UI to update when my object that implements

  • 0

I cannot seem to get my UI to update when my object that implements SKPaymentTransactionObserver is called.

Specifically, I have a (UILabel *)debugLabel in my UI (all wired up via IB). I have my implementation of the observer protocol:

- (void)paymentQueue:(SKPaymentQueue *)queue updatedTransactions:(NSArray *)transactions {

    NSLog(@"paymentQueue: current thread is main thread: %@", [[NSThread currentThread] isMainThread]?@"YES":@"NO");

    for (SKPaymentTransaction *transaction in transactions) {
        if (transaction.transactionState == SKPaymentTransactionStatePurchased) {


            // if the store is still being viewed, update appropriately
            if(spViewController.storeViewController) {
                [spViewController.storeViewController transactionComplete:transaction];
            }
        }
        // other transactionStates omitted for brevity
    }
}

The [spViewController.storeViewController transactionComplete:transaction] is executed, but the UILabel does not display the assigned text.

- (void) transactionComplete:(SKPaymentTransaction *) transaction {
    NSLog(@"CBTSVC transactionComplete");
    debugLabel.text = @"CBTSVC transactionComplete";

    // other UI updates omitted for brevity
}

When the code executes, the NSLog dumps the string to the console, but the UILabel is not updated. I’ve confirmed that the callbacks made to the SKPaymentTransactionObserver are occuring on the main thread — so the UI should be updating. (Right?)

What gives? It must be missing something simple?

Thanks for any insights, pointers, etc.

  • 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-17T06:18:54+00:00Added an answer on May 17, 2026 at 6:18 am

    It turns out that the updates to the UI are all occurring in the same run loop. When the run loop completes, the UI updates — seemingly all at once.

    I solved this by moving the transaction processing into its own thread via an NSOperation. From the NSOperation, I’m updating the UI as needed (by making calls back to the main thread).

    Thanks for the views!

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

Sidebar

Related Questions

I cannot seem to get this date picker working at all. I know it
I have this design which I cannot seem to get right, I would like
I recently started with PHP Object Oriented and I cannot seem to get this
I need a function, but cannot seem to get it quite right, I have
I have the below code that does not seem to work at all :(
i cannot seem to get observe_form to call a particular action i have a
I cannot seem to get Capistrano to play nicely with AmazonRDS. I've looked all
I cannot seem to get user entered data into a table and then printed.
I cannot seem to get the quotes around this statement right. No matter what
For some reason I cannot seem to get a ko.computed observable to compute when

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.